24#include "exiv2lib_export.h"
27#include "metadatum.hpp"
28#include "properties.hpp"
62 const Value* pValue =0);
77 Xmpdatum& operator=(
const std::string& value);
82 Xmpdatum& operator=(
const char* value);
87 Xmpdatum& operator=(
const bool& value);
107 int setValue(
const std::string& value);
113 long copy(
byte* buf,
ByteOrder byteOrder)
const;
114 std::ostream& write(std::ostream& os,
const ExifData* pMetadata =0)
const;
121 std::string key()
const;
122 const char* familyName()
const;
126 std::string tagName()
const;
127 std::string tagLabel()
const;
129 uint16_t tag()
const;
131 const char* typeName()
const;
134 long typeSize()
const;
139 long toLong(
long n =0)
const;
140 float toFloat(
long n =0)
const;
141 Rational toRational(
long n =0)
const;
143 const Value& value()
const;
149 std::auto_ptr<Impl> p_;
169 XmpData() : xmpMetadata_(), xmpPacket_(), usePacket_(0) {}
186 Xmpdatum& operator[](
const std::string& key);
248 bool usePacket(
bool b) {
bool r = usePacket_; usePacket_=b ;
return r; };
250 void setPacket(
const std::string& xmpPacket) { xmpPacket_ = xmpPacket ; usePacket(
false); };
252 const std::string& xmpPacket()
const {
return xmpPacket_ ; };
259 std::string xmpPacket_ ;
272 omitPacketWrapper = 0x0010UL,
273 readOnlyPacket = 0x0020UL,
274 useCompactFormat = 0x0040UL,
275 includeThumbnailPad = 0x0100UL,
276 exactPacketLength = 0x0200UL,
277 writeAliasComments = 0x0400UL,
278 omitAllFormatting = 0x0800UL
293 static int decode(
XmpData& xmpData,
294 const std::string& xmpPacket);
312 static int encode( std::string& xmpPacket,
314 uint16_t formatFlags =useCompactFormat,
315 uint32_t padding =0);
326 typedef void (*XmpLockFct)(
void* pLockData,
bool lockUnlock);
385 static void terminate();
391 static void registerNs(
const std::string& ns,
392 const std::string& prefix);
398 static void unregisterNs(
const std::string& ns);
406 static bool initialized_;
407 static XmpLockFct xmpLockFct_;
408 static void* pLockData_;
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:434
Common interface for all types of values used with metadata.
Definition: value.hpp:51
std::auto_ptr< Value > AutoPtr
Shortcut for a Value auto pointer.
Definition: value.hpp:54
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition: xmp_exiv2.hpp:166
XmpData()
Default constructor.
Definition: xmp_exiv2.hpp:169
XmpMetadata::iterator iterator
XmpMetadata iterator type.
Definition: xmp_exiv2.hpp:172
bool usePacket(bool b)
set usePacket_
Definition: xmp_exiv2.hpp:248
XmpMetadata::const_iterator const_iterator
XmpMetadata const iterator type.
Definition: xmp_exiv2.hpp:174
bool usePacket() const
are we to use the packet?
Definition: xmp_exiv2.hpp:245
void setPacket(const std::string &xmpPacket)
setPacket
Definition: xmp_exiv2.hpp:250
Concrete keys for XMP metadata.
Definition: properties.hpp:231
Stateless parser class for XMP packets. Images use this class to parse and serialize XMP packets....
Definition: xmp_exiv2.hpp:268
XmpFormatFlags
Options to control the format of the serialized XMP packet.
Definition: xmp_exiv2.hpp:271
void(* XmpLockFct)(void *pLockData, bool lockUnlock)
Lock/unlock function type.
Definition: xmp_exiv2.hpp:326
XMP property reference, implemented as a static class.
Definition: properties.hpp:85
Information related to an XMP property. An XMP metadatum consists of an XmpKey and a Value and provid...
Definition: xmp_exiv2.hpp:45
Xmpdatum & operator=(const Xmpdatum &rhs)
Assignment operator.
Definition: xmp.cpp:330
const Value & value() const
Return a constant reference to the value.
Definition: xmp.cpp:427
void setValue(const Value *pValue)
Set the value. This method copies (clones) the value pointed to by pValue.
Definition: xmp.cpp:456
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2569
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
T getValue(const byte *buf, ByteOrder byteOrder)
Read a value of type T from the data buffer.
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:119
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
std::pair< int32_t, int32_t > Rational
8 byte signed rational type.
Definition: types.hpp:99
Exiv2::Exifdatum & setValue(Exiv2::Exifdatum &exifDatum, const T &value)
Set the value of exifDatum to value. If the object already has a value, it is replaced....
Definition: exif.cpp:194
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:510
std::vector< Xmpdatum > XmpMetadata
Container type to hold all metadata.
Definition: xmp_exiv2.hpp:154
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition: datasets.hpp:364
Internal Pimpl structure of class Xmpdatum.
Definition: xmp.cpp:288