Exiv2
Classes | Public Types
Exiv2::ExifKey Class Reference

Concrete keys for Exif metadata and access to Exif tag reference data. More...

#include <tags.hpp>

+ Inheritance diagram for Exiv2::ExifKey:
+ Collaboration diagram for Exiv2::ExifKey:

List of all members.

Classes

struct  Impl
 Internal Pimpl structure with private members and data of class ExifKey. More...

Public Types

typedef std::auto_ptr< ExifKeyAutoPtr
 Shortcut for an ExifKey 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.
virtual ~ExifKey ()
 Destructor.
Manipulators
ExifKeyoperator= (const ExifKey &rhs)
 Assignment operator.
void setIdx (int idx)
 Set the index.
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)
int ifdId () const
 Return the IFD id as an integer. (Do not use, this is meant for library internal use.)
virtual std::string tagName () const
 Return the name of the tag (which is also the third part of the key)
virtual uint16_t tag () const
 Return the tag number.
virtual std::string tagLabel () const
 Return a label for the tag.
std::string tagDesc () const
 Return the tag description.
TypeId defaultTypeId () const
 Return the default type id for this tag.
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.
int idx () const
 Return the index (unique id of this key within the original Exif data, 0 if not set)

Detailed Description

Concrete keys for Exif metadata and access to Exif tag reference data.

Examples:

addmoddel.cpp.


Constructor & Destructor Documentation

Exiv2::ExifKey::ExifKey ( const std::string &  key) [explicit]

Constructor to create an Exif key from a key string.

Parameters:
keyThe key string.
Exceptions:
Errorif the first part of the key is not 'Exif' or the remainin parts of the key cannot be parsed and converted to a group name and tag name.

References Exiv2::ExifKey::Impl::decomposeKey().

Exiv2::ExifKey::ExifKey ( uint16_t  tag,
const std::string &  groupName 
)

Constructor to create an Exif key from the tag number and group name.

Parameters:
tagThe tag value
groupNameThe name of the group, i.e., the second part of the Exif key.
Exceptions:
Errorif the key cannot be constructed from the tag number and group name.

References Exiv2::Internal::groupId(), groupName(), Exiv2::ExifKey::Impl::groupName_, ifdId(), Exiv2::Internal::isExifIfd(), Exiv2::Internal::isMakerIfd(), Exiv2::ExifKey::Impl::makeKey(), and Exiv2::Internal::tagInfo().

Exiv2::ExifKey::ExifKey ( const TagInfo ti)

Constructor to create an Exif key from a TagInfo instance.

Parameters:
tiThe TagInfo instance
Exceptions:
Errorif the key cannot be constructed from the tag number and group name.

References groupName(), Exiv2::ExifKey::Impl::groupName_, ifdId(), Exiv2::TagInfo::ifdId_, Exiv2::Internal::isExifIfd(), Exiv2::Internal::isMakerIfd(), Exiv2::ExifKey::Impl::makeKey(), and Exiv2::TagInfo::tag_.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines