7 #include "exiv2lib_export.h"
33 virtual ~
Key() =
default;
37 Key& operator=(
Key&&) =
delete;
46 [[nodiscard]]
virtual std::string key()
const = 0;
48 [[nodiscard]]
virtual const char* familyName()
const = 0;
50 [[nodiscard]]
virtual std::string
groupName()
const = 0;
52 [[nodiscard]]
virtual std::string tagName()
const = 0;
54 [[nodiscard]]
virtual std::string tagLabel()
const = 0;
56 [[nodiscard]]
virtual std::string tagDesc()
const = 0;
58 [[nodiscard]]
virtual uint16_t tag()
const = 0;
71 std::ostream&
write(std::ostream& os)
const {
85 Key& operator=(
const Key&) =
default;
90 [[nodiscard]]
virtual Key* clone_()
const = 0;
124 virtual int setValue(
const std::string& buf) = 0;
134 std::string print(
const ExifData* pMetadata =
nullptr)
const;
146 virtual size_t copy(
byte* buf,
ByteOrder byteOrder)
const = 0;
168 virtual std::ostream& write(std::ostream& os,
const ExifData* pMetadata =
nullptr)
const = 0;
175 [[nodiscard]]
virtual std::string key()
const = 0;
177 [[nodiscard]]
virtual const char* familyName()
const = 0;
179 [[nodiscard]]
virtual std::string
groupName()
const = 0;
181 [[nodiscard]]
virtual std::string tagName()
const = 0;
183 [[nodiscard]]
virtual std::string tagLabel()
const = 0;
185 [[nodiscard]]
virtual std::string tagDesc()
const = 0;
187 [[nodiscard]]
virtual uint16_t tag()
const = 0;
189 [[nodiscard]]
virtual TypeId typeId()
const = 0;
191 [[nodiscard]]
virtual const char* typeName()
const = 0;
193 [[nodiscard]]
virtual size_t typeSize()
const = 0;
195 [[nodiscard]]
virtual size_t count()
const = 0;
197 [[nodiscard]]
virtual size_t size()
const = 0;
199 [[nodiscard]]
virtual std::string
toString()
const = 0;
205 [[nodiscard]]
virtual std::string
toString(
size_t n)
const = 0;
211 [[nodiscard]]
virtual int64_t toInt64(
size_t n = 0)
const = 0;
215 [[nodiscard]] uint32_t toUint32(
size_t n = 0)
const;
221 [[nodiscard]]
virtual float toFloat(
size_t n = 0)
const = 0;
227 [[nodiscard]]
virtual Rational toRational(
size_t n = 0)
const = 0;
255 [[nodiscard]]
virtual const Value& value()
const = 0;
293 #endif // #ifndef METADATUM_HPP_
EXIV2API bool cmpMetadataByKey(const Metadatum &lhs, const Metadatum &rhs)
Compare two metadata by key. Return true if the key of metadatum lhs is less than that of rhs...
Definition: metadatum.cpp:24
EXIV2API bool cmpMetadataByTag(const Metadatum &lhs, const Metadatum &rhs)
Compare two metadata by tag. Return true if the tag of metadatum lhs is less than that of rhs...
Definition: metadatum.cpp:20
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:373
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:34
T getValue(const byte *buf, ByteOrder byteOrder)
Read a value of type T from the data buffer.
Definition: value.hpp:1332
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:70
Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata...
Definition: metadatum.hpp:26
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:26
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:456
std::pair< int32_t, int32_t > Rational
8 byte signed rational type.
Definition: types.hpp:31
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 value is created and set to value.
Definition: exif.cpp:147
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2406
Common interface for all types of values used with metadata.
Definition: value.hpp:33
std::unique_ptr< Key > UniquePtr
Shortcut for a Key auto pointer.
Definition: metadatum.hpp:29
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition: asfvideo.hpp:15
std::ostream & write(std::ostream &os) const
Write the key to an output stream. You do not usually have to use this function; it is used for the i...
Definition: metadatum.hpp:71
EXIV2API std::ostream & operator<<(std::ostream &os, const DataSet &dataSet)
Output operator for dataSet.
Definition: datasets.cpp:592
std::unique_ptr< Value > UniquePtr
Shortcut for a Value auto pointer.
Definition: value.hpp:36