![]() |
Exiv2
|
Concrete keys for IPTC metadata. More...
#include <datasets.hpp>

Public Types | |
| typedef std::auto_ptr< IptcKey > | AutoPtr |
| Shortcut for an IptcKey auto pointer. | |
Public Types inherited from Exiv2::Key | |
| typedef std::auto_ptr< Key > | AutoPtr |
| Shortcut for a Key auto pointer. | |
Public Member Functions | |
Creators | |
| IptcKey (const std::string &key) | |
| Constructor to create an IPTC key from a key string. More... | |
| IptcKey (uint16_t tag, uint16_t record) | |
| Constructor to create an IPTC key from dataset and record ids. More... | |
| IptcKey (const IptcKey &rhs) | |
| Copy constructor. | |
| virtual | ~IptcKey () |
| Destructor. | |
Accessors | |
| virtual std::string | key () const |
| 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 |
| Return an identifier for the type of metadata (the first part of the key) | |
| virtual std::string | groupName () const |
| Return the name of the group (the second part of the key). For IPTC keys, the group name is the record name. | |
| virtual std::string | tagName () const |
| Return the name of the tag (which is also the third part of the key) | |
| virtual std::string | tagLabel () const |
| Return a label for the tag. | |
| virtual uint16_t | tag () const |
| Return the tag number. | |
| AutoPtr | clone () const |
| std::string | recordName () const |
| Return the name of the record. | |
| uint16_t | record () const |
| Return the record id. | |
Public Member Functions inherited from Exiv2::Key | |
| virtual | ~Key () |
| Destructor. | |
| AutoPtr | 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). | |
Manipulators | |
| IptcKey & | operator= (const IptcKey &rhs) |
| Assignment operator. | |
| void | makeKey () |
| Set the key corresponding to the dataset and record id. The key is of the form 'Iptc.recordName.dataSetName'. | |
| void | decomposeKey () |
| Parse and convert the key string into dataset and record id. Updates data members if the string can be decomposed, or throws Error. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Exiv2::Key | |
| Key & | operator= (const Key &rhs) |
| Assignment operator. Protected so that it can only be used by subclasses but not directly. | |
Concrete keys for IPTC metadata.
|
explicit |
Constructor to create an IPTC key from a key string.
| key | The key string. |
| Error | if the first part of the key is not 'Iptc' or the remaining parts of the key cannot be parsed and converted to a record name and a dataset name. |
References decomposeKey().
| Exiv2::IptcKey::IptcKey | ( | uint16_t | tag, |
| uint16_t | record | ||
| ) |
Constructor to create an IPTC key from dataset and record ids.
| tag | Dataset id |
| record | Record id |
References makeKey().
|
protected |
Parse and convert the key string into dataset and record id. Updates data members if the string can be decomposed, or throws Error.
| Error | if the key cannot be decomposed. |
References Exiv2::IptcDataSets::dataSet(), Exiv2::IptcDataSets::dataSetName(), familyName(), Exiv2::IptcDataSets::recordId(), Exiv2::IptcDataSets::recordName(), recordName(), and Exiv2::string.
Referenced by IptcKey().
1.8.14