From d17f04864d3b43c0c1d87d29dfe70e9b58e964f9 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 20 Jun 2022 21:21:11 +0200 Subject: [PATCH] Move TagType into separate header So it can be used in different places without creating a dependency loop. --- CMakeLists.txt | 1 + tag.h | 16 +--------------- tagtype.h | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 tagtype.h diff --git a/CMakeLists.txt b/CMakeLists.txt index b6be78e..d72d5da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,7 @@ set(HEADER_FILES size.h tag.h tagtarget.h + tagtype.h tagvalue.h vorbis/vorbiscomment.h vorbis/vorbiscommentfield.h diff --git a/tag.h b/tag.h index a9c4e6a..587e33a 100644 --- a/tag.h +++ b/tag.h @@ -2,6 +2,7 @@ #define TAG_PARSER_TAG_H #include "./tagtarget.h" +#include "./tagtype.h" #include "./tagvalue.h" #include @@ -12,21 +13,6 @@ namespace TagParser { -/*! - * \brief Specifies the tag type. - * - * \sa Tag::type() - */ -enum class TagType : unsigned int { - Unspecified = 0x00, /**< The tag type is unspecified. */ - Id3v1Tag = 0x01, /**< The tag is a TagParser::Id3v1Tag. */ - Id3v2Tag = 0x02, /**< The tag is a TagParser::Id3v2Tag. */ - Mp4Tag = 0x04, /**< The tag is a TagParser::Mp4Tag. */ - MatroskaTag = 0x08, /**< The tag is a TagParser::MatroskaTag. */ - VorbisComment = 0x10, /**< The tag is a TagParser::VorbisComment. */ - OggVorbisComment = 0x20 /**< The tag is a TagParser::OggVorbisComment. */ -}; - /*! * \brief Specifies the field. * diff --git a/tagtype.h b/tagtype.h new file mode 100644 index 0000000..f1e734e --- /dev/null +++ b/tagtype.h @@ -0,0 +1,23 @@ +#ifndef TAG_PARSER_TAG_TYPE_H +#define TAG_PARSER_TAG_TYPE_H + +namespace TagParser { + +/*! + * \brief Specifies the tag type. + * + * \sa Tag::type() + */ +enum class TagType : unsigned int { + Unspecified = 0x00, /**< The tag type is unspecified. */ + Id3v1Tag = 0x01, /**< The tag is a TagParser::Id3v1Tag. */ + Id3v2Tag = 0x02, /**< The tag is a TagParser::Id3v2Tag. */ + Mp4Tag = 0x04, /**< The tag is a TagParser::Mp4Tag. */ + MatroskaTag = 0x08, /**< The tag is a TagParser::MatroskaTag. */ + VorbisComment = 0x10, /**< The tag is a TagParser::VorbisComment. */ + OggVorbisComment = 0x20 /**< The tag is a TagParser::OggVorbisComment. */ +}; + +} // namespace TagParser + +#endif // TAG_PARSER_TAG_TYPE_H