diff --git a/tagvalue.h b/tagvalue.h index 07fdc14..c73a791 100644 --- a/tagvalue.h +++ b/tagvalue.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace TagParser { @@ -148,6 +149,8 @@ public: void setFlags(TagValueFlags flags); bool isLabeledAsReadonly() const; void setReadonly(bool readOnly); + const std::unordered_map &nativeData() const; + std::unordered_map &nativeData(); TagTextEncoding dataEncoding() const; void convertDataEncoding(TagTextEncoding encoding); void convertDataEncodingForTag(const Tag *tag); @@ -186,6 +189,7 @@ private: std::string m_desc; std::string m_mimeType; std::string m_language; + std::unordered_map m_nativeData; TagDataType m_type; TagTextEncoding m_encoding; TagTextEncoding m_descEncoding; @@ -666,6 +670,24 @@ inline void TagValue::setReadonly(bool readOnly) readOnly ? (m_flags += TagValueFlags::ReadOnly) : (m_flags -= TagValueFlags::ReadOnly); } +/*! + * \brief Holds tag format specific meta-data for that field which does not fit into any of the other + * meta-data properties. + */ +inline const std::unordered_map &TagValue::nativeData() const +{ + return m_nativeData; +} + +/*! + * \brief Holds tag format specific meta-data for that field which does not fit into any of the other + * meta-data properties. + */ +inline std::unordered_map &TagValue::nativeData() +{ + return m_nativeData; +} + /*! * \brief Returns the data encoding. * \remarks This value is only relevant if type() equals TagDataType::Text.