7#include "exiv2lib_export.h"
10#include "metadatum.hpp"
11#include "properties.hpp"
58 Xmpdatum& operator=(
const std::string& value);
78 int setValue(
const std::string& value)
override;
84 size_t copy(
byte* buf,
ByteOrder byteOrder)
const override;
85 std::ostream& write(std::ostream& os,
const ExifData* pMetadata =
nullptr)
const override;
92 [[nodiscard]] std::string key()
const override;
93 [[nodiscard]]
const char* familyName()
const override;
95 [[nodiscard]] std::string
groupName()
const override;
97 [[nodiscard]] std::string tagName()
const override;
98 [[nodiscard]] std::string tagLabel()
const override;
99 [[nodiscard]] std::string tagDesc()
const override;
101 [[nodiscard]] uint16_t tag()
const override;
102 [[nodiscard]]
TypeId typeId()
const override;
103 [[nodiscard]]
const char* typeName()
const override;
106 [[nodiscard]]
size_t typeSize()
const override;
107 [[nodiscard]]
size_t count()
const override;
108 [[nodiscard]]
size_t size()
const override;
109 [[nodiscard]] std::string toString()
const override;
110 [[nodiscard]] std::string toString(
size_t n)
const override;
111 [[nodiscard]] int64_t toInt64(
size_t n = 0)
const override;
112 [[nodiscard]]
float toFloat(
size_t n = 0)
const override;
113 [[nodiscard]]
Rational toRational(
size_t n = 0)
const override;
115 [[nodiscard]]
const Value& value()
const override;
121 std::unique_ptr<Impl> p_;
158 Xmpdatum& operator[](
const std::string& key);
212 [[nodiscard]]
bool empty()
const;
214 [[nodiscard]]
long count()
const;
229 xmpPacket_ = std::move(xmpPacket);
233 [[nodiscard]]
const std::string& xmpPacket()
const {
241 XmpMetadata xmpMetadata_;
242 std::string xmpPacket_;
255 omitPacketWrapper = 0x0010UL,
256 readOnlyPacket = 0x0020UL,
257 useCompactFormat = 0x0040UL,
258 includeThumbnailPad = 0x0100UL,
259 exactPacketLength = 0x0200UL,
260 writeAliasComments = 0x0400UL,
261 omitAllFormatting = 0x0800UL
276 static int decode(
XmpData& xmpData,
const std::string& xmpPacket);
294 static int encode(std::string& xmpPacket,
const XmpData& xmpData, uint16_t formatFlags = useCompactFormat,
295 uint32_t padding = 0);
306 using XmpLockFct = void (*)(
void* pLockData,
bool lockUnlock);
365 static void terminate();
371 static void registerNs(
const std::string& ns,
const std::string& prefix);
377 static void unregisterNs(
const std::string& ns);
385 static bool initialized_;
387 static void* pLockData_;
398#ifdef __cpp_if_constexpr
399 if constexpr (std::is_same_v<T, bool>) {
401 if (std::is_same<T, bool>::value) {
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition exif.hpp:379
Common interface for all types of values used with metadata.
Definition value.hpp:33
std::unique_ptr< Value > UniquePtr
Shortcut for a Value auto pointer.
Definition value.hpp:36
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition xmp_exiv2.hpp:138
XmpData()=default
Default constructor.
void setPacket(std::string xmpPacket)
setPacket
Definition xmp_exiv2.hpp:228
bool usePacket(bool b)
set usePacket_
Definition xmp_exiv2.hpp:222
bool usePacket() const
are we to use the packet?
Definition xmp_exiv2.hpp:217
XmpMetadata::const_iterator const_iterator
XmpMetadata const iterator type.
Definition xmp_exiv2.hpp:146
XmpMetadata::iterator iterator
XmpMetadata iterator type.
Definition xmp_exiv2.hpp:144
Concrete keys for XMP metadata.
Definition properties.hpp:207
Stateless parser class for XMP packets. Images use this class to parse and serialize XMP packets....
Definition xmp_exiv2.hpp:251
void(*)(void *pLockData, bool lockUnlock) XmpLockFct
Lock/unlock function type.
Definition xmp_exiv2.hpp:306
XmpFormatFlags
Options to control the format of the serialized XMP packet.
Definition xmp_exiv2.hpp:254
XMP property reference, implemented as a static class.
Definition properties.hpp:64
Information related to an XMP property. An XMP metadatum consists of an XmpKey and a Value and provid...
Definition xmp_exiv2.hpp:27
~Xmpdatum() override
Destructor.
const Value & value() const override
Return a constant reference to the value.
Definition xmp.cpp:380
Xmpdatum & operator=(const Xmpdatum &rhs)
Assignment operator.
Definition xmp.cpp:298
void setValue(const Value *pValue) override
Set the value. This method copies (clones) the value pointed to by pValue.
Definition xmp.cpp:404
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition tags_int.cpp:2477
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
std::pair< int32_t, int32_t > Rational
8 byte signed rational type.
Definition types.hpp:31
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition datasets.hpp:312
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:70
std::vector< Xmpdatum > XmpMetadata
Container type to hold all metadata.
Definition xmp_exiv2.hpp:126
ByteOrder
Type to express the byte order (little or big endian)
Definition types.hpp:34
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:147