#include <iptc.hpp>
Inheritance diagram for Exiv2::Iptcdatum:


Public Member Functions | |
| void | clearModified () |
| Not really meant for public use, but public so IptcData doesn't have to be made a friend. | |
Creators | |
| Iptcdatum (const IptcKey &key, const Value *value=0) | |
| Constructor for new tags created by an application. The Iptcdatum is created from a key / value pair. Iptcdatum copies (clones) the value if one is provided. Alternatively, a program can create an 'empty' Iptcdatum with only a key and set the value using setValue(). | |
| Iptcdatum (const Iptcdatum &rhs) | |
| Copy constructor. | |
| virtual | ~Iptcdatum () |
| Destructor. | |
Manipulators | |
| Iptcdatum & | operator= (const Iptcdatum &rhs) |
| Assignment operator. | |
| void | setValue (const Value *pValue) |
| Set the value. This method copies (clones) the value pointed to by pValue. | |
| void | setValue (const std::string &buf) |
| Set the value to the string buf. Uses Value::read(const std::string& buf). If the Iptcdatum does not have a value yet, then an StringValue is created. | |
Accessors | |
| long | copy (byte *buf, ByteOrder byteOrder) const |
| Write value to a data buffer and return the number of bytes written. | |
| std::string | key () const |
| Return the key of the Iptcdatum. The key is of the form 'Iptc.recordName.datasetName'. Note however that the key is not necessarily unique, i.e., an IptcData may contain multiple metadata with the same key. | |
| const char * | recordName () const |
| Return the name of the record. | |
| uint16 | record () const |
| Return the record id. | |
| std::string | tagName () const |
| Return the name of the tag (aka dataset). | |
| uint16 | tag () const |
| Return the tag (aka dataset) number. | |
| 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. | |
| bool | modified () const |
| Return true if value was modified, otherwise false. | |
| 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 Iptcdatum 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 Iptcdatum 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 Iptcdatum 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. | |
|
||||||||||||
|
Constructor for new tags created by an application. The Iptcdatum is created from a key / value pair. Iptcdatum copies (clones) the value if one is provided. Alternatively, a program can create an 'empty' Iptcdatum 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 the record id.
|
|
|
Return the name of the record.
|
|
|
Return the name of the tag (aka dataset).
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: IptcData::const_iterator i = iptcData.findKey(key);
if (i != iptcData.end()) {
std::cout << i->key() << " " << std::hex << i->value() << "\n";
}
Implements Exiv2::Metadatum.
|
1.3.8