From de111e8b8fe0b4dd6ba3bb2d7bf1f9befb49dccd Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 3 Dec 2004 00:10:50 +0000 Subject: [PATCH] fixed build break on msvc.net --- src/exif.hpp | 54 ++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/src/exif.hpp b/src/exif.hpp index 9e36a95b..1550fbef 100644 --- a/src/exif.hpp +++ b/src/exif.hpp @@ -57,7 +57,36 @@ namespace Exiv2 { // class declarations class ExifData; class MakerNote; + class Exifdatum; +// ***************************************************************************** +// template (definition needed before template use in msvc.net) + + /*! + @brief Set the value of \em exifDatum to \em value. If the object already + has a value, it is replaced. Otherwise a new ValueType\ value + is created and set to \em value. + + This is a helper function, called from Exifdatum members. It is meant to + be used with T = (u)int16_t, (u)int32_t or (U)Rational. Do not use directly. + */ + template + Exifdatum& setValue(Exifdatum& exifDatum, const T& value) + { + if (exifDatum.value_.get() == 0) { + std::auto_ptr > v + = std::auto_ptr >(new ValueType); + v->value_.push_back(value); + exifDatum.value_ = v; + } + else { + exifDatum.value_->read(Exiv2::toString(value)); + } + return exifDatum; + } + + + // ***************************************************************************** // class definitions @@ -325,17 +354,6 @@ namespace Exiv2 { */ std::ostream& operator<<(std::ostream& os, const Exifdatum& md); - /*! - @brief Set the value of \em exifDatum to \em value. If the object already - has a value, it is replaced. Otherwise a new ValueType\ value - is created and set to \em value. - - This is a helper function, called from Exifdatum members. It is meant to - be used with T = (u)int16_t, (u)int32_t or (U)Rational. Do not use directly. - */ - template - Exifdatum& setValue(Exifdatum& exifDatum, const T& value); - /*! @brief Exif %Thumbnail image. This abstract base class provides the interface for the thumbnail image that is optionally embedded in @@ -900,20 +918,6 @@ namespace Exiv2 { // ***************************************************************************** // template, inline and free functions - template - Exifdatum& setValue(Exifdatum& exifDatum, const T& value) - { - if (exifDatum.value_.get() == 0) { - std::auto_ptr > v - = std::auto_ptr >(new ValueType); - v->value_.push_back(value); - exifDatum.value_ = v; - } - else { - exifDatum.value_->read(Exiv2::toString(value)); - } - return exifDatum; - } /*! @brief Add all metadata in the range from iterator position begin to iterator position end, which have an IFD id matching that of the