| Exiv2

Loading...
Searching...
No Matches
Public Types | List of all members
Exiv2::Key Class Referenceabstract

Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata. More...

`#include <metadatum.hpp>`

Inheritance diagram for Exiv2::Key:
[legend]

## 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 (const Key &)=default

## Manipulators
Key & | operator= (const Key &)=default
| Assignment operator. Protected so that it can only be used by subclasses but not directly.

## Detailed Description

Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata.

## Member Function Documentation

## ◆ familyName()

virtual const char * Exiv2::Key::familyName | ( |  | ) | const
| nodiscard pure virtual

Return an identifier for the type of metadata (the first part of the key).

Implemented in Exiv2::ExifKey, Exiv2::IptcKey, and Exiv2::XmpKey.

## ◆ groupName()

virtual std::string Exiv2::Key::groupName | ( |  | ) | const
| nodiscard pure virtual

Return the name of the group (the second part of the key).

Implemented in Exiv2::ExifKey, Exiv2::IptcKey, and Exiv2::XmpKey.

## ◆ key()

virtual std::string Exiv2::Key::key | ( |  | ) | const
| nodiscard pure virtual

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.

Implemented in Exiv2::ExifKey, Exiv2::IptcKey, and Exiv2::XmpKey.

Referenced by write().

## ◆ tag()

virtual uint16_t Exiv2::Key::tag | ( |  | ) | const
| nodiscard pure virtual

Return the tag number.

Implemented in Exiv2::ExifKey, Exiv2::IptcKey, and Exiv2::XmpKey.

References clone().

## ◆ tagDesc()

virtual std::string Exiv2::Key::tagDesc | ( |  | ) | const
| nodiscard pure virtual

Return a description for the tag.

Implemented in Exiv2::ExifKey, Exiv2::IptcKey, and Exiv2::XmpKey.

## ◆ tagLabel()

virtual std::string Exiv2::Key::tagLabel | ( |  | ) | const
| nodiscard pure virtual

Return a label for the tag.

Implemented in Exiv2::ExifKey, Exiv2::IptcKey, and Exiv2::XmpKey.

## ◆ tagName()

virtual std::string Exiv2::Key::tagName | ( |  | ) | const
| nodiscard pure virtual

Return the name of the tag (which is also the third part of the key).

Implemented in Exiv2::ExifKey, Exiv2::IptcKey, and Exiv2::XmpKey.

The documentation for this class was generated from the following files:

- metadatum.hpp
- metadatum.cpp