28#include "exiv2lib_export.h"
31#include "metadatum.hpp"
80 Iptcdatum& operator=(
const uint16_t& value);
85 Iptcdatum& operator=(
const std::string& value);
100 int setValue(
const std::string& value)
override;
105 long copy(
byte* buf,
ByteOrder byteOrder)
const override;
106 std::ostream& write(std::ostream& os,
const ExifData* pMetadata =
nullptr)
const override;
113 std::string key()
const override;
118 std::string recordName()
const;
123 uint16_t record()
const;
124 const char* familyName()
const override;
130 std::string tagName()
const override;
131 std::string tagLabel()
const override;
133 uint16_t tag()
const override;
134 TypeId typeId()
const override;
135 const char* typeName()
const override;
136 long typeSize()
const override;
137 long count()
const override;
138 long size()
const override;
139 std::string
toString()
const override;
140 std::string
toString(
long n)
const override;
141 long toLong(
long n = 0)
const override;
142 float toFloat(
long n = 0)
const override;
143 Rational toRational(
long n = 0)
const override;
145 const Value& value()
const override;
188 Iptcdatum& operator[](
const std::string& key);
214 void clear() { iptcMetadata_.clear(); }
227 iterator findKey(
const IptcKey& key);
232 iterator findId(uint16_t dataset,
233 uint16_t record = IptcDataSets::application2);
246 const_iterator findKey(
const IptcKey& key)
const;
251 const_iterator findId(uint16_t dataset,
252 uint16_t record = IptcDataSets::application2)
const;
254 bool empty()
const {
return count() == 0; }
256 long count()
const {
return static_cast<long>(iptcMetadata_.size()); }
264 const char *detectCharset()
const;
268 static void printStructure(std::ostream& out,
const Slice<byte*>& bytes,uint32_t depth);
313 static const byte marker_;
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:434
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition: iptc.hpp:169
iterator begin()
Begin of the metadata.
Definition: iptc.hpp:220
IptcMetadata::iterator iterator
IptcMetadata iterator type.
Definition: iptc.hpp:172
const_iterator begin() const
Begin of the metadata.
Definition: iptc.hpp:239
bool empty() const
Return true if there is no IPTC metadata.
Definition: iptc.hpp:254
const_iterator end() const
End of the metadata.
Definition: iptc.hpp:241
iterator end()
End of the metadata.
Definition: iptc.hpp:222
IptcMetadata::const_iterator const_iterator
IptcMetadata const iterator type.
Definition: iptc.hpp:174
long count() const
Get the number of metadata entries.
Definition: iptc.hpp:256
void clear()
Delete all Iptcdatum instances resulting in an empty container.
Definition: iptc.hpp:214
Concrete keys for IPTC metadata.
Definition: datasets.hpp:257
std::unique_ptr< IptcKey > UniquePtr
Shortcut for an IptcKey auto pointer.
Definition: datasets.hpp:260
Stateless parser class for IPTC data. Images use this class to decode and encode binary IPTC data.
Definition: iptc.hpp:280
An IPTC metadatum ("dataset"), consisting of an IptcKey and a Value and methods to manipulate these.
Definition: iptc.hpp:49
~Iptcdatum() override=default
Destructor.
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
IPTC dataset and type information.
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
std::vector< Iptcdatum > IptcMetadata
Container type to hold all metadata.
Definition: iptc.hpp:156
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
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:162
Slice (= view) for STL containers.
Definition: slice.hpp:522