24#include "exiv2lib_export.h"
85 virtual int read(
const std::string& buf) =0;
98 virtual int setDataArea(
const byte* buf,
long len);
132 virtual std::ostream&
write(std::ostream& os)
const =0;
144 virtual std::string
toString(
long n)
const;
170 virtual long sizeDataArea()
const;
183 virtual DataBuf dataArea()
const;
188 bool ok()
const {
return ok_; }
227 static UniquePtr create(
TypeId typeId);
240 virtual Value* clone_()
const =0;
249 return value.
write(os);
261 long len,
ByteOrder byteOrder =invalidByteOrder,
280 int read(
const byte* buf,
long len,
ByteOrder byteOrder = invalidByteOrder)
override;
282 int read(
const std::string& buf)
override;
301 long copy(
byte* buf,
ByteOrder byteOrder = invalidByteOrder)
const override;
302 long count()
const override;
303 long size()
const override;
304 std::ostream& write(std::ostream& os)
const override;
310 std::string
toString(
long n)
const override;
311 long toLong(
long n = 0)
const override;
312 float toFloat(
long n = 0)
const override;
313 Rational toRational(
long n = 0)
const override;
353 int read(
const std::string& buf)
override;
366 int read(
const byte* buf,
long len,
ByteOrder byteOrder = invalidByteOrder)
override;
385 long copy(
byte* buf,
ByteOrder byteOrder = invalidByteOrder)
const override;
386 long count()
const override;
387 long size()
const override;
388 long toLong(
long n = 0)
const override;
389 float toFloat(
long n = 0)
const override;
390 Rational toRational(
long n = 0)
const override;
391 std::ostream& write(std::ostream& os)
const override;
468 int read(
const std::string& buf)
override;
479 std::ostream& write(std::ostream& os)
const override;
500 invalidCharsetId, lastCharsetId };
523 static const char* name(
CharsetId charsetId);
525 static const char* code(
CharsetId charsetId);
527 static CharsetId charsetIdByName(
const std::string& name);
529 static CharsetId charsetIdByCode(
const std::string& code);
562 int read(
const std::string&
comment)
override;
566 int read(
const byte* buf,
long len,
ByteOrder byteOrder)
override;
572 long copy(
byte* buf,
ByteOrder byteOrder)
const override;
577 std::ostream& write(std::ostream& os)
const override;
592 std::string
comment(
const char* encoding =
nullptr)
const;
602 const char* detectCharset(std::string& c)
const;
604 CharsetId charsetId()
const;
638 XmpArrayType xmpArrayType()
const;
640 XmpStruct xmpStruct()
const;
641 long size()
const override;
655 long copy(
byte* buf,
ByteOrder byteOrder = invalidByteOrder)
const override;
661 void setXmpArrayType(XmpArrayType xmpArrayType);
663 void setXmpStruct(XmpStruct xmpStruct =xsStruct);
678 int read(
const byte* buf,
long len,
ByteOrder byteOrder = invalidByteOrder)
override;
679 int read(
const std::string& buf)
override = 0;
733 int read(
const std::string& buf)
override;
739 long size()
const override;
740 long count()
const override;
747 long toLong(
long n = 0)
const override;
754 float toFloat(
long n = 0)
const override;
761 Rational toRational(
long n = 0)
const override;
762 std::ostream& write(std::ostream& os)
const override;
808 int read(
const std::string& buf)
override;
814 long count()
const override;
820 std::string
toString(
long n)
const override;
821 long toLong(
long n = 0)
const override;
822 float toFloat(
long n = 0)
const override;
823 Rational toRational(
long n = 0)
const override;
830 std::ostream& write(std::ostream& os)
const override;
837 std::vector<std::string> value_;
850 bool operator() (
const std::string& str1,
const std::string& str2)
const
852 int result = str1.size() < str2.size() ? 1
853 : str1.size() > str2.size() ? -1
856 std::string::const_iterator c1 = str1.begin();
857 std::string::const_iterator c2 = str2.begin();
858 if ( result==0 )
for (
859 ; result==0 && c1 != str1.end()
862 result = tolower(*c1) < tolower(*c2) ? 1
863 : tolower(*c1) > tolower(*c2) ? -1
910 int read(
const std::string& buf)
override;
916 long count()
const override;
924 std::string
toString(
long n)
const override;
930 std::string
toString(
const std::string& qualifier)
const;
931 long toLong(
long n = 0)
const override;
932 float toFloat(
long n = 0)
const override;
933 Rational toRational(
long n = 0)
const override;
940 std::ostream& write(std::ostream& os)
const override;
949 typedef std::map<std::string, std::string,LangAltValueComparator>
ValueType;
1003 int read(
const byte* buf,
long len,
ByteOrder byteOrder = invalidByteOrder)
override;
1012 int read(
const std::string& buf)
override;
1014 void setDate(
const Date& src);
1019 UniquePtr clone()
const {
return UniquePtr(clone_()); }
1033 long copy(
byte* buf,
ByteOrder byteOrder = invalidByteOrder)
const override;
1035 virtual const Date& getDate()
const;
1036 long count()
const override;
1037 long size()
const override;
1038 std::ostream& write(std::ostream& os)
const override;
1040 long toLong(
long n = 0)
const override;
1042 float toFloat(
long n = 0)
const override;
1044 Rational toRational(
long n = 0)
const override;
1049 DateValue* clone_()
const override;
1074 TimeValue(
int hour,
int minute,
int second =0,
1075 int tzHour =0,
int tzMinute =0);
1108 int read(
const byte* buf,
long len,
ByteOrder byteOrder = invalidByteOrder)
override;
1117 int read(
const std::string& buf)
override;
1119 void setTime(
const Time& src);
1124 UniquePtr clone()
const {
return UniquePtr(clone_()); }
1138 long copy(
byte* buf,
ByteOrder byteOrder = invalidByteOrder)
const override;
1140 virtual const Time& getTime()
const;
1141 long count()
const override;
1142 long size()
const override;
1143 std::ostream& write(std::ostream& os)
const override;
1145 long toLong(
long n = 0)
const override;
1147 float toFloat(
long n = 0)
const override;
1149 Rational toRational(
long n = 0)
const override;
1165 int scanTime3(
const char* buf,
const char* format);
1176 int scanTime6(
const char* buf,
const char* format);
1182 TimeValue* clone_()
const override;
1217 template<
typename T>
1244 int read(
const byte* buf,
long len,
ByteOrder byteOrder)
override;
1251 int read(
const std::string& buf)
override;
1256 int setDataArea(
const byte* buf,
long len)
override;
1263 long count()
const override;
1264 long size()
const override;
1265 std::ostream&
write(std::ostream& os)
const override;
1272 std::string
toString(
long n)
const override;
1273 long toLong(
long n = 0)
const override;
1274 float toFloat(
long n = 0)
const override;
1307 byte* pDataArea_{
nullptr};
1309 long sizeDataArea_{0};
1372 return getLong(buf, byteOrder);
1413 return us2Data(buf, t, byteOrder);
1422 return ul2Data(buf, t, byteOrder);
1431 return ur2Data(buf, t, byteOrder);
1440 return s2Data(buf, t, byteOrder);
1449 return l2Data(buf, t, byteOrder);
1458 return r2Data(buf, t, byteOrder);
1467 return f2Data(buf, t, byteOrder);
1476 return d2Data(buf, t, byteOrder);
1479 template <
typename T>
1484 template <
typename T>
1489 template <
typename T>
1492 read(buf, len, byteOrder);
1495 template <
typename T>
1501 template<
typename T>
1503 :
Value(rhs.typeId())
1504 , value_(rhs.value_)
1507 if (rhs.sizeDataArea_ > 0) {
1508 pDataArea_ =
new byte[rhs.sizeDataArea_];
1509 std::memcpy(pDataArea_, rhs.pDataArea_, rhs.sizeDataArea_);
1510 sizeDataArea_ = rhs.sizeDataArea_;
1514 template<
typename T>
1517 delete[] pDataArea_;
1520 template<
typename T>
1523 if (
this == &rhs)
return *
this;
1527 byte* tmp =
nullptr;
1528 if (rhs.sizeDataArea_ > 0) {
1529 tmp =
new byte[rhs.sizeDataArea_];
1530 std::memcpy(tmp, rhs.pDataArea_, rhs.sizeDataArea_);
1532 delete[] pDataArea_;
1534 sizeDataArea_ = rhs.sizeDataArea_;
1539 template<
typename T>
1545 if (len % ts != 0) len = (len / ts) * ts;
1546 for (
long i = 0; i < len; i += ts) {
1547 value_.push_back(getValue<T>(buf + i, byteOrder));
1552 template<
typename T>
1555 std::istringstream is(buf);
1558 while (!(is.eof())) {
1560 if (is.fail())
return 1;
1567 template<
typename T>
1571 typename ValueList::const_iterator end = value_.end();
1572 for (
typename ValueList::const_iterator i = value_.begin(); i != end; ++i) {
1573 offset +=
toData(buf + offset, *i, byteOrder);
1578 template<
typename T>
1581 return static_cast<long>(value_.size());
1584 template<
typename T>
1590 template<
typename T>
1596 template<
typename T>
1599 typename ValueList::const_iterator end = value_.end();
1600 typename ValueList::const_iterator i = value_.begin();
1602 os << std::setprecision(15) << *i;
1603 if (++i != end) os <<
" ";
1608 template<
typename T>
1612 return Exiv2::toString<T>(value_.at(n));
1616 template<
typename T>
1620 return static_cast<long>(value_.at(n));
1623#define LARGE_INT 1000000
1628 const double v = value_.at(n);
1629 ok_ = (INT_MIN <= v && v <= INT_MAX);
1631 return static_cast<long>(v);
1637 const double v = value_.at(n);
1638 ok_ = (INT_MIN <= v && v <= INT_MAX);
1640 return static_cast<long>(v);
1646 ok_ = (value_.at(n).second > 0 && INT_MIN < value_.at(n).first && value_.at(n).first < INT_MAX );
1648 return value_.at(n).first / value_.at(n).second;
1654 ok_ = (value_.at(n).second > 0 && value_.at(n).first < LARGE_INT);
1656 return value_.at(n).first / value_.at(n).second;
1659 template<
typename T>
1663 return static_cast<float>(value_.at(n));
1669 ok_ = (value_.at(n).second != 0);
1670 if (!ok_)
return 0.0f;
1671 return static_cast<float>(value_.at(n).first) / value_.at(n).second;
1677 ok_ = (value_.at(n).second != 0);
1678 if (!ok_)
return 0.0f;
1679 return static_cast<float>(value_.at(n).first) / value_.at(n).second;
1682 template<
typename T>
1686 return {value_.at(n), 1};
1693 return {value_.at(n).first, value_.at(n).second};
1700 return {value_.at(n).first, value_.at(n).second};
1719 template<
typename T>
1722 return sizeDataArea_;
1725 template<
typename T>
1728 return DataBuf(pDataArea_, sizeDataArea_);
1731 template<
typename T>
1734 byte* tmp =
nullptr;
1736 tmp =
new byte[len];
1737 std::memcpy(tmp, buf, len);
1739 delete[] pDataArea_;
1741 sizeDataArea_ = len;
Value for an Ascii string type.
Definition: value.hpp:445
~AsciiValue() override=default
Virtual destructor.
std::unique_ptr< AsciiValue > UniquePtr
Shortcut for a AsciiValue auto pointer.
Definition: value.hpp:448
Value for an undefined data type.
Definition: value.hpp:253
std::unique_ptr< DataValue > UniquePtr
Shortcut for a DataValue auto pointer.
Definition: value.hpp:256
Value for simple ISO 8601 dates
Definition: value.hpp:965
std::unique_ptr< DateValue > UniquePtr
Shortcut for a DateValue auto pointer.
Definition: value.hpp:968
~DateValue() override=default
Virtual destructor.
Value type for XMP language alternative properties.
Definition: value.hpp:877
std::unique_ptr< LangAltValue > UniquePtr
Shortcut for a LangAltValue auto pointer.
Definition: value.hpp:880
std::map< std::string, std::string, LangAltValueComparator > ValueType
Type used to store language alternative arrays.
Definition: value.hpp:949
ValueType value_
Map to store the language alternative values. The language qualifier is used as the key for the map e...
Definition: value.hpp:955
Abstract base class for a string based Value type.
Definition: value.hpp:333
StringValueBase * clone_() const override=0
Internal virtual copy constructor.
std::unique_ptr< StringValueBase > UniquePtr
Shortcut for a StringValueBase auto pointer.
Definition: value.hpp:336
std::string value_
Stores the string value.
Definition: value.hpp:402
int read(const std::string &buf) override
Read the value from buf. This default implementation uses buf as it is.
Definition: value.cpp:257
StringValueBase(const StringValueBase &rhs)=default
Copy constructor.
~StringValueBase() override=default
Virtual destructor.
Value for string type.
Definition: value.hpp:413
std::unique_ptr< StringValue > UniquePtr
Shortcut for a StringValue auto pointer.
Definition: value.hpp:416
~StringValue() override=default
Virtual destructor.
Value for simple ISO 8601 times.
Definition: value.hpp:1064
~TimeValue() override=default
Virtual destructor.
std::unique_ptr< TimeValue > UniquePtr
Shortcut for a TimeValue auto pointer.
Definition: value.hpp:1067
static long typeSize(TypeId typeId)
Return the size in bytes of one element of this type.
Definition: types.cpp:117
Template for a Value of a basic type. This is used for unsigned and signed short, long and rationals.
Definition: value.hpp:1218
long size() const override
Return the size of the value in bytes.
Definition: value.hpp:1585
ValueType< T > & operator=(const ValueType< T > &rhs)
Assignment operator.
Definition: value.hpp:1521
float toFloat(long n=0) const override
Convert the n-th component of the value to a float. The behaviour of this method may be undefined if ...
Definition: value.hpp:1660
long toLong(long n=0) const override
Convert the n-th component of the value to a long. The behaviour of this method may be undefined if t...
Definition: value.hpp:1617
long count() const override
Return the number of components of the value.
Definition: value.hpp:1579
long sizeDataArea() const override
Return the size of the data area.
Definition: value.hpp:1720
std::vector< T >::iterator iterator
Iterator type defined for convenience.
Definition: value.hpp:1288
int read(const byte *buf, long len, ByteOrder byteOrder) override
Read the value from a character buffer.
Definition: value.hpp:1540
DataBuf dataArea() const override
Return a copy of the data area in a DataBuf. The caller owns this copy and DataBuf ensures that it wi...
Definition: value.hpp:1726
Rational toRational(long n=0) const override
Convert the n-th component of the value to a Rational. The behaviour of this method may be undefined ...
Definition: value.hpp:1683
std::vector< T > ValueList
Container for values.
Definition: value.hpp:1286
ValueType()
Default Constructor.
Definition: value.hpp:1480
~ValueType() override
Virtual destructor.
Definition: value.hpp:1515
std::vector< T >::const_iterator const_iterator
Const iterator type defined for convenience.
Definition: value.hpp:1290
int setDataArea(const byte *buf, long len) override
Set the data area. This method copies (clones) the buffer pointed to by buf.
Definition: value.hpp:1732
long copy(byte *buf, ByteOrder byteOrder) const override
Write value to a data buffer.
Definition: value.hpp:1568
ValueList value_
The container for all values. In your application, if you know what subclass of Value you're dealing ...
Definition: value.hpp:1299
std::ostream & write(std::ostream &os) const override
Write the value to an output stream. You do not usually have to use this function; it is used for the...
Definition: value.hpp:1597
std::unique_ptr< ValueType< T > > UniquePtr
Shortcut for a ValueType<T> auto pointer.
Definition: value.hpp:1221
Common interface for all types of values used with metadata.
Definition: value.hpp:51
TypeId typeId() const
Return the type identifier (Exif data format type).
Definition: value.hpp:104
virtual ~Value()=default
Virtual destructor.
virtual std::ostream & write(std::ostream &os) const =0
Write the value to an output stream. You do not usually have to use this function; it is used for the...
virtual float toFloat(long n=0) const =0
Convert the n-th component of the value to a float. The behaviour of this method may be undefined if ...
virtual int read(const std::string &buf)=0
Set the value from a string buffer. The format of the string corresponds to that of the write() metho...
virtual long size() const =0
Return the size of the value in bytes.
virtual long copy(byte *buf, ByteOrder byteOrder) const =0
Write value to a data buffer.
virtual long toLong(long n=0) const =0
Convert the n-th component of the value to a long. The behaviour of this method may be undefined if t...
bool ok_
Indicates the status of the previous to<Type> conversion.
Definition: value.hpp:236
bool ok() const
Check the ok status indicator. After a to<Type> conversion, this indicator shows whether the conversi...
Definition: value.hpp:188
std::unique_ptr< Value > UniquePtr
Shortcut for a Value auto pointer.
Definition: value.hpp:54
virtual Rational toRational(long n=0) const =0
Convert the n-th component of the value to a Rational. The behaviour of this method may be undefined ...
std::string toString() const
Return the value as a string. Implemented in terms of write(std::ostream& os) const of the concrete c...
Definition: value.cpp:125
virtual int read(const byte *buf, long len, ByteOrder byteOrder)=0
Read the value from a character buffer.
Value & operator=(const Value &rhs)=default
Assignment operator. Protected so that it can only be used by subclasses but not directly.
virtual long count() const =0
Return the number of components of the value.
UniquePtr clone() const
Return an auto-pointer to a copy of itself (deep copy). The caller owns this copy and the auto-pointe...
Definition: value.hpp:110
Value type for simple arrays. Each item in the array is a simple value, without qualifiers....
Definition: value.hpp:784
std::unique_ptr< XmpArrayValue > UniquePtr
Shortcut for a XmpArrayValue auto pointer.
Definition: value.hpp:787
Value type suitable for simple XMP properties and XMP nodes of complex types which are not parsed int...
Definition: value.hpp:702
std::unique_ptr< XmpTextValue > UniquePtr
Shortcut for a XmpTextValue auto pointer.
Definition: value.hpp:705
std::string value_
Stores the string values.
Definition: value.hpp:771
Base class for all Exiv2 values used to store XMP property values.
Definition: value.hpp:620
int read(const std::string &buf) override=0
Set the value from a string buffer. The format of the string corresponds to that of the write() metho...
XmpStruct
XMP structure indicator.
Definition: value.hpp:628
std::unique_ptr< XmpValue > UniquePtr
Shortcut for a XmpValue auto pointer.
Definition: value.hpp:623
int read(const byte *buf, long len, ByteOrder byteOrder=invalidByteOrder) override
Read the value from a character buffer.
Definition: value.cpp:591
XmpArrayType
XMP array types.
Definition: value.hpp:626
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: basicio.hpp:43
EXIV2API std::ostream & operator<<(std::ostream &os, const DataSet &dataSet)
Output operator for dataSet.
Definition: datasets.cpp:677
EXIV2API double getDouble(const byte *buf, ByteOrder byteOrder)
Read an 8 byte double precision floating point value (IEEE 754 binary64) from the data buffer.
Definition: types.cpp:440
TypeId getType< int32_t >()
Specialization for a signed long.
Definition: value.hpp:1202
EXIV2API long f2Data(byte *buf, float f, ByteOrder byteOrder)
Convert a single precision floating point (IEEE 754 binary32) float to data, write the data to the bu...
Definition: types.cpp:565
EXIV2API long d2Data(byte *buf, double d, ByteOrder byteOrder)
Convert a double precision floating point (IEEE 754 binary64) double to data, write the data to the b...
Definition: types.cpp:579
ValueType< URational > URationalValue
Unsigned rational value type.
Definition: value.hpp:1317
EXIV2API float getFloat(const byte *buf, ByteOrder byteOrder)
Read a 4 byte single precision floating point value (IEEE 754 binary32) from the data buffer.
Definition: types.cpp:426
TypeId getType< int16_t >()
Specialization for a signed short.
Definition: value.hpp:1200
EXIV2API Rational floatToRationalCast(float f)
Very simple conversion of a float to a Rational.
Definition: types.cpp:792
EXIV2API long l2Data(byte *buf, int32_t l, ByteOrder byteOrder)
Convert a signed long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:541
EXIV2API int16_t getShort(const byte *buf, ByteOrder byteOrder)
Read a 2 byte signed short value from the data buffer.
Definition: types.cpp:403
ValueType< uint16_t > UShortValue
Unsigned short value type.
Definition: value.hpp:1313
TypeId getType< uint32_t >()
Specialization for an unsigned long.
Definition: value.hpp:1196
EXIV2API uint32_t getULong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte unsigned long value from the data buffer.
Definition: types.cpp:374
EXIV2API long ul2Data(byte *buf, uint32_t l, ByteOrder byteOrder)
Convert an unsigned long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:487
ValueType< int32_t > LongValue
Signed long value type.
Definition: value.hpp:1321
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
@ unsignedShort
Exif SHORT type, 16-bit (2-byte) unsigned integer.
Definition: types.hpp:103
@ signedRational
Exif SRATIONAL type, two SLONGs: numerator and denumerator of a fraction.
Definition: types.hpp:110
@ unsignedLong
Exif LONG type, 32-bit (4-byte) unsigned integer.
Definition: types.hpp:104
@ signedShort
Exif SSHORT type, a 16-bit (2-byte) signed (twos-complement) integer.
Definition: types.hpp:108
@ signedLong
Exif SLONG type, a 32-bit (4-byte) signed (twos-complement) integer.
Definition: types.hpp:109
@ comment
Exiv2 type for the Exif user comment.
Definition: types.hpp:120
@ tiffDouble
TIFF DOUBLE type, double precision (8-byte) IEEE format.
Definition: types.hpp:112
@ undefined
Exif UNDEFINED type, an 8-bit byte that may contain anything.
Definition: types.hpp:107
@ xmpBag
XMP bag type.
Definition: types.hpp:124
@ tiffFloat
TIFF FLOAT type, single precision (4-byte) IEEE format.
Definition: types.hpp:111
@ unsignedRational
Exif RATIONAL type, two LONGs: numerator and denumerator of a fraction.
Definition: types.hpp:105
long toData(byte *buf, T t, ByteOrder byteOrder)
Convert a value of type T to data, write the data to the data buffer.
EXIV2API uint16_t getUShort(const byte *buf, ByteOrder byteOrder)
Read a 2 byte unsigned short value from the data buffer.
Definition: types.cpp:369
ValueType< int16_t > ShortValue
Signed short value type.
Definition: value.hpp:1319
ValueType< float > FloatValue
Float value type.
Definition: value.hpp:1325
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
TypeId getType< uint16_t >()
Specialization for an unsigned short.
Definition: value.hpp:1194
ValueType< uint32_t > ULongValue
Unsigned long value type.
Definition: value.hpp:1315
ValueType< Rational > RationalValue
Signed rational value type.
Definition: value.hpp:1323
EXIV2API Rational getRational(const byte *buf, ByteOrder byteOrder)
Read an 8 byte signed rational value from the data buffer.
Definition: types.cpp:419
EXIV2API long r2Data(byte *buf, Rational l, ByteOrder byteOrder)
Convert a signed rational to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:558
TypeId getType< URational >()
Specialization for an unsigned rational.
Definition: value.hpp:1198
TypeId getType< float >()
Specialization for a float.
Definition: value.hpp:1206
EXIV2API long ur2Data(byte *buf, URational l, ByteOrder byteOrder)
Convert an unsigned rational to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:521
EXIV2API int32_t getLong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte signed long value from the data buffer.
Definition: types.cpp:411
TypeId getType< Rational >()
Specialization for a signed rational.
Definition: value.hpp:1204
TypeId getType< double >()
Specialization for a double.
Definition: value.hpp:1208
EXIV2API long s2Data(byte *buf, int16_t s, ByteOrder byteOrder)
Convert a signed short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:528
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:510
std::pair< uint32_t, uint32_t > URational
8 byte unsigned rational type.
Definition: types.hpp:78
TypeId getType()
Template to determine the TypeId for a type T.
EXIV2API URational getURational(const byte *buf, ByteOrder byteOrder)
Read an 8 byte unsigned rational value from the data buffer.
Definition: types.cpp:396
ValueType< double > DoubleValue
Double value type.
Definition: value.hpp:1327
EXIV2API long us2Data(byte *buf, uint16_t s, ByteOrder byteOrder)
Convert an unsigned short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:474
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:162
Simple Date helper structure.
Definition: value.hpp:981
LangAltValueComparator
Definition: value.hpp:848
bool operator()(const std::string &str1, const std::string &str2) const
LangAltValueComparator comparison case insensitive function.
Definition: value.hpp:850
Simple Time helper structure.
Definition: value.hpp:1083