|
|
@ -62,7 +62,8 @@ namespace Exiv2 {
|
|
|
|
// class definitions
|
|
|
|
// class definitions
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Information related to one Exif tag.
|
|
|
|
@brief Information related to one Exif tag. An Exif metadatum consists of
|
|
|
|
|
|
|
|
an ExifKey and a Value and provides methods to manipulate these.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class Exifdatum : public Metadatum {
|
|
|
|
class Exifdatum : public Metadatum {
|
|
|
|
friend std::ostream& operator<<(std::ostream&, const Exifdatum&);
|
|
|
|
friend std::ostream& operator<<(std::ostream&, const Exifdatum&);
|
|
|
@ -95,62 +96,60 @@ namespace Exiv2 {
|
|
|
|
//! Assignment operator
|
|
|
|
//! Assignment operator
|
|
|
|
Exifdatum& operator=(const Exifdatum& rhs);
|
|
|
|
Exifdatum& operator=(const Exifdatum& rhs);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Assign \em value to the %Exifdatum. If the object already has a
|
|
|
|
@brief Assign \em value to the %Exifdatum. The type of the new Value
|
|
|
|
value, it is replaced with \em value. Otherwise a new
|
|
|
|
is set to UShortValue.
|
|
|
|
AsciiValue value is created and set to \em value.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
Exifdatum& operator=(const std::string& value);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
|
|
|
@brief Assign \em value to the %Exifdatum. If the object already has a
|
|
|
|
|
|
|
|
value, it is replaced with \em value. Otherwise a new
|
|
|
|
|
|
|
|
UShortValue value is created and set to \em value.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Exifdatum& operator=(const uint16_t& value);
|
|
|
|
Exifdatum& operator=(const uint16_t& value);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Assign \em value to the %Exifdatum. If the object already has a
|
|
|
|
@brief Assign \em value to the %Exifdatum. The type of the new Value
|
|
|
|
value, it is replaced with \em value. Otherwise a new
|
|
|
|
is set to ULongValue.
|
|
|
|
ULongValue value is created and set to \em value.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Exifdatum& operator=(const uint32_t& value);
|
|
|
|
Exifdatum& operator=(const uint32_t& value);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Assign \em value to the %Exifdatum. If the object already has a
|
|
|
|
@brief Assign \em value to the %Exifdatum. The type of the new Value
|
|
|
|
value, it is replaced with \em value. Otherwise a new
|
|
|
|
is set to URationalValue.
|
|
|
|
URational value is created and set to \em value.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Exifdatum& operator=(const URational& value);
|
|
|
|
Exifdatum& operator=(const URational& value);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Assign \em value to the %Exifdatum. If the object already has a
|
|
|
|
@brief Assign \em value to the %Exifdatum. The type of the new Value
|
|
|
|
value, it is replaced with \em value. Otherwise a new
|
|
|
|
is set to ShortValue.
|
|
|
|
ShortValue value is created and set to \em value.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Exifdatum& operator=(const int16_t& value);
|
|
|
|
Exifdatum& operator=(const int16_t& value);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Assign \em value to the %Exifdatum. If the object already has a
|
|
|
|
@brief Assign \em value to the %Exifdatum. The type of the new Value
|
|
|
|
value, it is replaced with \em value. Otherwise a new
|
|
|
|
is set to LongValue.
|
|
|
|
LongValue value is created and set to \em value.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Exifdatum& operator=(const int32_t& value);
|
|
|
|
Exifdatum& operator=(const int32_t& value);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Assign \em value to the %Exifdatum. If the object already has a
|
|
|
|
@brief Assign \em value to the %Exifdatum. The type of the new Value
|
|
|
|
value, it is replaced with \em value. Otherwise a new
|
|
|
|
is set to RationalValue.
|
|
|
|
Rational value is created and set to \em value.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Exifdatum& operator=(const Rational& value);
|
|
|
|
Exifdatum& operator=(const Rational& value);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
|
|
|
@brief Assign \em value to the %Exifdatum.
|
|
|
|
|
|
|
|
Calls setValue(const std::string&).
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
Exifdatum& operator=(const std::string& value);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
|
|
|
@brief Assign \em value to the %Exifdatum.
|
|
|
|
|
|
|
|
Calls setValue(const Value*).
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
Exifdatum& operator=(const Value& value);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Set the value. This method copies (clones) the value pointed
|
|
|
|
@brief Set the value. This method copies (clones) the value pointed
|
|
|
|
to by \em pValue.
|
|
|
|
to by \em pValue.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void setValue(const Value* pValue);
|
|
|
|
void setValue(const Value* pValue);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Set the value from an IFD entry.
|
|
|
|
@brief Set the value to the string \em value.
|
|
|
|
|
|
|
|
Uses Value::read(const std::string&). If the %Exifdatum
|
|
|
|
|
|
|
|
does not have a value yet, then an AsciiValue is created.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void setValue(const Entry& e, ByteOrder byteOrder);
|
|
|
|
void setValue(const std::string& value);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Set the value to the string \em buf.
|
|
|
|
@brief Set the value from an IFD entry.
|
|
|
|
Uses Value::read(const std::string& buf). If the %Exifdatum does
|
|
|
|
|
|
|
|
not have a value yet, then an AsciiValue is created.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void setValue(const std::string& buf);
|
|
|
|
void setValue(const Entry& e, ByteOrder byteOrder);
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
@brief Set the data area by copying (cloning) the buffer pointed to
|
|
|
|
@brief Set the data area by copying (cloning) the buffer pointed to
|
|
|
|
by \em buf.
|
|
|
|
by \em buf.
|
|
|
@ -897,15 +896,10 @@ namespace Exiv2 {
|
|
|
|
template<typename T>
|
|
|
|
template<typename T>
|
|
|
|
Exifdatum& setValue(Exifdatum& exifDatum, const T& value)
|
|
|
|
Exifdatum& setValue(Exifdatum& exifDatum, const T& value)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (exifDatum.value_.get() == 0) {
|
|
|
|
|
|
|
|
std::auto_ptr<ValueType<T> > v
|
|
|
|
std::auto_ptr<ValueType<T> > v
|
|
|
|
= std::auto_ptr<ValueType<T> >(new ValueType<T>);
|
|
|
|
= std::auto_ptr<ValueType<T> >(new ValueType<T>);
|
|
|
|
v->value_.push_back(value);
|
|
|
|
v->value_.push_back(value);
|
|
|
|
exifDatum.value_ = v;
|
|
|
|
exifDatum.value_ = v;
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
exifDatum.value_->read(Exiv2::toString(value));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return exifDatum;
|
|
|
|
return exifDatum;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|