Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

Exiv2::IptcKey Class Reference

Concrete keys for Iptc metadata. More...

#include <iptc.hpp>

Inheritance diagram for Exiv2::IptcKey:

Inheritance graph
[legend]
Collaboration diagram for Exiv2::IptcKey:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Creators
 IptcKey (const std::string &key)
 Constructor to create an Iptc key from a key string.
 IptcKey (uint16 tag, uint16 record)
 Constructor to create an Iptc key from dataset and record ids.
 IptcKey (const IptcKey &rhs)
 Copy constructor.
Manipulators
IptcKeyoperator= (const IptcKey &rhs)
 Assignment operator.
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 uint16 tag () const
 Return the tag number.
virtual IptcKeyclone () const
 Return a pointer to a copy of itself (deep copy). The caller owns this copy and is responsible to delete it!
const char * recordName () const
 Return the name of the record.
uint16 record () const
 Return the record id.

Protected Member Functions

Manipulators
void decomposeKey ()
 Parse and convert the key string into dataset and record id. Updates tag_ and record_ if the string can be decomposed, or throws Error ("Invalid key").

Detailed Description

Concrete keys for Iptc metadata.


Constructor & Destructor Documentation

Exiv2::IptcKey::IptcKey const std::string &  key  )  [explicit]
 

Constructor to create an Iptc key from a key string.

Parameters:
key The key string.
Exceptions:
Error ("Invalid key") 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.

Exiv2::IptcKey::IptcKey uint16  tag,
uint16  record
 

Constructor to create an Iptc key from dataset and record ids.

Parameters:
tag Dataset id
record Record id


Member Function Documentation

void Exiv2::IptcKey::decomposeKey  )  [protected]
 

Parse and convert the key string into dataset and record id. Updates tag_ and record_ if the string can be decomposed, or throws Error ("Invalid key").

Exceptions:
Error ("Invalid key") if the key cannot be parsed into family name, group name and tag name parts.


The documentation for this class was generated from the following files:
Generated on Mon Sep 13 22:01:43 2004 for Exiv2 by doxygen 1.3.8