![]() |
Exiv2
|
Concrete keys for Exif metadata and access to Exif tag reference data. More...
#include <tags.hpp>

Classes | |
| struct | Impl |
| Internal Pimpl structure with private members and data of class ExifKey. More... | |
Public Types | |
| using | UniquePtr = std::unique_ptr<ExifKey> |
| Shortcut for an ExifKey auto pointer. | |
| Public Types inherited from Exiv2::Key | |
| using | UniquePtr = std::unique_ptr<Key> |
| Shortcut for a Key auto pointer. | |
Public Member Functions | |
Creators | |
| ExifKey (const std::string &key) | |
| Constructor to create an Exif key from a key string. | |
| ExifKey (uint16_t tag, const std::string &groupName) | |
| Constructor to create an Exif key from the tag number and group name. | |
| ExifKey (const TagInfo &ti) | |
| Constructor to create an Exif key from a TagInfo instance. | |
| ExifKey (const ExifKey &rhs) | |
| Copy constructor. | |
| ~ExifKey () override | |
| Destructor. | |
Manipulators | |
| ExifKey & | operator= (const ExifKey &rhs) |
| Assignment operator. | |
| void | setIdx (int idx) const |
| Set the index. | |
| 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). | |
| IfdId | ifdId () const |
| Return the IFD id. (Do not use, this is meant for library internal use.). | |
| std::string | tagName () const override |
| Return the name of the tag (which is also the third part of the key). | |
| uint16_t | tag () const override |
| Return the tag number. | |
| std::string | tagLabel () const override |
| Return a label for the tag. | |
| std::string | tagDesc () const override |
| Return a description for the tag. | |
| TypeId | defaultTypeId () const |
| Return the default type id for this tag. | |
| UniquePtr | clone () const |
| int | idx () const |
| Return the index (unique id of this key within the original Exif data, 0 if not set). | |
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. | |
Concrete keys for Exif metadata and access to Exif tag reference data.
|
explicit |
Constructor to create an Exif key from a key string.
| key | The key string. |
| Error | if the first part of the key is not 'Exif' or the remaining parts of the key cannot be parsed and converted to a group name and tag name. |
References key().
Referenced by Exiv2::Converter::cnvExifArray(), Exiv2::Converter::cnvExifComment(), Exiv2::Converter::cnvExifDate(), Exiv2::Converter::cnvExifFlash(), Exiv2::Converter::cnvExifGPSCoord(), Exiv2::Converter::cnvExifGPSVersion(), Exiv2::Converter::cnvExifValue(), Exiv2::Converter::cnvExifVersion(), Exiv2::ExifParser::encode(), ExifKey(), Exiv2::lensName(), Exiv2::TiffImage::mimeType(), operator=(), Exiv2::Internal::OlympusMakerNote::print0x0308(), Exiv2::Internal::Nikon3MakerNote::printAfPointsInFocus(), Exiv2::Internal::printCsLensFFFF(), Exiv2::Internal::CanonMakerNote::printFiFileNumber(), Exiv2::Internal::Nikon3MakerNote::printFlashGroupADataFl6(), Exiv2::Internal::Nikon3MakerNote::printFlashGroupADataFl7(), Exiv2::Internal::Nikon3MakerNote::printFlashGroupBDataFl6(), Exiv2::Internal::Nikon3MakerNote::printFlashGroupBDataFl7(), Exiv2::Internal::Nikon3MakerNote::printFlashGroupCDataFl6(), Exiv2::Internal::Nikon3MakerNote::printFlashGroupCDataFl7(), Exiv2::Internal::Nikon3MakerNote::printFlashMasterDataFl6(), Exiv2::Internal::Nikon3MakerNote::printFlashMasterDataFl7(), Exiv2::Internal::Nikon3MakerNote::printLensId(), Exiv2::Internal::PentaxMakerNote::printShutterCount(), Exiv2::Internal::SonyMakerNote::printSony2FpAmbientTemperature(), Exiv2::Internal::SonyMakerNote::printSonyMisc1CameraTemperature(), Exiv2::Rw2Image::readMetadata(), Exiv2::Internal::TiffEncoder::visitIfdMakernote(), and ~ExifKey().
| Exiv2::ExifKey::ExifKey | ( | uint16_t | tag, |
| const std::string & | groupName ) |
Constructor to create an Exif key from the tag number and group name.
| tag | The tag value |
| groupName | The name of the group, i.e., the second part of the Exif key. |
| Error | if the key cannot be constructed from the tag number and group name. |
References Exiv2::Error::Error(), Exiv2::Internal::groupId(), groupName(), ifdId(), Exiv2::Internal::isExifIfd(), Exiv2::Internal::isMakerIfd(), tag(), and Exiv2::Internal::tagInfo().
|
explicit |
Constructor to create an Exif key from a TagInfo instance.
| ti | The TagInfo instance |
| Error | if the key cannot be constructed from the tag number and group name. |
References Exiv2::Error::Error(), Exiv2::Internal::groupName(), ifdId(), Exiv2::TagInfo::ifdId_, Exiv2::Internal::isExifIfd(), Exiv2::Internal::isMakerIfd(), and Exiv2::TagInfo::tag_.
| Exiv2::ExifKey::ExifKey | ( | const ExifKey & | rhs | ) |
Copy constructor.
References ExifKey().
|
overridedefault |
Destructor.
References defaultTypeId(), ExifKey(), familyName(), groupName(), idx(), ifdId(), key(), operator=(), setIdx(), tag(), tagDesc(), tagLabel(), and tagName().
|
nodiscard |
Return the default type id for this tag.
Referenced by Exiv2::operator<<(), and ~ExifKey().
|
nodiscardoverridevirtual |
Return an identifier for the type of metadata (the first part of the key).
Implements Exiv2::Key.
References Exiv2::ExifKey::Impl::familyName_.
Referenced by Exiv2::ExifKey::Impl::decomposeKey(), and ~ExifKey().
|
nodiscardoverridevirtual |
Return the name of the group (the second part of the key).
Implements Exiv2::Key.
Referenced by Exiv2::ExifKey::Impl::decomposeKey(), ExifKey(), Exiv2::operator<<(), and ~ExifKey().
|
nodiscard |
Return the index (unique id of this key within the original Exif data, 0 if not set).
Referenced by Exiv2::Internal::TiffEncoder::encodeTiffComponent(), setIdx(), and ~ExifKey().
|
nodiscard |
Return the IFD id. (Do not use, this is meant for library internal use.).
Referenced by Exiv2::ExifKey::Impl::decomposeKey(), Exiv2::ExifTags::defaultCount(), ExifKey(), ExifKey(), Exiv2::ExifKey::Impl::makeKey(), Exiv2::ExifTags::sectionName(), and ~ExifKey().
|
nodiscardoverridevirtual |
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 Exiv2::ExifKey::Impl::decomposeKey(), Exiv2::Internal::TiffEncoder::encodeTiffComponent(), ExifKey(), Exiv2::ExifData::findKey(), Exiv2::ExifData::findKey(), Exiv2::operator<<(), and ~ExifKey().
| void Exiv2::ExifKey::setIdx | ( | int | idx | ) | const |
Set the index.
References idx(), and Exiv2::ExifKey::Impl::idx_.
Referenced by Exiv2::Internal::TiffDecoder::decodeStdTiffEntry(), and ~ExifKey().
|
nodiscardoverridevirtual |
Return the tag number.
Implements Exiv2::Key.
Referenced by Exiv2::ExifKey::Impl::decomposeKey(), Exiv2::ExifTags::defaultCount(), ExifKey(), Exiv2::ExifKey::Impl::makeKey(), Exiv2::operator<<(), Exiv2::ExifTags::sectionName(), and ~ExifKey().
|
nodiscardoverridevirtual |
Return a description for the tag.
Implements Exiv2::Key.
Referenced by Exiv2::operator<<(), and ~ExifKey().
|
nodiscardoverridevirtual |
|
nodiscardoverridevirtual |
Return the name of the tag (which is also the third part of the key).
Implements Exiv2::Key.
Referenced by Exiv2::operator<<(), and ~ExifKey().