11#include "exiv2lib_export.h"
14#include "datasets.hpp"
15#include "metadatum.hpp"
64 Iptcdatum& operator=(
const uint16_t& value);
69 Iptcdatum& operator=(
const std::string& value);
84 int setValue(
const std::string& value)
override;
89 size_t copy(
byte* buf,
ByteOrder byteOrder)
const override;
90 std::ostream& write(std::ostream& os,
const ExifData* pMetadata =
nullptr)
const override;
97 [[nodiscard]] std::string key()
const override;
102 [[nodiscard]] std::string recordName()
const;
107 [[nodiscard]] uint16_t record()
const;
108 [[nodiscard]]
const char* familyName()
const override;
109 [[nodiscard]] std::string
groupName()
const override;
114 [[nodiscard]] std::string tagName()
const override;
115 [[nodiscard]] std::string tagLabel()
const override;
116 [[nodiscard]] std::string tagDesc()
const override;
118 [[nodiscard]] uint16_t tag()
const override;
119 [[nodiscard]]
TypeId typeId()
const override;
120 [[nodiscard]]
const char* typeName()
const override;
121 [[nodiscard]]
size_t typeSize()
const override;
122 [[nodiscard]]
size_t count()
const override;
123 [[nodiscard]]
size_t size()
const override;
124 [[nodiscard]] std::string toString()
const override;
125 [[nodiscard]] std::string toString(
size_t n)
const override;
126 [[nodiscard]] int64_t toInt64(
size_t n = 0)
const override;
127 [[nodiscard]]
float toFloat(
size_t n = 0)
const override;
128 [[nodiscard]]
Rational toRational(
size_t n = 0)
const override;
130 [[nodiscard]]
const Value& value()
const override;
172 Iptcdatum& operator[](
const std::string& key);
199 iptcMetadata_.clear();
207 return iptcMetadata_.begin();
211 return iptcMetadata_.end();
217 iterator findKey(
const IptcKey& key);
222 iterator findId(uint16_t dataset, uint16_t record = IptcDataSets::application2);
229 return iptcMetadata_.begin();
233 return iptcMetadata_.end();
239 [[nodiscard]] const_iterator findKey(
const IptcKey& key)
const;
244 [[nodiscard]] const_iterator findId(uint16_t dataset, uint16_t record = IptcDataSets::application2)
const;
247 return iptcMetadata_.empty();
251 [[nodiscard]]
size_t count()
const {
252 return iptcMetadata_.size();
256 [[nodiscard]]
size_t size()
const;
259 [[nodiscard]]
const char* detectCharset()
const;
262 static void printStructure(std::ostream& out,
const Slice<byte*>& bytes,
size_t depth);
287 static int decode(
IptcData& iptcData,
const byte* pData,
size_t size);
301 static constexpr byte marker_ = 0x1C;
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition exif.hpp:379
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:153
iterator begin()
Begin of the metadata.
Definition iptc.hpp:206
const_iterator begin() const
Begin of the metadata.
Definition iptc.hpp:228
bool empty() const
Return true if there is no IPTC metadata.
Definition iptc.hpp:246
const_iterator end() const
End of the metadata.
Definition iptc.hpp:232
iterator end()
End of the metadata.
Definition iptc.hpp:210
IptcMetadata::const_iterator const_iterator
IptcMetadata const iterator type.
Definition iptc.hpp:158
IptcMetadata::iterator iterator
IptcMetadata iterator type.
Definition iptc.hpp:156
size_t count() const
Get the number of metadata entries.
Definition iptc.hpp:251
void clear()
Delete all Iptcdatum instances resulting in an empty container.
Definition iptc.hpp:198
Concrete keys for IPTC metadata.
Definition datasets.hpp:237
std::unique_ptr< IptcKey > UniquePtr
Shortcut for an IptcKey auto pointer.
Definition datasets.hpp:240
Stateless parser class for IPTC data. Images use this class to decode and encode binary IPTC data.
Definition iptc.hpp:274
An IPTC metadatum ("dataset"), consisting of an IptcKey and a Value and methods to manipulate these.
Definition iptc.hpp:33
~Iptcdatum() override=default
Destructor.
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
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
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< Iptcdatum > IptcMetadata
Container type to hold all metadata.
Definition iptc.hpp:141
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
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition types.hpp:124
Slice (= view) for STL containers.
Definition slice.hpp:421