| Exiv2

Loading...
Searching...
No Matches
Public Types | List of all members
Exiv2::XmpKey Class Reference

Concrete keys for XMP metadata. More...

`#include <properties.hpp>`

Inheritance diagram for Exiv2::XmpKey:
[legend]

## Public Types
using | UniquePtr = std::unique_ptr<XmpKey>
| Shortcut for an XmpKey auto pointer.
Public Types inherited from Exiv2::Key
using | UniquePtr = std::unique_ptr<Key>
| Shortcut for a Key auto pointer.

## Public Member Functions
Creators
| XmpKey (const std::string &key)
| Constructor to create an XMP key from a key string.
| XmpKey (const std::string &prefix, const std::string &property)
| Constructor to create an XMP key from a schema prefix and a property name.
| XmpKey (const XmpKey &rhs)
| Copy constructor.
| ~XmpKey () override
| Virtual destructor.
Manipulators
XmpKey & | operator= (const XmpKey &rhs)
| Assignment operator.
Public Member Functions inherited from Exiv2::Key
virtual | ~Key ()=default
| Destructor.
| Key (Key &&)=delete
Key & | operator= (Key &&)=delete
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).

## Accessors
std::string | key () const override
| 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.
const char * | familyName () const override
| Return an identifier for the type of metadata (the first part of the key).
std::string | groupName () const override
| Return the name of the group (the second part of the key). For XMP keys, the group name is the schema prefix name.
std::string | tagName () const override
| Return the name of the tag (which is also the third part of the key).
std::string | tagLabel () const override
| Return a label for the tag.
std::string | tagDesc () const override
| Return a description for the tag.
uint16_t | tag () const override
| Properties don't have a tag number. Return 0.
UniquePtr | clone () const
std::string | ns () const
| Return the schema namespace for the prefix of the key.

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

## Detailed Description

Concrete keys for XMP metadata.

Examples
  xmpsample.cpp.

## Constructor & Destructor Documentation

## ◆ XmpKey() [1/2]

Exiv2::XmpKey::XmpKey | ( | const std::string & | key | ) |
| explicit

Constructor to create an XMP key from a key string.

Parameters

  key | The key string.

Exceptions

  Error | if the first part of the key is not 'Xmp' or the second part of the key cannot be parsed and converted to a known (i.e., built-in or registered) schema prefix.

References key().

Referenced by ns(), operator=(), and XmpKey().

## ◆ XmpKey() [2/2]

Exiv2::XmpKey::XmpKey | ( | const std::string & | prefix,
|  | const std::string & | property )

Constructor to create an XMP key from a schema prefix and a property name.

Parameters

  prefix | Schema prefix name
  property | Property name

Exceptions

  Error | if the schema prefix is not known.

## Member Function Documentation

## ◆ familyName()

const char * Exiv2::XmpKey::familyName | ( |  | ) | const
| nodiscard override virtual

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

Implements Exiv2::Key.

## ◆ groupName()

std::string Exiv2::XmpKey::groupName | ( |  | ) | const
| nodiscard override virtual

Return the name of the group (the second part of the key). For XMP keys, the group name is the schema prefix name.

Implements Exiv2::Key.

## ◆ key()

std::string Exiv2::XmpKey::key | ( |  | ) | const
| nodiscard override 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.

Implements Exiv2::Key.

Referenced by XmpKey().

## ◆ tag()

uint16_t Exiv2::XmpKey::tag | ( |  | ) | const
| nodiscard override virtual

Properties don't have a tag number. Return 0.

Implements Exiv2::Key.

## ◆ tagDesc()

std::string Exiv2::XmpKey::tagDesc | ( |  | ) | const
| nodiscard override virtual

Return a description for the tag.

Implements Exiv2::Key.

## ◆ tagLabel()

std::string Exiv2::XmpKey::tagLabel | ( |  | ) | const
| nodiscard override virtual

Return a label for the tag.

Implements Exiv2::Key.

## ◆ tagName()

std::string Exiv2::XmpKey::tagName | ( |  | ) | const
| nodiscard override virtual

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

Implements Exiv2::Key.

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

- properties.hpp