Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata. More...
#include <metadatum.hpp>
Public Types | |
using | UniquePtr = std::unique_ptr< Key > |
Shortcut for a Key auto pointer. | |
Public Member Functions | |
Creators | |
virtual | ~Key ()=default |
Destructor. | |
Key (Key &&)=delete | |
Key & | operator= (Key &&)=delete |
Accessors | |
virtual std::string | key () const =0 |
Return the key of the metadatum as a string. The key is of the form 'familyName.groupName.tagName'. Note however that the key is not necessarily unique, e.g., an ExifData may contain multiple metadata with the same key. | |
virtual const char * | familyName () const =0 |
Return an identifier for the type of metadata (the first part of the key) | |
virtual std::string | groupName () const =0 |
Return the name of the group (the second part of the key) | |
virtual std::string | tagName () const =0 |
Return the name of the tag (which is also the third part of the key) | |
virtual std::string | tagLabel () const =0 |
Return a label for the tag. | |
virtual std::string | tagDesc () const =0 |
Return a description for the tag. | |
virtual uint16_t | tag () const =0 |
Return the tag number. | |
UniquePtr | clone () const |
Return an auto-pointer to a copy of itself (deep copy). The caller owns this copy and the auto-pointer ensures that it will be deleted. | |
std::ostream & | write (std::ostream &os) const |
Write the key to an output stream. You do not usually have to use this function; it is used for the implementation of the output operator for Key, operator<<(std::ostream &os, const Key &key). | |
Key ()=default | |
Key (const Key &)=default | |
Manipulators | |
Key & | operator= (const Key &)=default |
Assignment operator. Protected so that it can only be used by subclasses but not directly. | |
Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata.