Re-added generalized ValueType constructors.

v0.27.3
Andreas Huggel 15 years ago
parent 1f9f8bbb52
commit dbc1e60135

@ -1230,10 +1230,12 @@ namespace Exiv2 {
//! @name Creators //! @name Creators
//@{ //@{
//! Default constructor. //! Default Constructor.
ValueType(); explicit ValueType(TypeId typeId =getType<T>());
//! Constructor.
ValueType(const byte* buf, long len, ByteOrder byteOrder, TypeId typeId =getType<T>());
//! Constructor. //! Constructor.
explicit ValueType(TypeId typeId); explicit ValueType(const T& val, TypeId typeId =getType<T>());
//! Copy constructor //! Copy constructor
ValueType(const ValueType<T>& rhs); ValueType(const ValueType<T>& rhs);
//! Virtual destructor. //! Virtual destructor.
@ -1480,15 +1482,23 @@ namespace Exiv2 {
} }
template<typename T> template<typename T>
ValueType<T>::ValueType() ValueType<T>::ValueType(TypeId typeId)
: Value(getType<T>()), pDataArea_(0), sizeDataArea_(0) : Value(typeId), pDataArea_(0), sizeDataArea_(0)
{ {
} }
template<typename T> template<typename T>
ValueType<T>::ValueType(TypeId typeId) ValueType<T>::ValueType(const byte* buf, long len, ByteOrder byteOrder, TypeId typeId)
: Value(typeId), pDataArea_(0), sizeDataArea_(0)
{
read(buf, len, byteOrder);
}
template<typename T>
ValueType<T>::ValueType(const T& val, TypeId typeId)
: Value(typeId), pDataArea_(0), sizeDataArea_(0) : Value(typeId), pDataArea_(0), sizeDataArea_(0)
{ {
value_.push_back(val);
} }
template<typename T> template<typename T>

Loading…
Cancel
Save