Stripped trailing whitespace

v0.27.3
Andreas Huggel 19 years ago
parent 6dd2941188
commit 73c6be0749

@ -590,14 +590,14 @@ namespace Action {
continue; continue;
} }
if (manyFiles) { if (manyFiles) {
std::cout << std::setfill(' ') << std::left << std::setw(20) std::cout << std::setfill(' ') << std::left << std::setw(20)
<< path_ << " "; << path_ << " ";
} }
bool first = true; bool first = true;
if (Params::instance().printItems_ & Params::prTag) { if (Params::instance().printItems_ & Params::prTag) {
if (!first) std::cout << " "; if (!first) std::cout << " ";
first = false; first = false;
std::cout << "0x" << std::setw(4) << std::setfill('0') std::cout << "0x" << std::setw(4) << std::setfill('0')
<< std::right << std::hex << std::right << std::hex
<< md->tag(); << md->tag();
} }
@ -648,7 +648,7 @@ namespace Action {
if (Params::instance().printItems_ & Params::prValue) { if (Params::instance().printItems_ & Params::prValue) {
if (!first) std::cout << " "; if (!first) std::cout << " ";
first = false; first = false;
if ( Params::instance().binary_ if ( Params::instance().binary_
&& md->typeId() == Exiv2::undefined && md->typeId() == Exiv2::undefined
&& md->size() > 100) { && md->size() > 100) {
std::cout << "(Binary value suppressed)" << std::endl; std::cout << "(Binary value suppressed)" << std::endl;
@ -659,7 +659,7 @@ namespace Action {
if (Params::instance().printItems_ & Params::prTrans) { if (Params::instance().printItems_ & Params::prTrans) {
if (!first) std::cout << " "; if (!first) std::cout << " ";
first = false; first = false;
if ( Params::instance().binary_ if ( Params::instance().binary_
&& md->typeId() == Exiv2::undefined && md->typeId() == Exiv2::undefined
&& md->size() > 100) { && md->size() > 100) {
std::cout << "(Binary value suppressed)" << std::endl; std::cout << "(Binary value suppressed)" << std::endl;
@ -670,7 +670,7 @@ namespace Action {
if (Params::instance().printItems_ & Params::prHex) { if (Params::instance().printItems_ & Params::prHex) {
if (!first) std::cout << std::endl; if (!first) std::cout << std::endl;
first = false; first = false;
if ( Params::instance().binary_ if ( Params::instance().binary_
&& md->typeId() == Exiv2::undefined && md->typeId() == Exiv2::undefined
&& md->size() > 100) { && md->size() > 100) {
std::cout << "(Binary value suppressed)" << std::endl; std::cout << "(Binary value suppressed)" << std::endl;

@ -58,7 +58,7 @@
@section supp Support @section supp Support
<p>Please write to the <p>Please write to the
<a title="Exiv2 forum" href="http://uk.groups.yahoo.com/group/exiv2">Yahoo! group for Exiv2 help and discussions</a>.</p> <a title="Exiv2 forum" href="http://uk.groups.yahoo.com/group/exiv2">Yahoo! group for Exiv2 help and discussions</a>.</p>
<p><a title="Join the Exiv2 forum" href="http://uk.groups.yahoo.com/group/exiv2/join">Join the group</a> to post and receive messages or use <em><a title="Post to the Exiv2 forum" href="http://uk.groups.yahoo.com/group/exiv2/post">exiv2user/password</a></em> to post anonymously. Bug reports can be submitted directly to the <p><a title="Join the Exiv2 forum" href="http://uk.groups.yahoo.com/group/exiv2/join">Join the group</a> to post and receive messages or use <em><a title="Post to the Exiv2 forum" href="http://uk.groups.yahoo.com/group/exiv2/post">exiv2user/password</a></em> to post anonymously. Bug reports can be submitted directly to the
<a title="Issue tracker" href="http://dev.robotbattle.com/bugs/main_page.php" <a title="Issue tracker" href="http://dev.robotbattle.com/bugs/main_page.php"

@ -1069,7 +1069,7 @@ namespace Exiv2 {
if (md->sizeDataArea() == 0) { if (md->sizeDataArea() == 0) {
DataBuf buf(md->size()); DataBuf buf(md->size());
// Hack: Use byte order from the entry if there is one // Hack: Use byte order from the entry if there is one
md->copy(buf.pData_, entry->byteOrder() == invalidByteOrder md->copy(buf.pData_, entry->byteOrder() == invalidByteOrder
? byteOrder : entry->byteOrder()); ? byteOrder : entry->byteOrder());
entry->setValue(static_cast<uint16_t>(md->typeId()), entry->setValue(static_cast<uint16_t>(md->typeId()),
md->count(), md->count(),

@ -20,7 +20,7 @@
*/ */
/*! /*!
@file exiv2_version.h @file exiv2_version.h
@brief Define to check the %Exiv2 version. The %Exiv2 library itself does not @brief Define to check the %Exiv2 version. The %Exiv2 library itself does not
use the defines in this file, they are meant for use by applications. use the defines in this file, they are meant for use by applications.
References: Similar versioning defines are used in KDE, GTK and other References: Similar versioning defines are used in KDE, GTK and other
libraries. See http://apr.apache.org/versioning.html for accompanying libraries. See http://apr.apache.org/versioning.html for accompanying
@ -46,7 +46,7 @@
*/ */
#define EXIV2_PATCH_VERSION (0) #define EXIV2_PATCH_VERSION (0)
/*! /*!
@brief Make an integer version number for comparison from a major, minor and @brief Make an integer version number for comparison from a major, minor and
a patch version number. a patch version number.
*/ */
#define EXIV2_MAKE_VERSION(major,minor,patch) \ #define EXIV2_MAKE_VERSION(major,minor,patch) \
@ -57,7 +57,7 @@
#define EXIV2_VERSION \ #define EXIV2_VERSION \
EXIV2_MAKE_VERSION(EXIV2_MAJOR_VERSION,EXIV2_MINOR_VERSION,EXIV2_PATCH_VERSION) EXIV2_MAKE_VERSION(EXIV2_MAJOR_VERSION,EXIV2_MINOR_VERSION,EXIV2_PATCH_VERSION)
/*! /*!
@brief Check the version of the %Exiv2 library. Return TRUE if the version of @brief Check the version of the %Exiv2 library. Return TRUE if the version of
%Exiv2 is the same as or newer than the passed-in version. %Exiv2 is the same as or newer than the passed-in version.
Versions are denoted using a standard triplet of integers: Versions are denoted using a standard triplet of integers:

@ -235,7 +235,7 @@ namespace Exiv2 {
*/ */
const byte* dataArea() const { return pDataArea_; } const byte* dataArea() const { return pDataArea_; }
/*! /*!
@brief Return the byte order of the entry. There should generally @brief Return the byte order of the entry. There should generally
not be a need for this, it is only used in special cases not be a need for this, it is only used in special cases
(Minolta Makernote CameraSettings tags). (Minolta Makernote CameraSettings tags).
*/ */

@ -65,7 +65,7 @@ namespace Exiv2 {
const uint16_t Photoshop::iptc_ = 0x0404; const uint16_t Photoshop::iptc_ = 0x0404;
// Todo: Generalised from JpegBase::locateIptcData without really understanding // Todo: Generalised from JpegBase::locateIptcData without really understanding
// the format (in particular the header). So it remains to be confirmed // the format (in particular the header). So it remains to be confirmed
// if this also makes sense for psTag != Photoshop::iptc // if this also makes sense for psTag != Photoshop::iptc
int Photoshop::locateIrb(const byte* pPsData, int Photoshop::locateIrb(const byte* pPsData,
long sizePsData, long sizePsData,
@ -492,8 +492,8 @@ namespace Exiv2 {
if (psData.size_ > 0 || iptcData_.count() > 0) { if (psData.size_ > 0 || iptcData_.count() > 0) {
// Set the new IPTC IRB, keeps existing IRBs but removes the // Set the new IPTC IRB, keeps existing IRBs but removes the
// IPTC block if there is no new IPTC data to write // IPTC block if there is no new IPTC data to write
DataBuf newPsData = Photoshop::setIptcIrb(psData.pData_, DataBuf newPsData = Photoshop::setIptcIrb(psData.pData_,
psData.size_, psData.size_,
iptcData_); iptcData_);
if (newPsData.size_ > 0) { if (newPsData.size_ > 0) {
// Write APP13 marker, new size, and ps3Id // Write APP13 marker, new size, and ps3Id
@ -503,7 +503,7 @@ namespace Exiv2 {
memcpy(tmpBuf + 4, Photoshop::ps3Id_, 14); memcpy(tmpBuf + 4, Photoshop::ps3Id_, 14);
if (outIo.write(tmpBuf, 18) != 18) throw Error(21); if (outIo.write(tmpBuf, 18) != 18) throw Error(21);
if (outIo.error()) throw Error(21); if (outIo.error()) throw Error(21);
// Write new Photoshop IRB data buffer // Write new Photoshop IRB data buffer
if ( outIo.write(newPsData.pData_, newPsData.size_) if ( outIo.write(newPsData.pData_, newPsData.size_)
!= newPsData.size_) throw Error(21); != newPsData.size_) throw Error(21);

@ -57,7 +57,7 @@ namespace Exiv2 {
} }
/*! /*!
@brief Helper class, has methods to deal with %Photoshop "Information @brief Helper class, has methods to deal with %Photoshop "Information
Resource Blocks" (IRBs). Resource Blocks" (IRBs).
*/ */
struct Photoshop { struct Photoshop {
@ -105,7 +105,7 @@ namespace Exiv2 {
@param sizePsData Size of the IRB buffer, may be 0 @param sizePsData Size of the IRB buffer, may be 0
@param iptcData Iptc data to embed, may be empty @param iptcData Iptc data to embed, may be empty
@return A data buffer containing the new IRB buffer, may have 0 size @return A data buffer containing the new IRB buffer, may have 0 size
*/ */
static DataBuf setIptcIrb(const byte* pPsData, static DataBuf setIptcIrb(const byte* pPsData,
long sizePsData, long sizePsData,
const IptcData& iptcData); const IptcData& iptcData);

@ -76,8 +76,8 @@ namespace Exiv2 {
{ {
TiffComponent* tc = 0; TiffComponent* tc = 0;
const TiffMnRegistry* tmr = find(registry_, TiffMnRegistry::Key(make)); const TiffMnRegistry* tmr = find(registry_, TiffMnRegistry::Key(make));
if (tmr) tc = tmr->newMnFct_(tag, if (tmr) tc = tmr->newMnFct_(tag,
group, group,
tmr->mnGroup_, tmr->mnGroup_,
pData, pData,
size, size,
@ -93,22 +93,22 @@ namespace Exiv2 {
uint32_t TiffIfdMakernote::ifdOffset() const uint32_t TiffIfdMakernote::ifdOffset() const
{ {
if (!pHeader_) return 0; if (!pHeader_) return 0;
return pHeader_->ifdOffset(); return pHeader_->ifdOffset();
} }
ByteOrder TiffIfdMakernote::byteOrder () const ByteOrder TiffIfdMakernote::byteOrder () const
{ {
if (!pHeader_) return invalidByteOrder; if (!pHeader_) return invalidByteOrder;
return pHeader_->byteOrder(); return pHeader_->byteOrder();
} }
uint32_t TiffIfdMakernote::baseOffset(uint32_t mnOffset) const uint32_t TiffIfdMakernote::baseOffset(uint32_t mnOffset) const
{ {
if (!pHeader_) return 0; if (!pHeader_) return 0;
return pHeader_->baseOffset(mnOffset); return pHeader_->baseOffset(mnOffset);
} }
bool TiffIfdMakernote::readHeader(const byte* pData, bool TiffIfdMakernote::readHeader(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder) ByteOrder byteOrder)
{ {
@ -143,8 +143,8 @@ namespace Exiv2 {
read(signature_, size_, invalidByteOrder); read(signature_, size_, invalidByteOrder);
} }
bool OlympusMnHeader::read(const byte* pData, bool OlympusMnHeader::read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
assert (pData != 0); assert (pData != 0);
@ -153,7 +153,7 @@ namespace Exiv2 {
header_.alloc(size_); header_.alloc(size_);
memcpy(header_.pData_, pData, header_.size_); memcpy(header_.pData_, pData, header_.size_);
if ( static_cast<uint32_t>(header_.size_) < size_ if ( static_cast<uint32_t>(header_.size_) < size_
|| 0 != memcmp(header_.pData_, signature_, 5)) { || 0 != memcmp(header_.pData_, signature_, 5)) {
return false; return false;
} }
@ -172,7 +172,7 @@ namespace Exiv2 {
} }
bool FujiMnHeader::read(const byte* pData, bool FujiMnHeader::read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
assert (pData != 0); assert (pData != 0);
@ -186,7 +186,7 @@ namespace Exiv2 {
// from the header. Note that we ignore the byteOrder argument // from the header. Note that we ignore the byteOrder argument
start_ = getULong(header_.pData_ + 8, byteOrder_); start_ = getULong(header_.pData_ + 8, byteOrder_);
if ( static_cast<uint32_t>(header_.size_) < size_ if ( static_cast<uint32_t>(header_.size_) < size_
|| 0 != memcmp(header_.pData_, signature_, 8)) { || 0 != memcmp(header_.pData_, signature_, 8)) {
return false; return false;
} }
@ -205,7 +205,7 @@ namespace Exiv2 {
} }
bool Nikon2MnHeader::read(const byte* pData, bool Nikon2MnHeader::read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
assert (pData != 0); assert (pData != 0);
@ -231,7 +231,7 @@ namespace Exiv2 {
} }
bool Nikon3MnHeader::read(const byte* pData, bool Nikon3MnHeader::read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
assert (pData != 0); assert (pData != 0);
@ -259,7 +259,7 @@ namespace Exiv2 {
} }
bool PanasonicMnHeader::read(const byte* pData, bool PanasonicMnHeader::read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
assert (pData != 0); assert (pData != 0);
@ -287,7 +287,7 @@ namespace Exiv2 {
} }
bool SigmaMnHeader::read(const byte* pData, bool SigmaMnHeader::read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
assert (pData != 0); assert (pData != 0);
@ -313,7 +313,7 @@ namespace Exiv2 {
} }
bool SonyMnHeader::read(const byte* pData, bool SonyMnHeader::read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
assert (pData != 0); assert (pData != 0);
@ -334,7 +334,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* /*pData*/, const byte* /*pData*/,
uint32_t /*size*/, uint32_t /*size*/,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
return new TiffIfdMakernote(tag, group, mnGroup, 0); return new TiffIfdMakernote(tag, group, mnGroup, 0);
@ -344,7 +344,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* /*pData*/, const byte* /*pData*/,
uint32_t /*size*/, uint32_t /*size*/,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
return new TiffIfdMakernote(tag, group, mnGroup, 0); return new TiffIfdMakernote(tag, group, mnGroup, 0);
@ -354,7 +354,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* /*pData*/, const byte* /*pData*/,
uint32_t /*size*/, uint32_t /*size*/,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
return new TiffIfdMakernote(tag, group, mnGroup, new OlympusMnHeader); return new TiffIfdMakernote(tag, group, mnGroup, new OlympusMnHeader);
@ -364,7 +364,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* /*pData*/, const byte* /*pData*/,
uint32_t /*size*/, uint32_t /*size*/,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
return new TiffIfdMakernote(tag, group, mnGroup, new FujiMnHeader); return new TiffIfdMakernote(tag, group, mnGroup, new FujiMnHeader);
@ -398,7 +398,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* /*pData*/, const byte* /*pData*/,
uint32_t /*size*/, uint32_t /*size*/,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
return new TiffIfdMakernote(tag, group, mnGroup, new PanasonicMnHeader, false); return new TiffIfdMakernote(tag, group, mnGroup, new PanasonicMnHeader, false);
@ -408,7 +408,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* /*pData*/, const byte* /*pData*/,
uint32_t /*size*/, uint32_t /*size*/,
ByteOrder /*byteOrder*/) ByteOrder /*byteOrder*/)
{ {
return new TiffIfdMakernote(tag, group, mnGroup, new SigmaMnHeader); return new TiffIfdMakernote(tag, group, mnGroup, new SigmaMnHeader);

@ -72,8 +72,8 @@ namespace Exiv2 {
typedef TiffComponent* (*NewMnFct)(uint16_t tag, typedef TiffComponent* (*NewMnFct)(uint16_t tag,
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//! Makernote registry structure //! Makernote registry structure
@ -101,14 +101,14 @@ namespace Exiv2 {
}; };
/*! /*!
@brief TIFF makernote factory for concrete TIFF makernotes. @brief TIFF makernote factory for concrete TIFF makernotes.
*/ */
class TiffMnCreator { class TiffMnCreator {
public: public:
/*! /*!
@brief Create the Makernote for camera \em make and details from @brief Create the Makernote for camera \em make and details from
the makernote entry itself if needed. Return a pointer to the makernote entry itself if needed. Return a pointer to
the newly created TIFF component. Set tag and group of the the newly created TIFF component. Set tag and group of the
new component to \em tag and \em group. new component to \em tag and \em group.
@note Ownership for the component is transferred to the caller, @note Ownership for the component is transferred to the caller,
who is responsible to delete the component. No smart pointer who is responsible to delete the component. No smart pointer
@ -135,11 +135,11 @@ namespace Exiv2 {
//@{ //@{
//! Virtual destructor. //! Virtual destructor.
virtual ~MnHeader() {} virtual ~MnHeader() {}
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
//! Read the header from a data buffer, return true if ok //! Read the header from a data buffer, return true if ok
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder) =0; ByteOrder byteOrder) =0;
//@} //@}
@ -159,7 +159,7 @@ namespace Exiv2 {
*/ */
virtual ByteOrder byteOrder() const { return invalidByteOrder; } virtual ByteOrder byteOrder() const { return invalidByteOrder; }
/*! /*!
@brief Return the base offset for the makernote IFD entries relative @brief Return the base offset for the makernote IFD entries relative
to the start of the TIFF header. to the start of the TIFF header.
@param mnOffset Offset to the makernote from the start of the @param mnOffset Offset to the makernote from the start of the
@ -171,7 +171,7 @@ namespace Exiv2 {
}; // class MnHeader }; // class MnHeader
/*! /*!
@brief Tiff IFD Makernote. This is a concrete class suitable for all @brief Tiff IFD Makernote. This is a concrete class suitable for all
IFD makernotes. IFD makernotes.
Contains a makernote header (which can be 0) and an IFD and Contains a makernote header (which can be 0) and an IFD and
@ -185,12 +185,12 @@ namespace Exiv2 {
//! @name Creators //! @name Creators
//@{ //@{
//! Default constructor //! Default constructor
TiffIfdMakernote(uint16_t tag, TiffIfdMakernote(uint16_t tag,
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
MnHeader* pHeader, MnHeader* pHeader,
bool hasNext =true) bool hasNext =true)
: TiffComponent(tag, group), : TiffComponent(tag, group),
pHeader_(pHeader), pHeader_(pHeader),
ifd_(tag, mnGroup, hasNext) {} ifd_(tag, mnGroup, hasNext) {}
//! Virtual destructor //! Virtual destructor
@ -221,8 +221,8 @@ namespace Exiv2 {
*/ */
ByteOrder byteOrder() const; ByteOrder byteOrder() const;
/*! /*!
@brief Return the base offset for the makernote IFD entries relative @brief Return the base offset for the makernote IFD entries relative
to the start of the TIFF header. The default, if there is no to the start of the TIFF header. The default, if there is no
header, is 0. header, is 0.
@param mnOffset Offset to the makernote from the start of the @param mnOffset Offset to the makernote from the start of the
@ -243,7 +243,7 @@ namespace Exiv2 {
// DATA // DATA
MnHeader* pHeader_; //!< Makernote header MnHeader* pHeader_; //!< Makernote header
TiffDirectory ifd_; //!< Makernote IFD TiffDirectory ifd_; //!< Makernote IFD
}; // class TiffIfdMakernote }; // class TiffIfdMakernote
//! Header of an Olympus Makernote //! Header of an Olympus Makernote
@ -258,7 +258,7 @@ namespace Exiv2 {
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//@} //@}
@ -287,8 +287,8 @@ namespace Exiv2 {
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//@} //@}
//! @name Accessors //! @name Accessors
@ -320,8 +320,8 @@ namespace Exiv2 {
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//@} //@}
//! @name Accessors //! @name Accessors
@ -350,8 +350,8 @@ namespace Exiv2 {
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//@} //@}
//! @name Accessors //! @name Accessors
@ -383,8 +383,8 @@ namespace Exiv2 {
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//@} //@}
//! @name Accessors //! @name Accessors
@ -413,8 +413,8 @@ namespace Exiv2 {
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//@} //@}
//! @name Accessors //! @name Accessors
@ -444,8 +444,8 @@ namespace Exiv2 {
//@} //@}
//! @name Manipulators //! @name Manipulators
//@{ //@{
virtual bool read(const byte* pData, virtual bool read(const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//@} //@}
//! @name Accessors //! @name Accessors
@ -470,7 +470,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//! Function to create a Minolta makernote //! Function to create a Minolta makernote
@ -478,7 +478,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//! Function to create an Olympus makernote //! Function to create an Olympus makernote
@ -486,7 +486,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//! Function to create a Fujifilm makernote //! Function to create a Fujifilm makernote
@ -494,18 +494,18 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
/*! /*!
@brief Function to create a Nikon makernote. This will create the @brief Function to create a Nikon makernote. This will create the
appropriate Nikon 1, 2 or 3 makernote, based on the arguments. appropriate Nikon 1, 2 or 3 makernote, based on the arguments.
*/ */
TiffComponent* newNikonMn(uint16_t tag, TiffComponent* newNikonMn(uint16_t tag,
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//! Function to create a Panasonic makernote //! Function to create a Panasonic makernote
@ -513,7 +513,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//! Function to create a Sigma makernote //! Function to create a Sigma makernote
@ -521,7 +521,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
//! Function to create a Sony makernote //! Function to create a Sony makernote
@ -529,7 +529,7 @@ namespace Exiv2 {
uint16_t group, uint16_t group,
uint16_t mnGroup, uint16_t mnGroup,
const byte* pData, const byte* pData,
uint32_t size, uint32_t size,
ByteOrder byteOrder); ByteOrder byteOrder);
} // namespace Exiv2 } // namespace Exiv2

@ -174,7 +174,7 @@ namespace Exiv2 {
virtual std::string key() const =0; virtual std::string key() const =0;
//! Return the name of the tag (which is also the third part of the key) //! Return the name of the tag (which is also the third part of the key)
virtual std::string tagName() const =0; virtual std::string tagName() const =0;
//! Return a label for the tag //! Return a label for the tag
virtual std::string tagLabel() const =0; virtual std::string tagLabel() const =0;
//! Return the tag //! Return the tag
virtual uint16_t tag() const =0; virtual uint16_t tag() const =0;

@ -88,7 +88,7 @@ namespace Exiv2 {
//! Lookup table to translate Minolta Lens id values to readable labels //! Lookup table to translate Minolta Lens id values to readable labels
extern const TagDetails minoltaLensID[] = { extern const TagDetails minoltaLensID[] = {
{ 1, "AF80-200mm F2.8G" }, { 1, "AF80-200mm F2.8G" },
{ 2, "AF28-70mm F2.8G" }, { 2, "AF28-70mm F2.8G" },
{ 6, "AF24-85mm F3.5-4.5" }, { 6, "AF24-85mm F3.5-4.5" },
{ 7, "AF100-400mm F4.5-6.7(D)" }, { 7, "AF100-400mm F4.5-6.7(D)" },
{ 8, "AF70-210mm F4.5-5.6" }, { 8, "AF70-210mm F4.5-5.6" },
@ -103,42 +103,42 @@ namespace Exiv2 {
{ 25, "AF100-300mm F4.5-5.6(D)" }, { 25, "AF100-300mm F4.5-5.6(D)" },
{ 27, "AF85mm F1.4G" }, { 27, "AF85mm F1.4G" },
{ 28, "AF100mm F2.8 Macro(D)" }, { 28, "AF100mm F2.8 Macro(D)" },
{ 29, "AF75-300mm F4.5-5.6(D)" }, { 29, "AF75-300mm F4.5-5.6(D)" },
{ 30, "AF28-80mm F3.5-5.6(D)" }, { 30, "AF28-80mm F3.5-5.6(D)" },
{ 31, "AF50mm F2.8 Macro(D) or AF50mm F3.5 Macro" }, { 31, "AF50mm F2.8 Macro(D) or AF50mm F3.5 Macro" },
{ 32, "AF100-400mm F4.5-6.7(D) x1.5" }, { 32, "AF100-400mm F4.5-6.7(D) x1.5" },
{ 33, "AF70-200mm F2.8G SSM" }, { 33, "AF70-200mm F2.8G SSM" },
{ 35, "AF85mm F1.4G(D) Limited" }, { 35, "AF85mm F1.4G(D) Limited" },
{ 38, "AF17-35mm F2.8-4(D)" }, { 38, "AF17-35mm F2.8-4(D)" },
{ 39, "AF28-75mm F2.8(D)" }, { 39, "AF28-75mm F2.8(D)" },
{ 40, "AFDT18-70mm F3.5-5.6(D)" }, { 40, "AFDT18-70mm F3.5-5.6(D)" },
{ 41, "TAMRON Di II LD 11-18mm F4-5.6" }, { 41, "TAMRON Di II LD 11-18mm F4-5.6" },
{ 128, "TAMRON 18-200, 28-300 or 80-300mm F3.5-6.3" }, { 128, "TAMRON 18-200, 28-300 or 80-300mm F3.5-6.3" },
{ 25501, "AF50mm F1.7" }, { 25501, "AF50mm F1.7" },
{ 25521, "TOKINA 19-35mm F3.5-4.5 or TOKINA 28-70mm F2.8 AT-X" }, { 25521, "TOKINA 19-35mm F3.5-4.5 or TOKINA 28-70mm F2.8 AT-X" },
{ 25541, "AF35-105mm F3.5-4.5" }, { 25541, "AF35-105mm F3.5-4.5" },
{ 25551, "AF70-210mm F4 Macro or SIGMA 70-210mm F4-5.6 APO" }, { 25551, "AF70-210mm F4 Macro or SIGMA 70-210mm F4-5.6 APO" },
{ 25581, "AF24-50mm F4" }, { 25581, "AF24-50mm F4" },
{ 25611, "SIGMA 70-300mm F4-5.6 or SIGMA 300mm F4 APO Macro" }, { 25611, "SIGMA 70-300mm F4-5.6 or SIGMA 300mm F4 APO Macro" },
{ 25621, "AF50mm F1.4 NEW" }, { 25621, "AF50mm F1.4 NEW" },
{ 25631, "AF300mm F2.8G" }, { 25631, "AF300mm F2.8G" },
{ 25641, "AF50mm F2.8 Macro" }, { 25641, "AF50mm F2.8 Macro" },
{ 25661, "AF24mm F2.8" }, { 25661, "AF24mm F2.8" },
{ 25721, "AF500mm F8 Reflex" }, { 25721, "AF500mm F8 Reflex" },
{ 25781, "AF16mm F2.8 Fisheye or SIGMA 8mm F4 Fisheye" }, { 25781, "AF16mm F2.8 Fisheye or SIGMA 8mm F4 Fisheye" },
{ 25791, "AF20mm F2.8" }, { 25791, "AF20mm F2.8" },
{ 25811, "AF100mm F2.8 Macro(D) or TAMRON 90mm F2.8 Macro or SIGMA 180mm F5.6 Macro" }, { 25811, "AF100mm F2.8 Macro(D) or TAMRON 90mm F2.8 Macro or SIGMA 180mm F5.6 Macro" },
{ 25858, "TAMRON 24-135mm F3.5-5.6" }, { 25858, "TAMRON 24-135mm F3.5-5.6" },
{ 25891, "TOKINA 80-200mm F2.8" }, { 25891, "TOKINA 80-200mm F2.8" },
{ 25921, "AF85mm F1.4G(D)" }, { 25921, "AF85mm F1.4G(D)" },
{ 25931, "AF200mm F2.8G" }, { 25931, "AF200mm F2.8G" },
{ 25961, "AF28mm F2" }, { 25961, "AF28mm F2" },
{ 25981, "AF100mm F2" }, { 25981, "AF100mm F2" },
{ 26061, "AF100-300mm F4.5-5.6(D) or SIGMA 105mm F2.8 Macro EX-DG" }, { 26061, "AF100-300mm F4.5-5.6(D) or SIGMA 105mm F2.8 Macro EX-DG" },
{ 26081, "AF300mm F2.8G" }, { 26081, "AF300mm F2.8G" },
{ 26121, "AF200mm F2.8G(D)" }, { 26121, "AF200mm F2.8G(D)" },
{ 26131, "AF50mm F1.7" }, { 26131, "AF50mm F1.7" },
{ 26241, "AF35-80mm F4-5.6" }, { 26241, "AF35-80mm F4-5.6" },
{ 45741, "AF200mm F2.8G x2 or TOKINA 300mm F2.8 x2" } { 45741, "AF200mm F2.8G x2 or TOKINA 300mm F2.8 x2" }
}; };
@ -155,13 +155,13 @@ namespace Exiv2 {
TagInfo(0x0089, "ThumbnailLength", "Thumbnail Length", "Size of the thumbnail", minoltaIfdId, makerTags, unsignedLong, printValue), TagInfo(0x0089, "ThumbnailLength", "Thumbnail Length", "Size of the thumbnail", minoltaIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x0101, "ColorMode", "Color Mode", "Color mode", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaColorMode)), TagInfo(0x0101, "ColorMode", "Color Mode", "Color mode", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaColorMode)),
TagInfo(0x0102, "Quality", "Image Quality", "Image quality", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaImageQuality)), TagInfo(0x0102, "Quality", "Image Quality", "Image quality", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaImageQuality)),
// TODO: Tag 0x0103 : quality or image size (see ExifTool doc). // TODO: Tag 0x0103 : quality or image size (see ExifTool doc).
TagInfo(0x0107, "ImageStabilization", "Image Stabilization", "Image stabilization", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaImageStabilization)), TagInfo(0x0107, "ImageStabilization", "Image Stabilization", "Image stabilization", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaImageStabilization)),
TagInfo(0x010a, "ZoneMatching", "Zone Matching", "Zone matching", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaZoneMatching)), TagInfo(0x010a, "ZoneMatching", "Zone Matching", "Zone matching", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaZoneMatching)),
TagInfo(0x010b, "ColorTemperature", "Color Temperature", "Color temperature", minoltaIfdId, makerTags, unsignedLong, printValue), TagInfo(0x010b, "ColorTemperature", "Color Temperature", "Color temperature", minoltaIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x010c, "LensID", "Lens ID", "Lens ID", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaLensID)), TagInfo(0x010c, "LensID", "Lens ID", "Lens ID", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaLensID)),
TagInfo(0x0114, "CameraSettings5D", "Camera Settings (5D)", "Camera Settings (for Dynax 5D model)", minoltaIfdId, makerTags, undefined, printValue), TagInfo(0x0114, "CameraSettings5D", "Camera Settings (5D)", "Camera Settings (for Dynax 5D model)", minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x0e00, "PIM_IFD", "PIM IFD", "PIM information", minoltaIfdId, makerTags, undefined, printValue), TagInfo(0x0e00, "PIM_IFD", "PIM IFD", "PIM information", minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x0f00, "CameraSettingsZ1", "Camera Settings (Z1)", "Camera Settings (for Z1, DImage X, and F100 models)", minoltaIfdId, makerTags, undefined, printValue), TagInfo(0x0f00, "CameraSettingsZ1", "Camera Settings (Z1)", "Camera Settings (for Z1, DImage X, and F100 models)", minoltaIfdId, makerTags, undefined, printValue),
@ -187,7 +187,7 @@ namespace Exiv2 {
{ 2, "Rear flash sync" }, { 2, "Rear flash sync" },
{ 3, "Wireless" } { 3, "Wireless" }
}; };
//! Lookup table to translate Minolta Std camera settings white balance values to readable labels //! Lookup table to translate Minolta Std camera settings white balance values to readable labels
extern const TagDetails minoltaWhiteBalanceStd[] = { extern const TagDetails minoltaWhiteBalanceStd[] = {
{ 0, "Auto" }, { 0, "Auto" },
@ -348,7 +348,7 @@ namespace Exiv2 {
//! Lookup table to translate Minolta Std camera settings internal flash values to readable labels //! Lookup table to translate Minolta Std camera settings internal flash values to readable labels
extern const TagDetails minoltaInternalFlashStd[] = { extern const TagDetails minoltaInternalFlashStd[] = {
{ 0, "Did not fire" }, { 0, "Did not fire" },
{ 1, "Fired" } { 1, "Fired" }
}; };
//! Lookup table to translate Minolta Std camera settings wide focus zone values to readable labels //! Lookup table to translate Minolta Std camera settings wide focus zone values to readable labels
@ -405,28 +405,28 @@ namespace Exiv2 {
std::ostream& MinoltaMakerNote::printMinoltaExposureSpeedStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaExposureSpeedStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << (value.toLong()/8)-1; os << (value.toLong()/8)-1;
return os; return os;
} }
std::ostream& MinoltaMakerNote::printMinoltaExposureTimeStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaExposureTimeStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << (value.toLong()/8)-6; os << (value.toLong()/8)-6;
return os; return os;
} }
std::ostream& MinoltaMakerNote::printMinoltaFNumberStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaFNumberStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << (value.toLong()/8)-1; os << (value.toLong()/8)-1;
return os; return os;
} }
std::ostream& MinoltaMakerNote::printMinoltaExposureCompensationStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaExposureCompensationStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << value.toLong()/256; os << value.toLong()/256;
return os; return os;
} }
@ -441,17 +441,17 @@ namespace Exiv2 {
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << value.toLong() / 65536 << ":" << std::right << std::setw(2) << std::setfill('0') os << value.toLong() / 65536 << ":" << std::right << std::setw(2) << std::setfill('0')
<< (value.toLong() - value.toLong() / 65536 * 65536) / 256 << ":" << (value.toLong() - value.toLong() / 65536 * 65536) / 256 << ":"
<< std::right << std::setw(2) << std::setfill('0') << value.toLong() % 256; << std::right << std::setw(2) << std::setfill('0') << value.toLong() % 256;
return os; return os;
} }
std::ostream& MinoltaMakerNote::printMinoltaTimeStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaTimeStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << std::right << std::setw(2) << std::setfill('0') << value.toLong() / 65536 os << std::right << std::setw(2) << std::setfill('0') << value.toLong() / 65536
<< ":" << std::right << std::setw(2) << std::setfill('0') << ":" << std::right << std::setw(2) << std::setfill('0')
<< (value.toLong() - value.toLong() / 65536 * 65536) / 256 << ":" << (value.toLong() - value.toLong() / 65536 * 65536) / 256 << ":"
<< std::right << std::setw(2) << std::setfill('0') << value.toLong() % 256; << std::right << std::setw(2) << std::setfill('0') << value.toLong() % 256;
return os; return os;
} }
@ -459,21 +459,21 @@ namespace Exiv2 {
std::ostream& MinoltaMakerNote::printMinoltaFlashExposureCompStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaFlashExposureCompStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << (value.toLong()-6)/3; os << (value.toLong()-6)/3;
return os; return os;
} }
std::ostream& MinoltaMakerNote::printMinoltaWhiteBalanceStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaWhiteBalanceStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << value.toLong()/256; os << value.toLong()/256;
return os; return os;
} }
std::ostream& MinoltaMakerNote::printMinoltaBrightnessStd(std::ostream& os, const Value& value) std::ostream& MinoltaMakerNote::printMinoltaBrightnessStd(std::ostream& os, const Value& value)
{ {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
os << (value.toLong()/8)-6; os << (value.toLong()/8)-6;
return os; return os;
} }
@ -1167,7 +1167,7 @@ namespace Exiv2 {
// ***************************************************************************** // *****************************************************************************
// free functions // free functions
MakerNote::AutoPtr createMinoltaMakerNote(bool alloc, const byte* /*buf*/, long /*len*/, MakerNote::AutoPtr createMinoltaMakerNote(bool alloc, const byte* /*buf*/, long /*len*/,
ByteOrder /*byteOrder*/, long /*offset*/) ByteOrder /*byteOrder*/, long /*offset*/)
{ {
return MakerNote::AutoPtr(new MinoltaMakerNote(alloc)); return MakerNote::AutoPtr(new MinoltaMakerNote(alloc));

@ -156,7 +156,7 @@ namespace Exiv2 {
//! Print Exposure Compensation setting from 5D Minolta Camera Settings makernote //! Print Exposure Compensation setting from 5D Minolta Camera Settings makernote
static std::ostream& printMinoltaExposureCompensation5D(std::ostream& os, const Value& value); static std::ostream& printMinoltaExposureCompensation5D(std::ostream& os, const Value& value);
//@} //@}
//! @cond IGNORE //! @cond IGNORE
// Public only so that we can create a static instance // Public only so that we can create a static instance
struct RegisterMn { struct RegisterMn {

@ -133,7 +133,7 @@ namespace Exiv2 {
uint32_t pos = len; uint32_t pos = len;
uint32_t const end = getULong(tmp + 4, bigEndian); uint32_t const end = getULong(tmp + 4, bigEndian);
pos += len; pos += len;
if (pos > end) throw Error(14); if (pos > end) throw Error(14);
io_->read(tmp, len); io_->read(tmp, len);
if (io_->error() || io_->eof()) throw Error(14); if (io_->error() || io_->eof()) throw Error(14);
@ -144,7 +144,7 @@ namespace Exiv2 {
if (pos > end) throw Error(14); if (pos > end) throw Error(14);
io_->seek(siz, BasicIo::cur); io_->seek(siz, BasicIo::cur);
if (io_->error() || io_->eof()) throw Error(14); if (io_->error() || io_->eof()) throw Error(14);
pos += len; pos += len;
if (pos > end) throw Error(14); if (pos > end) throw Error(14);
io_->read(tmp, len); io_->read(tmp, len);

@ -210,10 +210,10 @@ namespace Exiv2 {
switch (focusPoint) { switch (focusPoint) {
// Could use array nikonFokuspoints // Could use array nikonFokuspoints
case 0: case 0:
case 1: case 1:
case 2: case 2:
case 3: case 3:
case 4: case 4:
os << nikonFocuspoints[focusPoint]; os << nikonFocuspoints[focusPoint];
break; break;
default: default:
@ -650,7 +650,7 @@ namespace Exiv2 {
unsigned focuspoint = value.toLong(1); unsigned focuspoint = value.toLong(1);
unsigned focusused = (value.toLong(2) << 8) + value.toLong(3); unsigned focusused = (value.toLong(2) << 8) + value.toLong(3);
enum {standard, wide} combination = standard; enum {standard, wide} combination = standard;
const unsigned focuspoints = sizeof(nikonFocuspoints) const unsigned focuspoints = sizeof(nikonFocuspoints)
/ sizeof(nikonFocuspoints[0]); / sizeof(nikonFocuspoints[0]);
if (focusmetering == 0 && focuspoint == 0 && focusused == 0) { if (focusmetering == 0 && focuspoint == 0 && focusused == 0) {
@ -692,7 +692,7 @@ namespace Exiv2 {
if (focusused == 0) if (focusused == 0)
os << sep << " none"; os << sep << " none";
else if (focusused != 1U<<focuspoint) { else if (focusused != 1U<<focuspoint) {
// selected point was not the actually used one // selected point was not the actually used one
// (Roger Larsson: my interpretation, verify) // (Roger Larsson: my interpretation, verify)
os << sep; os << sep;
for (unsigned fpid=0; fpid<focuspoints; fpid++) for (unsigned fpid=0; fpid<focuspoints; fpid++)

@ -404,7 +404,7 @@ namespace Exiv2 {
const char* ExifTags::tagTitle(uint16_t tag, IfdId ifdId) const char* ExifTags::tagTitle(uint16_t tag, IfdId ifdId)
{ {
return tagLabel(tag, ifdId); return tagLabel(tag, ifdId);
} // ExifTags::tagTitle } // ExifTags::tagTitle
const char* ExifTags::tagLabel(uint16_t tag, IfdId ifdId) const char* ExifTags::tagLabel(uint16_t tag, IfdId ifdId)
@ -643,7 +643,7 @@ namespace Exiv2 {
return ExifTags::tagName(tag_, ifdId_); return ExifTags::tagName(tag_, ifdId_);
} }
std::string ExifKey::tagLabel() const std::string ExifKey::tagLabel() const
{ {
return ExifTags::tagLabel(tag_, ifdId_); return ExifTags::tagLabel(tag_, ifdId_);
} }

@ -167,7 +167,7 @@ namespace Exiv2 {
*/ */
static std::string tagName(uint16_t tag, IfdId ifdId); static std::string tagName(uint16_t tag, IfdId ifdId);
/*! /*!
@brief Return the title (label) of the tag. @brief Return the title (label) of the tag.
(Deprecated, use tagLabel() instead.) (Deprecated, use tagLabel() instead.)
@param tag The tag @param tag The tag

@ -70,7 +70,7 @@ namespace Exiv2 {
{ 6, "ImageSubIfd0" }, { 6, "ImageSubIfd0" },
{ 7, "ImageSubIfd1" }, { 7, "ImageSubIfd1" },
{ 8, "ImageSubIfd2" }, { 8, "ImageSubIfd2" },
{ 9, "ImageSubIfd3" }, { 9, "ImageSubIfd3" },
{ 257, "Olympus" }, { 257, "Olympus" },
{ 258, "Fujifilm" }, { 258, "Fujifilm" },
{ 259, "Canon" }, { 259, "Canon" },
@ -107,7 +107,7 @@ namespace Exiv2 {
bool TiffStructure::operator==(const TiffStructure::Key& key) const bool TiffStructure::operator==(const TiffStructure::Key& key) const
{ {
return key.e_ == extendedTag_ && key.g_ == group_ return key.e_ == extendedTag_ && key.g_ == group_
|| Tag::all == extendedTag_ && key.g_ == group_; || Tag::all == extendedTag_ && key.g_ == group_;
} }
@ -298,7 +298,7 @@ namespace Exiv2 {
const TiffStructure* ts) const TiffStructure* ts)
{ {
assert(ts); assert(ts);
return TiffComponent::AutoPtr(new TiffDataEntry(tag, return TiffComponent::AutoPtr(new TiffDataEntry(tag,
ts->group_, ts->group_,
0x0202, 0x0202,
Group::ifd1)); Group::ifd1));
@ -308,7 +308,7 @@ namespace Exiv2 {
const TiffStructure* ts) const TiffStructure* ts)
{ {
assert(ts); assert(ts);
return TiffComponent::AutoPtr(new TiffSizeEntry(tag, return TiffComponent::AutoPtr(new TiffSizeEntry(tag,
ts->group_, ts->group_,
0x0201, 0x0201,
Group::ifd1)); Group::ifd1));

@ -20,7 +20,7 @@
*/ */
/*! /*!
@file tiffcomposite.hpp @file tiffcomposite.hpp
@brief @brief
@version $Rev$ @version $Rev$
@author Andreas Huggel (ahu) @author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@ -97,7 +97,7 @@ namespace Exiv2 {
(Composite pattern). Both TIFF directories as well as entries (Composite pattern). Both TIFF directories as well as entries
implement this interface. A component can be uniquely identified implement this interface. A component can be uniquely identified
by a tag, group tupel. This class is implemented as a NVI by a tag, group tupel. This class is implemented as a NVI
(Non-Virtual Interface) and it has an interface for visitors (Non-Virtual Interface) and it has an interface for visitors
(Visitor pattern). (Visitor pattern).
*/ */
class TiffComponent { class TiffComponent {
@ -240,7 +240,7 @@ namespace Exiv2 {
//! Return the number of components in this entry //! Return the number of components in this entry
uint32_t count() const { return count_; } uint32_t count() const { return count_; }
/*! /*!
Return the offset to the data area relative to the base for Return the offset to the data area relative to the base for
the component (usually the start of the TIFF header) the component (usually the start of the TIFF header)
*/ */
uint32_t offset() const { return offset_; } uint32_t offset() const { return offset_; }
@ -293,8 +293,8 @@ namespace Exiv2 {
@brief A standard TIFF IFD entry consisting of a value which is an offset @brief A standard TIFF IFD entry consisting of a value which is an offset
to a data area and the data area. The size of the data area is to a data area and the data area. The size of the data area is
provided in a related TiffSizeEntry, tag and group of which are set provided in a related TiffSizeEntry, tag and group of which are set
in the constructor. This component is used, e.g., for in the constructor. This component is used, e.g., for
\em Exif.Thumbnail.JPEGInterchangeFormat for which the size is \em Exif.Thumbnail.JPEGInterchangeFormat for which the size is
provided in \em Exif.Thumbnail.JPEGInterchangeFormatLength. provided in \em Exif.Thumbnail.JPEGInterchangeFormatLength.
*/ */
class TiffDataEntry : public TiffEntryBase { class TiffDataEntry : public TiffEntryBase {
@ -330,9 +330,9 @@ namespace Exiv2 {
}; // class TiffDataEntry }; // class TiffDataEntry
/*! /*!
@brief A TIFF IFD entry containing the size of a data area of a related @brief A TIFF IFD entry containing the size of a data area of a related
TiffDataEntry. This component is used, e.g. for TiffDataEntry. This component is used, e.g. for
\em Exif.Thumbnail.JPEGInterchangeFormatLength, which contains the \em Exif.Thumbnail.JPEGInterchangeFormatLength, which contains the
size of \em Exif.Thumbnail.JPEGInterchangeFormat. size of \em Exif.Thumbnail.JPEGInterchangeFormat.
*/ */
class TiffSizeEntry : public TiffEntryBase { class TiffSizeEntry : public TiffEntryBase {
@ -478,8 +478,8 @@ namespace Exiv2 {
}; // class TiffMnEntry }; // class TiffMnEntry
/*! /*!
@brief Composite to model an array of tags, each consisting of one @brief Composite to model an array of tags, each consisting of one
unsigned short value. Canon and Minolta makernotes use such tags. unsigned short value. Canon and Minolta makernotes use such tags.
The elements of this component are usually of type The elements of this component are usually of type
TiffArrayElement. TiffArrayElement.
*/ */
@ -488,12 +488,12 @@ namespace Exiv2 {
//! @name Creators //! @name Creators
//@{ //@{
//! Default constructor //! Default constructor
TiffArrayEntry(uint16_t tag, TiffArrayEntry(uint16_t tag,
uint16_t group, uint16_t group,
uint16_t elGroup, uint16_t elGroup,
uint16_t elSize) uint16_t elSize)
: TiffEntryBase(tag, group), : TiffEntryBase(tag, group),
elSize_(elSize), elSize_(elSize),
elGroup_(elGroup) {} elGroup_(elGroup) {}
//! Virtual destructor //! Virtual destructor
virtual ~TiffArrayEntry(); virtual ~TiffArrayEntry();
@ -523,7 +523,7 @@ namespace Exiv2 {
/*! /*!
@brief Element of a TiffArrayEntry. The value is exactly one unsigned @brief Element of a TiffArrayEntry. The value is exactly one unsigned
short component. Canon and Minolta makernotes use arrays of short component. Canon and Minolta makernotes use arrays of
such elements. such elements.
*/ */
class TiffArrayElement : public TiffEntryBase { class TiffArrayElement : public TiffEntryBase {
@ -531,12 +531,12 @@ namespace Exiv2 {
//! @name Creators //! @name Creators
//@{ //@{
//! Constructor //! Constructor
TiffArrayElement(uint16_t tag, TiffArrayElement(uint16_t tag,
uint16_t group, uint16_t group,
TypeId elTypeId, TypeId elTypeId,
ByteOrder elByteOrder) ByteOrder elByteOrder)
: TiffEntryBase(tag, group), : TiffEntryBase(tag, group),
elTypeId_(elTypeId), elTypeId_(elTypeId),
elByteOrder_(elByteOrder) {} elByteOrder_(elByteOrder) {}
//! Virtual destructor. //! Virtual destructor.
virtual ~TiffArrayElement() {} virtual ~TiffArrayElement() {}
@ -557,7 +557,7 @@ namespace Exiv2 {
private: private:
// DATA // DATA
TypeId elTypeId_; //!< Type of the element TypeId elTypeId_; //!< Type of the element
ByteOrder elByteOrder_; //!< Byte order to read/write the element ByteOrder elByteOrder_; //!< Byte order to read/write the element
}; // class TiffArrayElement }; // class TiffArrayElement

@ -52,8 +52,8 @@ try {
TiffRwState::AutoPtr state( TiffRwState::AutoPtr state(
new TiffRwState(tiffHeader.byteOrder(), 0, createFct)); new TiffRwState(tiffHeader.byteOrder(), 0, createFct));
TiffReader reader(buf.pData_, TiffReader reader(buf.pData_,
buf.size_, buf.size_,
rootDir.get(), rootDir.get(),
state); state);

@ -55,7 +55,7 @@ EXIV2_RCSID("@(#) $Id$");
+ Review boundary checking, is it better to check the offsets? + Review boundary checking, is it better to check the offsets?
+ Define and implement consistent error handling for recursive hierarchy + Define and implement consistent error handling for recursive hierarchy
+ Make TiffImage a template StandardImage, which can be parametrized with + Make TiffImage a template StandardImage, which can be parametrized with
a parser and the necessary checking functions to cover all types of a parser and the necessary checking functions to cover all types of
images which need to be loaded completely. images which need to be loaded completely.
+ TiffComponent: should it have end() and setEnd() or pData and size? + TiffComponent: should it have end() and setEnd() or pData and size?
+ Can NewTiffCompFct and TiffCompFactoryFct be combined? + Can NewTiffCompFct and TiffCompFactoryFct be combined?
@ -87,7 +87,7 @@ namespace Exiv2 {
Makernote structures) and determines the corresponding Exiv2 TIFF Makernote structures) and determines the corresponding Exiv2 TIFF
components. The key of the table consists of the first two attributes, components. The key of the table consists of the first two attributes,
(extended) tag and group. Tag is the TIFF tag or one of a few extended (extended) tag and group. Tag is the TIFF tag or one of a few extended
tags, group identifies the IFD or any other composite TIFF component. tags, group identifies the IFD or any other composite TIFF component.
Each entry of the table defines for a particular tag and group Each entry of the table defines for a particular tag and group
combination, which create function is used and what the group of the new combination, which create function is used and what the group of the new
component is. component is.

@ -56,7 +56,7 @@ namespace Exiv2 {
class TiffCreator { class TiffCreator {
public: public:
/*! /*!
@brief Create the TiffComponent for TIFF entry \em extendedTag and @brief Create the TiffComponent for TIFF entry \em extendedTag and
\em group based on the embedded lookup table. \em group based on the embedded lookup table.
If a tag and group combination is not found in the table, a TiffEntry If a tag and group combination is not found in the table, a TiffEntry
@ -72,7 +72,7 @@ namespace Exiv2 {
/*! /*!
@brief Stateless parser class for data in TIFF format. Images use this @brief Stateless parser class for data in TIFF format. Images use this
class to decode and encode TIFF-based data. Uses class class to decode and encode TIFF-based data. Uses class
CreationPolicy for the creation of TIFF components. CreationPolicy for the creation of TIFF components.
*/ */
class TiffParser { class TiffParser {

@ -136,7 +136,7 @@ namespace Exiv2 {
TiffMetadataDecoder::TiffMetadataDecoder(Image* pImage, TiffMetadataDecoder::TiffMetadataDecoder(Image* pImage,
TiffComponent* const pRoot, TiffComponent* const pRoot,
uint32_t threshold) uint32_t threshold)
: pImage_(pImage), pRoot_(pRoot), threshold_(threshold) : pImage_(pImage), pRoot_(pRoot), threshold_(threshold)
{ {
// Find camera make // Find camera make
TiffFinder finder(0x010f, Group::ifd0); TiffFinder finder(0x010f, Group::ifd0);
@ -217,7 +217,7 @@ namespace Exiv2 {
<< std::setfill('0') << std::hex << object->tag() << std::setfill('0') << std::hex << object->tag()
<< "\n"; << "\n";
#endif #endif
// Todo: ExifKey should have an appropriate c'tor, it should not be // Todo: ExifKey should have an appropriate c'tor, it should not be
// necessary to use groupName here // necessary to use groupName here
ExifKey key(object->tag(), object->groupName()); ExifKey key(object->tag(), object->groupName());
setExifTag(key, object->pValue()); setExifTag(key, object->pValue());
@ -236,9 +236,9 @@ namespace Exiv2 {
i = groupType_.find(object->group()); i = groupType_.find(object->group());
if (i == groupType_.end() || (i->second & 1) == 1) return; if (i == groupType_.end() || (i->second & 1) == 1) return;
// Todo: ExifKey should have an appropriate c'tor, it should not be // Todo: ExifKey should have an appropriate c'tor, it should not be
// necessary to use groupName here // necessary to use groupName here
ExifKey key(object->tag(), tiffGroupName(Group::ifd0)); ExifKey key(object->tag(), tiffGroupName(Group::ifd0));
setExifTag(key, object->pValue()); setExifTag(key, object->pValue());
} }
@ -252,7 +252,7 @@ namespace Exiv2 {
groupType_[object->group()] = object->pValue()->toLong(); groupType_[object->group()] = object->pValue()->toLong();
} }
const TiffDecoderInfo* td = find(tiffDecoderInfo_, const TiffDecoderInfo* td = find(tiffDecoderInfo_,
TiffDecoderInfo::Key(make_, object->tag(), object->group())); TiffDecoderInfo::Key(make_, object->tag(), object->group()));
if (td) { if (td) {
// skip decoding if td->decoderFct_ == 0 // skip decoding if td->decoderFct_ == 0
@ -262,8 +262,8 @@ namespace Exiv2 {
return; return;
} }
assert(pImage_ != 0); assert(pImage_ != 0);
// "Normal" tag has low priority: only decode if it doesn't exist yet. // "Normal" tag has low priority: only decode if it doesn't exist yet.
// Todo: ExifKey should have an appropriate c'tor, it should not be // Todo: ExifKey should have an appropriate c'tor, it should not be
// necessary to use groupName here // necessary to use groupName here
ExifKey key(object->tag(), object->groupName()); ExifKey key(object->tag(), object->groupName());
// Todo: Too much searching here, optimize when threshold goes. // Todo: Too much searching here, optimize when threshold goes.
@ -281,7 +281,7 @@ namespace Exiv2 {
#ifndef SUPPRESS_WARNINGS #ifndef SUPPRESS_WARNINGS
std::cerr << "Warning: " std::cerr << "Warning: "
<< "Size " << pValue->size() << " of " << key.key() << "Size " << pValue->size() << " of " << key.key()
<< " exceeds " << threshold_ << " exceeds " << threshold_
<< " bytes limit. Not decoded.\n"; << " bytes limit. Not decoded.\n";
#endif #endif
return; return;
@ -341,7 +341,7 @@ namespace Exiv2 {
{ {
assert(object != 0); assert(object != 0);
os_ << prefix() << object->groupName() << " directory with " os_ << prefix() << object->groupName() << " directory with "
// cast to make MSVC happy // cast to make MSVC happy
<< std::dec << static_cast<unsigned int>(object->components_.size()); << std::dec << static_cast<unsigned int>(object->components_.size());
if (object->components_.size() == 1) os_ << " entry:\n"; if (object->components_.size() == 1) os_ << " entry:\n";
@ -355,7 +355,7 @@ namespace Exiv2 {
decIndent(); decIndent();
if (object->hasNext()) { if (object->hasNext()) {
if (object->pNext_) os_ << prefix() << "Next directory:\n"; if (object->pNext_) os_ << prefix() << "Next directory:\n";
else os_ << prefix() << "No next directory\n"; else os_ << prefix() << "No next directory\n";
} }
} // TiffPrinter::visitDirectoryNext } // TiffPrinter::visitDirectoryNext
@ -378,7 +378,7 @@ namespace Exiv2 {
void TiffPrinter::visitIfdMakernote(TiffIfdMakernote* object) void TiffPrinter::visitIfdMakernote(TiffIfdMakernote* object)
{ {
// Nothing to do // Nothing to do
} // TiffPrinter::visitIfdMakernote } // TiffPrinter::visitIfdMakernote
void TiffPrinter::printTiffEntry(TiffEntryBase* object, void TiffPrinter::printTiffEntry(TiffEntryBase* object,
@ -417,7 +417,7 @@ namespace Exiv2 {
void TiffPrinter::visitArrayElement(TiffArrayElement* object) void TiffPrinter::visitArrayElement(TiffArrayElement* object)
{ {
printTiffEntry(object, prefix()); printTiffEntry(object, prefix());
} // TiffPrinter::visitArrayElement } // TiffPrinter::visitArrayElement
TiffReader::TiffReader(const byte* pData, TiffReader::TiffReader(const byte* pData,
@ -454,7 +454,7 @@ namespace Exiv2 {
// 0 for create function indicates 'no change' // 0 for create function indicates 'no change'
if (state->createFct_ == 0) state->createFct_ = pState_->createFct_; if (state->createFct_ == 0) state->createFct_ = pState_->createFct_;
// invalidByteOrder indicates 'no change' // invalidByteOrder indicates 'no change'
if (state->byteOrder_ == invalidByteOrder) state->byteOrder_ = pState_->byteOrder_; if (state->byteOrder_ == invalidByteOrder) state->byteOrder_ = pState_->byteOrder_;
pState_ = state.release(); pState_ = state.release();
} }
} }
@ -464,14 +464,14 @@ namespace Exiv2 {
assert(pState_); assert(pState_);
return pState_->byteOrder_; return pState_->byteOrder_;
} }
uint32_t TiffReader::baseOffset() const uint32_t TiffReader::baseOffset() const
{ {
assert(pState_); assert(pState_);
return pState_->baseOffset_; return pState_->baseOffset_;
} }
TiffComponent::AutoPtr TiffReader::create(uint32_t extendedTag, TiffComponent::AutoPtr TiffReader::create(uint32_t extendedTag,
uint16_t group) const uint16_t group) const
{ {
assert(pState_); assert(pState_);
@ -630,7 +630,7 @@ namespace Exiv2 {
return; return;
} }
// If there are multiple dirs, group is incremented for each // If there are multiple dirs, group is incremented for each
TiffComponent::AutoPtr td(new TiffDirectory(object->tag(), TiffComponent::AutoPtr td(new TiffDirectory(object->tag(),
object->newGroup_ + i)); object->newGroup_ + i));
td->setStart(pData_ + baseOffset() + offset); td->setStart(pData_ + baseOffset() + offset);
object->addChild(td); object->addChild(td);
@ -661,7 +661,7 @@ namespace Exiv2 {
if (te && te->pValue()) { if (te && te->pValue()) {
make = te->pValue()->toString(); make = te->pValue()->toString();
// create concrete makernote, based on make and makernote contents // create concrete makernote, based on make and makernote contents
object->mn_ = TiffMnCreator::create(object->tag(), object->mn_ = TiffMnCreator::create(object->tag(),
object->mnGroup_, object->mnGroup_,
make, make,
object->pData(), object->pData(),
@ -676,12 +676,12 @@ namespace Exiv2 {
{ {
assert(object != 0); assert(object != 0);
if (!object->readHeader(object->start(), if (!object->readHeader(object->start(),
static_cast<uint32_t>(pLast_ - object->start()), static_cast<uint32_t>(pLast_ - object->start()),
byteOrder())) { byteOrder())) {
#ifndef SUPPRESS_WARNINGS #ifndef SUPPRESS_WARNINGS
std::cerr << "Error: Failed to read " std::cerr << "Error: Failed to read "
<< object->ifd_.groupName() << object->ifd_.groupName()
<< " IFD Makernote header.\n"; << " IFD Makernote header.\n";
#ifdef DEBUG #ifdef DEBUG
if (static_cast<uint32_t>(pLast_ - object->start()) >= 16) { if (static_cast<uint32_t>(pLast_ - object->start()) >= 16) {
@ -816,8 +816,8 @@ namespace Exiv2 {
object->pData_ = p; object->pData_ = p;
Value::AutoPtr v = Value::create(object->typeId()); Value::AutoPtr v = Value::create(object->typeId());
if (v.get()) { if (v.get()) {
ByteOrder b = ByteOrder b =
object->elByteOrder() == invalidByteOrder ? object->elByteOrder() == invalidByteOrder ?
byteOrder() : object->elByteOrder(); byteOrder() : object->elByteOrder();
v->read(object->pData(), object->size(), b); v->read(object->pData(), object->size(), b);
object->pValue_ = v.release(); object->pValue_ = v.release();

@ -20,7 +20,7 @@
*/ */
/*! /*!
@file tiffvisitor.hpp @file tiffvisitor.hpp
@brief @brief
@version $Rev$ @version $Rev$
@author Andreas Huggel (ahu) @author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@ -56,7 +56,7 @@ namespace Exiv2 {
// class definitions // class definitions
/*! /*!
@brief Abstract base class defining the interface for TIFF composite @brief Abstract base class defining the interface for TIFF composite
vistors (Visitor pattern) vistors (Visitor pattern)
A concrete visitor class is used as shown in the example below. Accept() A concrete visitor class is used as shown in the example below. Accept()
@ -108,7 +108,7 @@ namespace Exiv2 {
*/ */
virtual void visitDirectoryNext(TiffDirectory* object) {} virtual void visitDirectoryNext(TiffDirectory* object) {}
/*! /*!
@brief Operation to perform for a TIFF directory, at the end of the @brief Operation to perform for a TIFF directory, at the end of the
processing. processing.
*/ */
virtual void visitDirectoryEnd(TiffDirectory* object) {} virtual void visitDirectoryEnd(TiffDirectory* object) {}
@ -140,7 +140,7 @@ namespace Exiv2 {
/*! /*!
@brief Search the composite for a component with \em tag and \em group. @brief Search the composite for a component with \em tag and \em group.
Return a pointer to the component or 0, if not found. The class Return a pointer to the component or 0, if not found. The class
is ready for a first search after construction and can be is ready for a first search after construction and can be
re-initialized with init(). re-initialized with init().
*/ */
class TiffFinder : public TiffVisitor { class TiffFinder : public TiffVisitor {
@ -148,7 +148,7 @@ namespace Exiv2 {
//! @name Creators //! @name Creators
//@{ //@{
//! Constructor, taking the image to add the metadata to //! Constructor, taking the image to add the metadata to
TiffFinder(uint16_t tag, uint16_t group) TiffFinder(uint16_t tag, uint16_t group)
: tag_(tag), group_(group), tiffComponent_(0) {} : tag_(tag), group_(group), tiffComponent_(0) {}
//! Virtual destructor //! Virtual destructor
virtual ~TiffFinder() {} virtual ~TiffFinder() {}
@ -170,9 +170,9 @@ namespace Exiv2 {
virtual void visitMnEntry(TiffMnEntry* object); virtual void visitMnEntry(TiffMnEntry* object);
//! Find tag and group in an IFD makernote //! Find tag and group in an IFD makernote
virtual void visitIfdMakernote(TiffIfdMakernote* object); virtual void visitIfdMakernote(TiffIfdMakernote* object);
//! Find tag and group in an array entry component //! Find tag and group in an array entry component
virtual void visitArrayEntry(TiffArrayEntry* object); virtual void visitArrayEntry(TiffArrayEntry* object);
//! Find tag and group in an array element //! Find tag and group in an array element
virtual void visitArrayElement(TiffArrayElement* object); virtual void visitArrayElement(TiffArrayElement* object);
//! Check if \em object matches \em tag and \em group //! Check if \em object matches \em tag and \em group
@ -189,7 +189,7 @@ namespace Exiv2 {
*/ */
TiffComponent* result() const { return tiffComponent_; } TiffComponent* result() const { return tiffComponent_; }
//@} //@}
private: private:
uint16_t tag_; uint16_t tag_;
uint16_t group_; uint16_t group_;
@ -203,11 +203,11 @@ namespace Exiv2 {
struct TiffDecoderInfo { struct TiffDecoderInfo {
struct Key; struct Key;
/*! /*!
@brief Compare a TiffDecoderInfo with a TiffDecoderInfo::Key. @brief Compare a TiffDecoderInfo with a TiffDecoderInfo::Key.
The two are equal if TiffDecoderInfo::make_ equals a substring The two are equal if TiffDecoderInfo::make_ equals a substring
of the key of the same size. E.g., decoder info = "OLYMPUS", of the key of the same size. E.g., decoder info = "OLYMPUS",
key = "OLYMPUS OPTICAL CO.,LTD" (found in the image) match, key = "OLYMPUS OPTICAL CO.,LTD" (found in the image) match,
the extendedTag is Tag::all or equal to the extended tag of the the extendedTag is Tag::all or equal to the extended tag of the
key, and the group is equal to that of the key. key, and the group is equal to that of the key.
*/ */
bool operator==(const Key& key) const; bool operator==(const Key& key) const;
@ -245,7 +245,7 @@ namespace Exiv2 {
@brief Constructor, taking the image to add the metadata to, the root @brief Constructor, taking the image to add the metadata to, the root
element of the composite to decode and an optional element of the composite to decode and an optional
threshold. Unknown tags with values larger (in bytes) than the threshold. Unknown tags with values larger (in bytes) than the
threshold will be ignored. Default is not to ignore any threshold will be ignored. Default is not to ignore any
tags (0). tags (0).
*/ */
TiffMetadataDecoder(Image* pImage, TiffMetadataDecoder(Image* pImage,
@ -305,8 +305,8 @@ namespace Exiv2 {
}; // class TiffMetadataDecoder }; // class TiffMetadataDecoder
/*! /*!
@brief Simple state class containing relevant state information for @brief Simple state class containing relevant state information for
the TIFF reader. This is in a separate class so that the the TIFF reader. This is in a separate class so that the
reader can change state if needed (e.g., to read certain complex reader can change state if needed (e.g., to read certain complex
makernotes). makernotes).
*/ */
@ -314,12 +314,12 @@ namespace Exiv2 {
friend class TiffReader; friend class TiffReader;
public: public:
//! TiffRWState auto_ptr type //! TiffRWState auto_ptr type
typedef std::auto_ptr<TiffRwState> AutoPtr; typedef std::auto_ptr<TiffRwState> AutoPtr;
//! @name Creators //! @name Creators
//@{ //@{
//! Constructor. //! Constructor.
TiffRwState(ByteOrder byteOrder, TiffRwState(ByteOrder byteOrder,
uint32_t baseOffset, uint32_t baseOffset,
TiffCompFactoryFct createFct =0) TiffCompFactoryFct createFct =0)
: byteOrder_(byteOrder), : byteOrder_(byteOrder),
@ -330,12 +330,12 @@ namespace Exiv2 {
//! @name Manipulators //! @name Manipulators
//@{ //@{
/*! /*!
@brief Return the applicable byte order. May be different for @brief Return the applicable byte order. May be different for
the Makernote and the rest of the TIFF entries. the Makernote and the rest of the TIFF entries.
*/ */
ByteOrder byteOrder() const { return byteOrder_; } ByteOrder byteOrder() const { return byteOrder_; }
/*! /*!
@brief Return the base offset. @brief Return the base offset.
TIFF standard format uses byte offsets which are always relative to TIFF standard format uses byte offsets which are always relative to
the start of the TIFF file, i.e., relative to the start of the TIFF the start of the TIFF file, i.e., relative to the start of the TIFF
@ -347,8 +347,8 @@ namespace Exiv2 {
*/ */
uint32_t baseOffset() const { return baseOffset_; } uint32_t baseOffset() const { return baseOffset_; }
/*! /*!
@brief Return the factory function to create new TIFF components. @brief Return the factory function to create new TIFF components.
Different create functions may use different lookup tables, so that Different create functions may use different lookup tables, so that
makernotes can independently use their own factory function and lookup makernotes can independently use their own factory function and lookup
table, which can be defined together with the makernote table, which can be defined together with the makernote
@ -356,7 +356,7 @@ namespace Exiv2 {
*/ */
TiffCompFactoryFct createFct() const { return createFct_; } TiffCompFactoryFct createFct() const { return createFct_; }
//@} //@}
private: private:
ByteOrder byteOrder_; ByteOrder byteOrder_;
const uint32_t baseOffset_; const uint32_t baseOffset_;
@ -378,7 +378,7 @@ namespace Exiv2 {
@param pData Pointer to the data buffer, starting with a TIFF header. @param pData Pointer to the data buffer, starting with a TIFF header.
@param size Number of bytes in the data buffer. @param size Number of bytes in the data buffer.
@param pRoot Root element of the TIFF composite. @param pRoot Root element of the TIFF composite.
@param state State object for creation function, byteorder and @param state State object for creation function, byteorder and
base offset. base offset.
*/ */
TiffReader(const byte* pData, TiffReader(const byte* pData,
@ -443,7 +443,7 @@ namespace Exiv2 {
}; // class TiffReader }; // class TiffReader
/*! /*!
@brief TIFF composite visitor to print the TIFF structure to an output @brief TIFF composite visitor to print the TIFF structure to an output
stream. stream.
*/ */
class TiffPrinter : public TiffVisitor { class TiffPrinter : public TiffVisitor {
@ -491,7 +491,7 @@ namespace Exiv2 {
//! @name Accessors //! @name Accessors
//@{ //@{
//! Print a standard TIFF entry. //! Print a standard TIFF entry.
void printTiffEntry(TiffEntryBase* object, void printTiffEntry(TiffEntryBase* object,
const std::string& prefix ="") const; const std::string& prefix ="") const;
//! Return the current prefix //! Return the current prefix
std::string prefix() const { return prefix_; } std::string prefix() const { return prefix_; }

@ -62,7 +62,7 @@ typedef __int32 int32_t;
/*! /*!
@brief Macro to make calls to member functions through a pointer more readable. @brief Macro to make calls to member functions through a pointer more readable.
See the C++ FAQ LITE, item See the C++ FAQ LITE, item
<a href="http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.5" title="[33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?">[33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?</a>. <a href="http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.5" title="[33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?">[33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?</a>.
*/ */
#define EXV_CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) #define EXV_CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember))
@ -106,7 +106,7 @@ namespace Exiv2 {
enum IfdId { ifdIdNotSet, enum IfdId { ifdIdNotSet,
ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id, ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id,
canonIfdId, canonCs1IfdId, canonCs2IfdId, canonCfIfdId, canonIfdId, canonCs1IfdId, canonCs2IfdId, canonCfIfdId,
fujiIfdId, fujiIfdId,
minoltaIfdId, minoltaCs5DIfdId, minoltaCs7DIfdId, minoltaIfdId, minoltaCs5DIfdId, minoltaCs7DIfdId,
minoltaCsOldIfdId, minoltaCsNewIfdId, minoltaCsOldIfdId, minoltaCsNewIfdId,
nikon1IfdId, nikon2IfdId, nikon3IfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId,
@ -315,7 +315,7 @@ namespace Exiv2 {
/*! /*!
@brief Find an element that matches \em key in the array \em src. @brief Find an element that matches \em key in the array \em src.
Designed to be used with lookup tables as shown in the example below. Designed to be used with lookup tables as shown in the example below.
Requires a %Key structure (ideally in the array) and a comparison operator Requires a %Key structure (ideally in the array) and a comparison operator
to compare a key with an array element. The size of the array is to compare a key with an array element. The size of the array is
@ -327,34 +327,34 @@ namespace Exiv2 {
int i; int i;
int k; int k;
const char* data; const char* data;
struct Key; struct Key;
bool operator==(const Bar::Key& rhs) const; bool operator==(const Bar::Key& rhs) const;
}; };
struct Bar::Key { struct Bar::Key {
Key(int a, int b) : i(a), k(b) {} Key(int a, int b) : i(a), k(b) {}
int i; int i;
int k; int k;
}; };
bool Bar::operator==(const Bar::Key& key) const // definition bool Bar::operator==(const Bar::Key& key) const // definition
{ {
return i == key.i && k == key.k; return i == key.i && k == key.k;
} }
const Bar bars[] = { const Bar bars[] = {
{ 1, 1, "bar data 1" }, { 1, 1, "bar data 1" },
{ 1, 2, "bar data 2" }, { 1, 2, "bar data 2" },
{ 1, 3, "bar data 3" } { 1, 3, "bar data 3" }
}; };
int main ( void ) { int main ( void ) {
const Bar* bar = find(bars, Bar::Key(1, 3)); const Bar* bar = find(bars, Bar::Key(1, 3));
if (bar) std::cout << bar->data << "\n"; if (bar) std::cout << bar->data << "\n";
else std::cout << "Key not found.\n"; else std::cout << "Key not found.\n";
return 0; return 0;
} }
@endcode @endcode
*/ */
template<typename T, typename K, int N> template<typename T, typename K, int N>

Loading…
Cancel
Save