From dabd18102e193fc7f1758fa78de2693525f0214b Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 11 Mar 2018 16:15:46 +0100 Subject: [PATCH] Remove out-commented code for nested tags --- tag.cpp | 27 ------------------------- tag.h | 61 --------------------------------------------------------- 2 files changed, 88 deletions(-) diff --git a/tag.cpp b/tag.cpp index 252f2f7..36d8cf1 100644 --- a/tag.cpp +++ b/tag.cpp @@ -148,31 +148,4 @@ unsigned int Tag::insertValues(const Tag &from, bool overwrite) * converting the character set if neccessary. */ -//bool Tag::setParent(Tag *tag) -//{ -// if(m_parent != tag) { -// // ensure this tag is a valid parent for the specified tag -// if(!tag->supportsChild(this)) { -// return false; -// } -// // ensure the new parent is no child of this tag -// Tag *newParent = tag->parent(); -// while(newParent) { -// if(newParent == this) { -// return false; -// } -// newParent = newParent->parent(); -// } -// // remove this tag from the nested tags of the old parent -// if(m_parent) { -// m_parent->m_nestedTags.erase(std::remove(m_nestedTags.begin(), m_nestedTags.end(), this)); -// } -// // add this tag to the nested tags of the new parent -// if((m_parent = tag)) { -// m_parent->m_nestedTags.push_back(this); -// } -// } -// return true; -//} - } // namespace TagParser diff --git a/tag.h b/tag.h index 5d2669b..d19db74 100644 --- a/tag.h +++ b/tag.h @@ -123,13 +123,6 @@ public: virtual bool supportsMimeType(KnownField field) const; virtual unsigned int insertValues(const Tag &from, bool overwrite); virtual void ensureTextValuesAreProperlyEncoded() = 0; - // Tag *parent() const; - // bool setParent(Tag *tag); - // Tag *nestedTag(size_t index) const; - // size_t nestedTagCount() const; - // const std::vector nestedTags() const; - // virtual bool supportsNestedTags() const; - // virtual bool supportsChild(Tag *child); protected: Tag(); @@ -137,8 +130,6 @@ protected: std::string m_version; uint32 m_size; TagTarget m_target; - // Tag *m_parent; - // std::vector m_nestedTags; }; /*! @@ -358,58 +349,6 @@ inline bool Tag::supportsMimeType(KnownField) const return false; } -///*! -// * \brief Returns the parent of the tag. -// */ -//inline Tag *Tag::parent() const -//{ -// return m_parent; -//} - -///*! -// * \brief Returns the nested tags. -// */ -//inline const std::vector Tag::nestedTags() const -//{ -// return m_nestedTags; -//} - -///*! -// * \brief Returns whether the tag supports nested tags (generally). -// */ -//inline bool Tag::supportsNestedTags() const -//{ -// return false; -//} - -///*! -// * \brief Returns whether \a child might be added as nested tag. -// * -// * The default implementation returns true when nested tag are -// * generally supported and the \a child is of the same type -// * as this tag. -// */ -//inline bool Tag::supportsChild(Tag *child) -//{ -// return supportsNestedTags() && type() == child->type(); -//} - -///*! -// * \brief Returns the nested tag with the specified \a index. -// */ -//inline Tag *Tag::nestedTag(size_t ) const -//{ -// return nullptr; -//} - -///*! -// * \brief Returns the number of nested tags. -// */ -//inline size_t Tag::nestedTagCount() const -//{ -// return 0; -//} - } // namespace TagParser #endif // TAG_PARSER_TAG_H