Add TagValue::nativeData() to store tag format specific meta-data
This commit is contained in:
parent
007251c604
commit
b5983d40ad
22
tagvalue.h
22
tagvalue.h
|
@ -14,6 +14,7 @@
|
|||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace TagParser {
|
||||
|
||||
|
@ -148,6 +149,8 @@ public:
|
|||
void setFlags(TagValueFlags flags);
|
||||
bool isLabeledAsReadonly() const;
|
||||
void setReadonly(bool readOnly);
|
||||
const std::unordered_map<std::string, std::string> &nativeData() const;
|
||||
std::unordered_map<std::string, std::string> &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<std::string, std::string> 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<std::string, std::string> &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<std::string, std::string> &TagValue::nativeData()
|
||||
{
|
||||
return m_nativeData;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the data encoding.
|
||||
* \remarks This value is only relevant if type() equals TagDataType::Text.
|
||||
|
|
Loading…
Reference in New Issue