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);
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);
225 iterator findKey(
const XmpKey& key);
230 const_iterator begin()
const;
233 const_iterator end()
const;
238 const_iterator findKey(
const XmpKey& key)
const;
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_ ; };
258 XmpMetadata xmpMetadata_;
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_;
424 return operator=(value ?
"True" :
"False");
436 #endif // #ifndef XMP_HPP_ A container for XMP data. This is a top-level class of the Exiv2 library.
Definition: xmp_exiv2.hpp:166
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:434
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
T getValue(const byte *buf, ByteOrder byteOrder)
Read a value of type T from the data buffer.
Definition: value.hpp:1363
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition: datasets.hpp:364
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:119
bool usePacket(bool b)
set usePacket_
Definition: xmp_exiv2.hpp:248
XmpFormatFlags
Options to control the format of the serialized XMP packet.
Definition: xmp_exiv2.hpp:271
XmpMetadata::const_iterator const_iterator
XmpMetadata const iterator type.
Definition: xmp_exiv2.hpp:174
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:94
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:510
bool usePacket() const
are we to use the packet?
Definition: xmp_exiv2.hpp:245
Information related to an XMP property. An XMP metadatum consists of an XmpKey and a Value and provid...
Definition: xmp_exiv2.hpp:45
XMP property reference, implemented as a static class.
Definition: properties.hpp:85
Internal Pimpl structure of class Xmpdatum.
Definition: xmp.cpp:288
Stateless parser class for XMP packets. Images use this class to parse and serialize XMP packets...
Definition: xmp_exiv2.hpp:268
XmpData()
Default constructor.
Definition: xmp_exiv2.hpp:169
Concrete keys for XMP metadata.
Definition: properties.hpp:230
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. Otherwise a new ValueType<T> value is created and set to value.
Definition: exif.cpp:193
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2540
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
XmpMetadata::iterator iterator
XmpMetadata iterator type.
Definition: xmp_exiv2.hpp:172
void(* XmpLockFct)(void *pLockData, bool lockUnlock)
Lock/unlock function type.
Definition: xmp_exiv2.hpp:326
void setPacket(const std::string &xmpPacket)
setPacket
Definition: xmp_exiv2.hpp:250
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
std::vector< Xmpdatum > XmpMetadata
Container type to hold all metadata.
Definition: xmp_exiv2.hpp:154
Xmpdatum & operator=(const Xmpdatum &rhs)
Assignment operator.
Definition: xmp.cpp:330