 |
Exiv2
|
20 #ifndef METADATUM_HPP_
21 #define METADATUM_HPP_
24 #include "exiv2lib_export.h"
63 virtual std::string key()
const =0;
65 virtual const char* familyName()
const =0;
69 virtual std::string tagName()
const =0;
71 virtual std::string tagLabel()
const =0;
73 virtual uint16_t tag()
const =0;
86 std::ostream&
write(std::ostream& os)
const {
return os << key(); }
96 Key& operator=(
const Key& rhs);
101 virtual Key* clone_()
const =0;
108 return key.
write(os);
140 virtual int setValue(
const std::string& buf) =0;
150 std::string print(
const ExifData* pMetadata =0)
const;
162 virtual long copy(
byte* buf,
ByteOrder byteOrder)
const =0;
184 virtual std::ostream& write(
194 virtual std::string key()
const =0;
196 virtual const char* familyName()
const =0;
198 virtual std::string
groupName()
const =0;
200 virtual std::string tagName()
const =0;
202 virtual std::string tagLabel()
const =0;
204 virtual uint16_t tag()
const =0;
206 virtual TypeId typeId()
const =0;
208 virtual const char* typeName()
const =0;
210 virtual long typeSize()
const =0;
212 virtual long count()
const =0;
214 virtual long size()
const =0;
216 virtual std::string
toString()
const =0;
222 virtual std::string
toString(
long n)
const =0;
228 virtual long toLong(
long n =0)
const =0;
234 virtual float toFloat(
long n =0)
const =0;
240 virtual Rational toRational(
long n =0)
const =0;
268 virtual const Value& value()
const =0;
305 #endif // #ifndef METADATUM_HPP_
Key & operator=(const Key &rhs)
Assignment operator. Protected so that it can only be used by subclasses but not directly.
Definition: metadatum.cpp:42
Common interface for all types of values used with metadata.
Definition: value.hpp:51
std::auto_ptr< Key > AutoPtr
Shortcut for a Key auto pointer.
Definition: metadatum.hpp:47
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2540
Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata.
Definition: metadatum.hpp:44
virtual ~Key()
Destructor.
Definition: metadatum.cpp:33
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:77
AutoPtr clone() const
Return an auto-pointer to a copy of itself (deep copy). The caller owns this copy and the auto-pointe...
Definition: metadatum.cpp:37
EXIV2API std::ostream & operator<<(std::ostream &os, const DataSet &dataSet)
Output operator for dataSet.
Definition: datasets.cpp:709
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
std::pair< int32_t, int32_t > Rational
8 byte signed rational type.
Definition: types.hpp:99
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:119
T getValue(const byte *buf, ByteOrder byteOrder)
Read a value of type T from the data buffer.
Definition: value.hpp:1363
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:86
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
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:71
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:193
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:510
std::auto_ptr< Value > AutoPtr
Shortcut for a Value auto pointer.
Definition: value.hpp:54
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:434