24#include "exiv2lib_export.h"
27#include "metadatum.hpp"
28#include "properties.hpp"
76 Xmpdatum& operator=(
const std::string& value);
81 Xmpdatum& operator=(
const char* value);
86 Xmpdatum& operator=(
const bool& value);
106 int setValue(
const std::string& value)
override;
112 long copy(
byte* buf,
ByteOrder byteOrder)
const override;
113 std::ostream& write(std::ostream& os,
const ExifData* pMetadata =
nullptr)
const override;
120 std::string key()
const override;
121 const char* familyName()
const override;
125 std::string tagName()
const override;
126 std::string tagLabel()
const override;
128 uint16_t tag()
const override;
129 TypeId typeId()
const override;
130 const char* typeName()
const override;
133 long typeSize()
const override;
134 long count()
const override;
135 long size()
const override;
136 std::string
toString()
const override;
137 std::string
toString(
long n)
const override;
138 long toLong(
long n = 0)
const override;
139 float toFloat(
long n = 0)
const override;
140 Rational toRational(
long n = 0)
const override;
142 const Value& value()
const override;
148 std::unique_ptr<Impl> p_;
185 Xmpdatum& operator[](
const std::string& key);
247 bool usePacket(
bool b) {
bool r = usePacket_; usePacket_=b ;
return r; };
249 void setPacket(
const std::string& xmpPacket) { xmpPacket_ = xmpPacket ; usePacket(
false); };
251 const std::string& xmpPacket()
const {
return xmpPacket_ ; };
258 std::string xmpPacket_ ;
271 omitPacketWrapper = 0x0010UL,
272 readOnlyPacket = 0x0020UL,
273 useCompactFormat = 0x0040UL,
274 includeThumbnailPad = 0x0100UL,
275 exactPacketLength = 0x0200UL,
276 writeAliasComments = 0x0400UL,
277 omitAllFormatting = 0x0800UL
292 static int decode(
XmpData& xmpData,
293 const std::string& xmpPacket);
311 static int encode( std::string& xmpPacket,
313 uint16_t formatFlags =useCompactFormat,
314 uint32_t padding =0);
325 typedef void (*XmpLockFct)(
void* pLockData,
bool lockUnlock);
384 static void terminate();
390 static void registerNs(
const std::string& ns,
391 const std::string& prefix);
397 static void unregisterNs(
const std::string& ns);
405 static bool initialized_;
406 static XmpLockFct xmpLockFct_;
407 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::unique_ptr< Value > UniquePtr
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:165
XmpData()=default
Default constructor.
XmpMetadata::iterator iterator
XmpMetadata iterator type.
Definition: xmp_exiv2.hpp:171
bool usePacket(bool b)
set usePacket_
Definition: xmp_exiv2.hpp:247
XmpMetadata::const_iterator const_iterator
XmpMetadata const iterator type.
Definition: xmp_exiv2.hpp:173
bool usePacket() const
are we to use the packet?
Definition: xmp_exiv2.hpp:244
void setPacket(const std::string &xmpPacket)
setPacket
Definition: xmp_exiv2.hpp:249
Concrete keys for XMP metadata.
Definition: properties.hpp:238
Stateless parser class for XMP packets. Images use this class to parse and serialize XMP packets....
Definition: xmp_exiv2.hpp:267
XmpFormatFlags
Options to control the format of the serialized XMP packet.
Definition: xmp_exiv2.hpp:270
void(* XmpLockFct)(void *pLockData, bool lockUnlock)
Lock/unlock function type.
Definition: xmp_exiv2.hpp:325
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() override
Destructor.
const Value & value() const override
Return a constant reference to the value.
Definition: xmp.cpp:426
Xmpdatum & operator=(const Xmpdatum &rhs)
Assignment operator.
Definition: xmp.cpp:331
void setValue(const Value *pValue) override
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:2559
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: basicio.hpp:43
T getValue(const byte *buf, ByteOrder byteOrder)
Read a value of type T from the data buffer.
Definition: value.hpp:1346
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:100
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:83
std::pair< int32_t, int32_t > Rational
8 byte signed rational type.
Definition: types.hpp:80
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:195
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:153
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition: datasets.hpp:347
Internal Pimpl structure of class Xmpdatum.
Definition: xmp.cpp:285