#include <exif.hpp>
Inheritance diagram for Exiv2::Exifdatum:


Public Member Functions | |
Creators | |
| Exifdatum (const ExifKey &key, const Value *pValue=0) | |
| Constructor for new tags created by an application. The Exifdatum is created from a key / value pair. Exifdatum copies (clones) the key and value if one is provided. Alternatively, a program can create an 'empty' Exifdatum with only a key and set the value using setValue(). | |
| Exifdatum (const Entry &e, ByteOrder byteOrder) | |
| Constructor to build a Exifdatum from an IFD entry. | |
| Exifdatum (const Exifdatum &rhs) | |
| Copy constructor. | |
| virtual | ~Exifdatum () |
| Destructor. | |
Manipulators | |
| Exifdatum & | operator= (const Exifdatum &rhs) |
| Assignment operator. | |
| void | setValue (const Value *pValue) |
| Set the value. This method copies (clones) the value pointed to by pValue. | |
| void | setValue (const Entry &e, ByteOrder byteOrder) |
| Set the value from an IFD entry. | |
| void | setValue (const std::string &buf) |
| Set the value to the string buf. Uses Value::read(const std::string& buf). If the Exifdatum does not have a value yet, then an AsciiValue is created. | |
Accessors | |
| std::string | key () const |
| Return the key of the Exifdatum. | |
| std::string | groupName () const |
| Return the name of the group (the second part of the key). | |
| std::string | tagName () const |
| Return the name of the tag (which is also the third part of the key). | |
| uint16 | tag () const |
| Return the tag. | |
| IfdId | ifdId () const |
| Return the IFD id. | |
| const char * | ifdName () const |
| Return the name of the IFD. | |
| const char * | ifdItem () const |
| Return the related image item (deprecated). | |
| int | idx () const |
| Return the index (unique id of this key within the original IFD). | |
| long | copy (byte *buf, ByteOrder byteOrder) const |
| Write value to a data buffer and return the number of bytes written. | |
| TypeId | typeId () const |
| Return the type id of the value. | |
| const char * | typeName () const |
| Return the name of the type. | |
| long | typeSize () const |
| Return the size in bytes of one component of this type. | |
| long | count () const |
| Return the number of components in the value. | |
| long | size () const |
| Return the size of the value in bytes. | |
| std::string | toString () const |
| Return the value as a string. | |
| long | toLong (long n=0) const |
| Return the n-th component of the value converted to long. The return value is -1 if the value of the Exifdatum is not set and the behaviour of the method is undefined if there is no n-th component. | |
| float | toFloat (long n=0) const |
| Return the n-th component of the value converted to float. The return value is -1 if the value of the Exifdatum is not set and the behaviour of the method is undefined if there is no n-th component. | |
| Rational | toRational (long n=0) const |
| Return the n-th component of the value converted to Rational. The return value is -1/1 if the value of the Exifdatum is not set and the behaviour of the method is undefined if there is no n-th component. | |
| Value * | getValue () const |
| Return a pointer to a copy (clone) of the value. The caller is responsible to delete this copy when it's no longer needed. | |
| const Value & | value () const |
| Return a constant reference to the value. | |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Exifdatum &) |
| Output operator for Exifdatum types, prints the interpreted tag value. | |
|
||||||||||||
|
Constructor for new tags created by an application. The Exifdatum is created from a key / value pair. Exifdatum copies (clones) the key and value if one is provided. Alternatively, a program can create an 'empty' Exifdatum with only a key and set the value using setValue().
|
|
||||||||||||
|
Write value to a data buffer and return the number of bytes written. The user must ensure that the buffer has enough memory. Otherwise the call results in undefined behaviour.
Implements Exiv2::Metadatum.
|
|
|
Return a pointer to a copy (clone) of the value. The caller is responsible to delete this copy when it's no longer needed. This method is provided for users who need full control over the value. A caller may, e.g., downcast the pointer to the appropriate subclass of Value to make use of the interface of the subclass to set or modify its contents.
Implements Exiv2::Metadatum.
|
|
|
Return a constant reference to the value. This method is provided mostly for convenient and versatile output of the value which can (to some extent) be formatted through standard stream manipulators. Do not attempt to write to the value through this reference.
Example: ExifData::const_iterator i = exifData.findKey(key);
if (i != exifData.end()) {
std::cout << i->key() << " " << std::hex << i->value() << "\n";
}
Implements Exiv2::Metadatum.
|
1.3.8