Remove out-commented code for nested tags

This commit is contained in:
Martchus 2018-03-11 16:15:46 +01:00
parent b35fc2ff0d
commit dabd18102e
2 changed files with 0 additions and 88 deletions

27
tag.cpp
View File

@ -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

61
tag.h
View File

@ -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<Tag *> 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<Tag *> 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 *> 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