diff --git a/src/actions.cpp b/src/actions.cpp index aaa99917..3e5ebae1 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -590,14 +590,14 @@ namespace Action { continue; } if (manyFiles) { - std::cout << std::setfill(' ') << std::left << std::setw(20) + std::cout << std::setfill(' ') << std::left << std::setw(20) << path_ << " "; } bool first = true; if (Params::instance().printItems_ & Params::prTag) { if (!first) std::cout << " "; first = false; - std::cout << "0x" << std::setw(4) << std::setfill('0') + std::cout << "0x" << std::setw(4) << std::setfill('0') << std::right << std::hex << md->tag(); } @@ -648,7 +648,7 @@ namespace Action { if (Params::instance().printItems_ & Params::prValue) { if (!first) std::cout << " "; first = false; - if ( Params::instance().binary_ + if ( Params::instance().binary_ && md->typeId() == Exiv2::undefined && md->size() > 100) { std::cout << "(Binary value suppressed)" << std::endl; @@ -659,7 +659,7 @@ namespace Action { if (Params::instance().printItems_ & Params::prTrans) { if (!first) std::cout << " "; first = false; - if ( Params::instance().binary_ + if ( Params::instance().binary_ && md->typeId() == Exiv2::undefined && md->size() > 100) { std::cout << "(Binary value suppressed)" << std::endl; @@ -670,7 +670,7 @@ namespace Action { if (Params::instance().printItems_ & Params::prHex) { if (!first) std::cout << std::endl; first = false; - if ( Params::instance().binary_ + if ( Params::instance().binary_ && md->typeId() == Exiv2::undefined && md->size() > 100) { std::cout << "(Binary value suppressed)" << std::endl; diff --git a/src/doxygen.hpp b/src/doxygen.hpp index d8df9ed9..5371db8e 100644 --- a/src/doxygen.hpp +++ b/src/doxygen.hpp @@ -58,7 +58,7 @@ @section supp Support -

Please write to the +

Please write to the Yahoo! group for Exiv2 help and discussions.

Join the group to post and receive messages or use exiv2user/password to post anonymously. Bug reports can be submitted directly to the sizeDataArea() == 0) { DataBuf buf(md->size()); // 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()); entry->setValue(static_cast(md->typeId()), md->count(), diff --git a/src/exiv2_version.h b/src/exiv2_version.h index 7312af23..e8a9280e 100644 --- a/src/exiv2_version.h +++ b/src/exiv2_version.h @@ -20,7 +20,7 @@ */ /*! @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. References: Similar versioning defines are used in KDE, GTK and other libraries. See http://apr.apache.org/versioning.html for accompanying @@ -46,7 +46,7 @@ */ #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. */ #define EXIV2_MAKE_VERSION(major,minor,patch) \ @@ -57,7 +57,7 @@ #define EXIV2_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. Versions are denoted using a standard triplet of integers: diff --git a/src/ifd.hpp b/src/ifd.hpp index 09b569a7..ebcfb419 100644 --- a/src/ifd.hpp +++ b/src/ifd.hpp @@ -235,7 +235,7 @@ namespace Exiv2 { */ 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 (Minolta Makernote CameraSettings tags). */ diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index 5cff8905..15f66ecc 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -65,7 +65,7 @@ namespace Exiv2 { const uint16_t Photoshop::iptc_ = 0x0404; // 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 int Photoshop::locateIrb(const byte* pPsData, long sizePsData, @@ -492,8 +492,8 @@ namespace Exiv2 { if (psData.size_ > 0 || iptcData_.count() > 0) { // Set the new IPTC IRB, keeps existing IRBs but removes the // IPTC block if there is no new IPTC data to write - DataBuf newPsData = Photoshop::setIptcIrb(psData.pData_, - psData.size_, + DataBuf newPsData = Photoshop::setIptcIrb(psData.pData_, + psData.size_, iptcData_); if (newPsData.size_ > 0) { // Write APP13 marker, new size, and ps3Id @@ -503,7 +503,7 @@ namespace Exiv2 { memcpy(tmpBuf + 4, Photoshop::ps3Id_, 14); if (outIo.write(tmpBuf, 18) != 18) throw Error(21); if (outIo.error()) throw Error(21); - + // Write new Photoshop IRB data buffer if ( outIo.write(newPsData.pData_, newPsData.size_) != newPsData.size_) throw Error(21); diff --git a/src/jpgimage.hpp b/src/jpgimage.hpp index e1934870..2e6a30e7 100644 --- a/src/jpgimage.hpp +++ b/src/jpgimage.hpp @@ -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). */ struct Photoshop { @@ -105,7 +105,7 @@ namespace Exiv2 { @param sizePsData Size of the IRB buffer, may be 0 @param iptcData Iptc data to embed, may be empty @return A data buffer containing the new IRB buffer, may have 0 size - */ + */ static DataBuf setIptcIrb(const byte* pPsData, long sizePsData, const IptcData& iptcData); diff --git a/src/makernote2.cpp b/src/makernote2.cpp index 49fa2cd1..e5c468e7 100644 --- a/src/makernote2.cpp +++ b/src/makernote2.cpp @@ -76,8 +76,8 @@ namespace Exiv2 { { TiffComponent* tc = 0; const TiffMnRegistry* tmr = find(registry_, TiffMnRegistry::Key(make)); - if (tmr) tc = tmr->newMnFct_(tag, - group, + if (tmr) tc = tmr->newMnFct_(tag, + group, tmr->mnGroup_, pData, size, @@ -93,22 +93,22 @@ namespace Exiv2 { uint32_t TiffIfdMakernote::ifdOffset() const { if (!pHeader_) return 0; - return pHeader_->ifdOffset(); + return pHeader_->ifdOffset(); } - ByteOrder TiffIfdMakernote::byteOrder () const + ByteOrder TiffIfdMakernote::byteOrder () const { 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; return pHeader_->baseOffset(mnOffset); } - bool TiffIfdMakernote::readHeader(const byte* pData, + bool TiffIfdMakernote::readHeader(const byte* pData, uint32_t size, ByteOrder byteOrder) { @@ -143,8 +143,8 @@ namespace Exiv2 { read(signature_, size_, invalidByteOrder); } - bool OlympusMnHeader::read(const byte* pData, - uint32_t size, + bool OlympusMnHeader::read(const byte* pData, + uint32_t size, ByteOrder /*byteOrder*/) { assert (pData != 0); @@ -153,7 +153,7 @@ namespace Exiv2 { header_.alloc(size_); memcpy(header_.pData_, pData, header_.size_); - if ( static_cast(header_.size_) < size_ + if ( static_cast(header_.size_) < size_ || 0 != memcmp(header_.pData_, signature_, 5)) { return false; } @@ -172,7 +172,7 @@ namespace Exiv2 { } bool FujiMnHeader::read(const byte* pData, - uint32_t size, + uint32_t size, ByteOrder /*byteOrder*/) { assert (pData != 0); @@ -186,7 +186,7 @@ namespace Exiv2 { // from the header. Note that we ignore the byteOrder argument start_ = getULong(header_.pData_ + 8, byteOrder_); - if ( static_cast(header_.size_) < size_ + if ( static_cast(header_.size_) < size_ || 0 != memcmp(header_.pData_, signature_, 8)) { return false; } @@ -205,7 +205,7 @@ namespace Exiv2 { } bool Nikon2MnHeader::read(const byte* pData, - uint32_t size, + uint32_t size, ByteOrder /*byteOrder*/) { assert (pData != 0); @@ -231,7 +231,7 @@ namespace Exiv2 { } bool Nikon3MnHeader::read(const byte* pData, - uint32_t size, + uint32_t size, ByteOrder /*byteOrder*/) { assert (pData != 0); @@ -259,7 +259,7 @@ namespace Exiv2 { } bool PanasonicMnHeader::read(const byte* pData, - uint32_t size, + uint32_t size, ByteOrder /*byteOrder*/) { assert (pData != 0); @@ -287,7 +287,7 @@ namespace Exiv2 { } bool SigmaMnHeader::read(const byte* pData, - uint32_t size, + uint32_t size, ByteOrder /*byteOrder*/) { assert (pData != 0); @@ -313,7 +313,7 @@ namespace Exiv2 { } bool SonyMnHeader::read(const byte* pData, - uint32_t size, + uint32_t size, ByteOrder /*byteOrder*/) { assert (pData != 0); @@ -334,7 +334,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* /*pData*/, - uint32_t /*size*/, + uint32_t /*size*/, ByteOrder /*byteOrder*/) { return new TiffIfdMakernote(tag, group, mnGroup, 0); @@ -344,7 +344,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* /*pData*/, - uint32_t /*size*/, + uint32_t /*size*/, ByteOrder /*byteOrder*/) { return new TiffIfdMakernote(tag, group, mnGroup, 0); @@ -354,7 +354,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* /*pData*/, - uint32_t /*size*/, + uint32_t /*size*/, ByteOrder /*byteOrder*/) { return new TiffIfdMakernote(tag, group, mnGroup, new OlympusMnHeader); @@ -364,7 +364,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* /*pData*/, - uint32_t /*size*/, + uint32_t /*size*/, ByteOrder /*byteOrder*/) { return new TiffIfdMakernote(tag, group, mnGroup, new FujiMnHeader); @@ -398,7 +398,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* /*pData*/, - uint32_t /*size*/, + uint32_t /*size*/, ByteOrder /*byteOrder*/) { return new TiffIfdMakernote(tag, group, mnGroup, new PanasonicMnHeader, false); @@ -408,7 +408,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* /*pData*/, - uint32_t /*size*/, + uint32_t /*size*/, ByteOrder /*byteOrder*/) { return new TiffIfdMakernote(tag, group, mnGroup, new SigmaMnHeader); diff --git a/src/makernote2.hpp b/src/makernote2.hpp index b96af523..0c03a0e4 100644 --- a/src/makernote2.hpp +++ b/src/makernote2.hpp @@ -72,8 +72,8 @@ namespace Exiv2 { typedef TiffComponent* (*NewMnFct)(uint16_t tag, uint16_t group, uint16_t mnGroup, - const byte* pData, - uint32_t size, + const byte* pData, + uint32_t size, ByteOrder byteOrder); //! 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 { public: /*! @brief Create the Makernote for camera \em make and details from 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. @note Ownership for the component is transferred to the caller, who is responsible to delete the component. No smart pointer @@ -135,11 +135,11 @@ namespace Exiv2 { //@{ //! Virtual destructor. virtual ~MnHeader() {} - //@} + //@} //! @name Manipulators //@{ //! 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, ByteOrder byteOrder) =0; //@} @@ -159,7 +159,7 @@ namespace Exiv2 { */ 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. @param mnOffset Offset to the makernote from the start of the @@ -171,7 +171,7 @@ namespace Exiv2 { }; // 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. Contains a makernote header (which can be 0) and an IFD and @@ -185,12 +185,12 @@ namespace Exiv2 { //! @name Creators //@{ //! Default constructor - TiffIfdMakernote(uint16_t tag, - uint16_t group, + TiffIfdMakernote(uint16_t tag, + uint16_t group, uint16_t mnGroup, MnHeader* pHeader, bool hasNext =true) - : TiffComponent(tag, group), + : TiffComponent(tag, group), pHeader_(pHeader), ifd_(tag, mnGroup, hasNext) {} //! Virtual destructor @@ -221,8 +221,8 @@ namespace Exiv2 { */ ByteOrder byteOrder() const; /*! - @brief Return the base offset for the makernote IFD entries relative - to the start of the TIFF header. The default, if there is no + @brief Return the base offset for the makernote IFD entries relative + to the start of the TIFF header. The default, if there is no header, is 0. @param mnOffset Offset to the makernote from the start of the @@ -243,7 +243,7 @@ namespace Exiv2 { // DATA MnHeader* pHeader_; //!< Makernote header TiffDirectory ifd_; //!< Makernote IFD - + }; // class TiffIfdMakernote //! Header of an Olympus Makernote @@ -258,7 +258,7 @@ namespace Exiv2 { //@} //! @name Manipulators //@{ - virtual bool read(const byte* pData, + virtual bool read(const byte* pData, uint32_t size, ByteOrder byteOrder); //@} @@ -287,8 +287,8 @@ namespace Exiv2 { //@} //! @name Manipulators //@{ - virtual bool read(const byte* pData, - uint32_t size, + virtual bool read(const byte* pData, + uint32_t size, ByteOrder byteOrder); //@} //! @name Accessors @@ -320,8 +320,8 @@ namespace Exiv2 { //@} //! @name Manipulators //@{ - virtual bool read(const byte* pData, - uint32_t size, + virtual bool read(const byte* pData, + uint32_t size, ByteOrder byteOrder); //@} //! @name Accessors @@ -350,8 +350,8 @@ namespace Exiv2 { //@} //! @name Manipulators //@{ - virtual bool read(const byte* pData, - uint32_t size, + virtual bool read(const byte* pData, + uint32_t size, ByteOrder byteOrder); //@} //! @name Accessors @@ -383,8 +383,8 @@ namespace Exiv2 { //@} //! @name Manipulators //@{ - virtual bool read(const byte* pData, - uint32_t size, + virtual bool read(const byte* pData, + uint32_t size, ByteOrder byteOrder); //@} //! @name Accessors @@ -413,8 +413,8 @@ namespace Exiv2 { //@} //! @name Manipulators //@{ - virtual bool read(const byte* pData, - uint32_t size, + virtual bool read(const byte* pData, + uint32_t size, ByteOrder byteOrder); //@} //! @name Accessors @@ -444,8 +444,8 @@ namespace Exiv2 { //@} //! @name Manipulators //@{ - virtual bool read(const byte* pData, - uint32_t size, + virtual bool read(const byte* pData, + uint32_t size, ByteOrder byteOrder); //@} //! @name Accessors @@ -470,7 +470,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, ByteOrder byteOrder); //! Function to create a Minolta makernote @@ -478,7 +478,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, ByteOrder byteOrder); //! Function to create an Olympus makernote @@ -486,7 +486,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, ByteOrder byteOrder); //! Function to create a Fujifilm makernote @@ -494,18 +494,18 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, 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. */ TiffComponent* newNikonMn(uint16_t tag, uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, ByteOrder byteOrder); //! Function to create a Panasonic makernote @@ -513,7 +513,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, ByteOrder byteOrder); //! Function to create a Sigma makernote @@ -521,7 +521,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, ByteOrder byteOrder); //! Function to create a Sony makernote @@ -529,7 +529,7 @@ namespace Exiv2 { uint16_t group, uint16_t mnGroup, const byte* pData, - uint32_t size, + uint32_t size, ByteOrder byteOrder); } // namespace Exiv2 diff --git a/src/metadatum.hpp b/src/metadatum.hpp index 701ddeec..141aa516 100644 --- a/src/metadatum.hpp +++ b/src/metadatum.hpp @@ -174,7 +174,7 @@ namespace Exiv2 { virtual std::string key() const =0; //! Return the name of the tag (which is also the third part of the key) virtual std::string tagName() const =0; - //! Return a label for the tag + //! Return a label for the tag virtual std::string tagLabel() const =0; //! Return the tag virtual uint16_t tag() const =0; diff --git a/src/minoltamn.cpp b/src/minoltamn.cpp index 86a9ab44..b14b5e51 100644 --- a/src/minoltamn.cpp +++ b/src/minoltamn.cpp @@ -88,7 +88,7 @@ namespace Exiv2 { //! Lookup table to translate Minolta Lens id values to readable labels extern const TagDetails minoltaLensID[] = { { 1, "AF80-200mm F2.8G" }, - { 2, "AF28-70mm F2.8G" }, + { 2, "AF28-70mm F2.8G" }, { 6, "AF24-85mm F3.5-4.5" }, { 7, "AF100-400mm F4.5-6.7(D)" }, { 8, "AF70-210mm F4.5-5.6" }, @@ -103,42 +103,42 @@ namespace Exiv2 { { 25, "AF100-300mm F4.5-5.6(D)" }, { 27, "AF85mm F1.4G" }, { 28, "AF100mm F2.8 Macro(D)" }, - { 29, "AF75-300mm F4.5-5.6(D)" }, - { 30, "AF28-80mm F3.5-5.6(D)" }, - { 31, "AF50mm F2.8 Macro(D) or AF50mm F3.5 Macro" }, - { 32, "AF100-400mm F4.5-6.7(D) x1.5" }, - { 33, "AF70-200mm F2.8G SSM" }, - { 35, "AF85mm F1.4G(D) Limited" }, - { 38, "AF17-35mm F2.8-4(D)" }, - { 39, "AF28-75mm F2.8(D)" }, + { 29, "AF75-300mm F4.5-5.6(D)" }, + { 30, "AF28-80mm F3.5-5.6(D)" }, + { 31, "AF50mm F2.8 Macro(D) or AF50mm F3.5 Macro" }, + { 32, "AF100-400mm F4.5-6.7(D) x1.5" }, + { 33, "AF70-200mm F2.8G SSM" }, + { 35, "AF85mm F1.4G(D) Limited" }, + { 38, "AF17-35mm F2.8-4(D)" }, + { 39, "AF28-75mm F2.8(D)" }, { 40, "AFDT18-70mm F3.5-5.6(D)" }, { 41, "TAMRON Di II LD 11-18mm F4-5.6" }, { 128, "TAMRON 18-200, 28-300 or 80-300mm F3.5-6.3" }, - { 25501, "AF50mm F1.7" }, - { 25521, "TOKINA 19-35mm F3.5-4.5 or TOKINA 28-70mm F2.8 AT-X" }, - { 25541, "AF35-105mm F3.5-4.5" }, - { 25551, "AF70-210mm F4 Macro or SIGMA 70-210mm F4-5.6 APO" }, - { 25581, "AF24-50mm F4" }, - { 25611, "SIGMA 70-300mm F4-5.6 or SIGMA 300mm F4 APO Macro" }, - { 25621, "AF50mm F1.4 NEW" }, - { 25631, "AF300mm F2.8G" }, + { 25501, "AF50mm F1.7" }, + { 25521, "TOKINA 19-35mm F3.5-4.5 or TOKINA 28-70mm F2.8 AT-X" }, + { 25541, "AF35-105mm F3.5-4.5" }, + { 25551, "AF70-210mm F4 Macro or SIGMA 70-210mm F4-5.6 APO" }, + { 25581, "AF24-50mm F4" }, + { 25611, "SIGMA 70-300mm F4-5.6 or SIGMA 300mm F4 APO Macro" }, + { 25621, "AF50mm F1.4 NEW" }, + { 25631, "AF300mm F2.8G" }, { 25641, "AF50mm F2.8 Macro" }, - { 25661, "AF24mm F2.8" }, - { 25721, "AF500mm F8 Reflex" }, - { 25781, "AF16mm F2.8 Fisheye or SIGMA 8mm F4 Fisheye" }, - { 25791, "AF20mm F2.8" }, - { 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" }, - { 25891, "TOKINA 80-200mm F2.8" }, - { 25921, "AF85mm F1.4G(D)" }, - { 25931, "AF200mm F2.8G" }, - { 25961, "AF28mm F2" }, - { 25981, "AF100mm F2" }, + { 25661, "AF24mm F2.8" }, + { 25721, "AF500mm F8 Reflex" }, + { 25781, "AF16mm F2.8 Fisheye or SIGMA 8mm F4 Fisheye" }, + { 25791, "AF20mm F2.8" }, + { 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" }, + { 25891, "TOKINA 80-200mm F2.8" }, + { 25921, "AF85mm F1.4G(D)" }, + { 25931, "AF200mm F2.8G" }, + { 25961, "AF28mm F2" }, + { 25981, "AF100mm F2" }, { 26061, "AF100-300mm F4.5-5.6(D) or SIGMA 105mm F2.8 Macro EX-DG" }, - { 26081, "AF300mm F2.8G" }, - { 26121, "AF200mm F2.8G(D)" }, - { 26131, "AF50mm F1.7" }, - { 26241, "AF35-80mm F4-5.6" }, + { 26081, "AF300mm F2.8G" }, + { 26121, "AF200mm F2.8G(D)" }, + { 26131, "AF50mm F1.7" }, + { 26241, "AF35-80mm F4-5.6" }, { 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(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)), - + // 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(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(0x010c, "LensID", "Lens ID", "Lens ID", minoltaIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(minoltaLensID)), + 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(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(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" }, { 3, "Wireless" } }; - + //! Lookup table to translate Minolta Std camera settings white balance values to readable labels extern const TagDetails minoltaWhiteBalanceStd[] = { { 0, "Auto" }, @@ -348,7 +348,7 @@ namespace Exiv2 { //! Lookup table to translate Minolta Std camera settings internal flash values to readable labels extern const TagDetails minoltaInternalFlashStd[] = { { 0, "Did not fire" }, - { 1, "Fired" } + { 1, "Fired" } }; //! 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) { // From the PHP JPEG Metadata Toolkit - os << (value.toLong()/8)-1; + os << (value.toLong()/8)-1; return os; } std::ostream& MinoltaMakerNote::printMinoltaExposureTimeStd(std::ostream& os, const Value& value) { // From the PHP JPEG Metadata Toolkit - os << (value.toLong()/8)-6; + os << (value.toLong()/8)-6; return os; } std::ostream& MinoltaMakerNote::printMinoltaFNumberStd(std::ostream& os, const Value& value) { // From the PHP JPEG Metadata Toolkit - os << (value.toLong()/8)-1; + os << (value.toLong()/8)-1; return os; } std::ostream& MinoltaMakerNote::printMinoltaExposureCompensationStd(std::ostream& os, const Value& value) { // From the PHP JPEG Metadata Toolkit - os << value.toLong()/256; + os << value.toLong()/256; return os; } @@ -441,17 +441,17 @@ namespace Exiv2 { { // From the PHP JPEG Metadata Toolkit os << value.toLong() / 65536 << ":" << std::right << std::setw(2) << std::setfill('0') - << (value.toLong() - value.toLong() / 65536 * 65536) / 256 << ":" - << std::right << std::setw(2) << std::setfill('0') << value.toLong() % 256; + << (value.toLong() - value.toLong() / 65536 * 65536) / 256 << ":" + << std::right << std::setw(2) << std::setfill('0') << value.toLong() % 256; return os; } std::ostream& MinoltaMakerNote::printMinoltaTimeStd(std::ostream& os, const Value& value) { // 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') - << (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; return os; } @@ -459,21 +459,21 @@ namespace Exiv2 { std::ostream& MinoltaMakerNote::printMinoltaFlashExposureCompStd(std::ostream& os, const Value& value) { // From the PHP JPEG Metadata Toolkit - os << (value.toLong()-6)/3; + os << (value.toLong()-6)/3; return os; } std::ostream& MinoltaMakerNote::printMinoltaWhiteBalanceStd(std::ostream& os, const Value& value) { // From the PHP JPEG Metadata Toolkit - os << value.toLong()/256; + os << value.toLong()/256; return os; } std::ostream& MinoltaMakerNote::printMinoltaBrightnessStd(std::ostream& os, const Value& value) { // From the PHP JPEG Metadata Toolkit - os << (value.toLong()/8)-6; + os << (value.toLong()/8)-6; return os; } @@ -1167,7 +1167,7 @@ namespace Exiv2 { // ***************************************************************************** // 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*/) { return MakerNote::AutoPtr(new MinoltaMakerNote(alloc)); diff --git a/src/minoltamn.hpp b/src/minoltamn.hpp index 76b75d8e..5d889039 100644 --- a/src/minoltamn.hpp +++ b/src/minoltamn.hpp @@ -156,7 +156,7 @@ namespace Exiv2 { //! Print Exposure Compensation setting from 5D Minolta Camera Settings makernote static std::ostream& printMinoltaExposureCompensation5D(std::ostream& os, const Value& value); //@} - + //! @cond IGNORE // Public only so that we can create a static instance struct RegisterMn { diff --git a/src/mrwimage.cpp b/src/mrwimage.cpp index f5ac395e..fdd2a7a6 100644 --- a/src/mrwimage.cpp +++ b/src/mrwimage.cpp @@ -133,7 +133,7 @@ namespace Exiv2 { uint32_t pos = len; uint32_t const end = getULong(tmp + 4, bigEndian); - pos += len; + pos += len; if (pos > end) throw Error(14); io_->read(tmp, len); if (io_->error() || io_->eof()) throw Error(14); @@ -144,7 +144,7 @@ namespace Exiv2 { if (pos > end) throw Error(14); io_->seek(siz, BasicIo::cur); if (io_->error() || io_->eof()) throw Error(14); - + pos += len; if (pos > end) throw Error(14); io_->read(tmp, len); diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp index 66a08eaa..a6ab352f 100644 --- a/src/nikonmn.cpp +++ b/src/nikonmn.cpp @@ -210,10 +210,10 @@ namespace Exiv2 { switch (focusPoint) { // Could use array nikonFokuspoints case 0: - case 1: - case 2: - case 3: - case 4: + case 1: + case 2: + case 3: + case 4: os << nikonFocuspoints[focusPoint]; break; default: @@ -650,7 +650,7 @@ namespace Exiv2 { unsigned focuspoint = value.toLong(1); unsigned focusused = (value.toLong(2) << 8) + value.toLong(3); enum {standard, wide} combination = standard; - const unsigned focuspoints = sizeof(nikonFocuspoints) + const unsigned focuspoints = sizeof(nikonFocuspoints) / sizeof(nikonFocuspoints[0]); if (focusmetering == 0 && focuspoint == 0 && focusused == 0) { @@ -692,7 +692,7 @@ namespace Exiv2 { if (focusused == 0) os << sep << " none"; else if (focusused != 1U<group_, 0x0202, Group::ifd1)); @@ -308,7 +308,7 @@ namespace Exiv2 { const TiffStructure* ts) { assert(ts); - return TiffComponent::AutoPtr(new TiffSizeEntry(tag, + return TiffComponent::AutoPtr(new TiffSizeEntry(tag, ts->group_, 0x0201, Group::ifd1)); diff --git a/src/tiffcomposite.hpp b/src/tiffcomposite.hpp index f516fccd..0565d11a 100644 --- a/src/tiffcomposite.hpp +++ b/src/tiffcomposite.hpp @@ -20,7 +20,7 @@ */ /*! @file tiffcomposite.hpp - @brief + @brief @version $Rev$ @author Andreas Huggel (ahu) ahuggel@gmx.net @@ -97,7 +97,7 @@ namespace Exiv2 { (Composite pattern). Both TIFF directories as well as entries implement this interface. A component can be uniquely identified 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). */ class TiffComponent { @@ -240,7 +240,7 @@ namespace Exiv2 { //! Return the number of components in this entry 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) */ 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 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 - in the constructor. This component is used, e.g., for - \em Exif.Thumbnail.JPEGInterchangeFormat for which the size is + in the constructor. This component is used, e.g., for + \em Exif.Thumbnail.JPEGInterchangeFormat for which the size is provided in \em Exif.Thumbnail.JPEGInterchangeFormatLength. */ class TiffDataEntry : public TiffEntryBase { @@ -330,9 +330,9 @@ namespace Exiv2 { }; // class TiffDataEntry /*! - @brief A TIFF IFD entry containing the size of a data area of a related - TiffDataEntry. This component is used, e.g. for - \em Exif.Thumbnail.JPEGInterchangeFormatLength, which contains the + @brief A TIFF IFD entry containing the size of a data area of a related + TiffDataEntry. This component is used, e.g. for + \em Exif.Thumbnail.JPEGInterchangeFormatLength, which contains the size of \em Exif.Thumbnail.JPEGInterchangeFormat. */ class TiffSizeEntry : public TiffEntryBase { @@ -478,8 +478,8 @@ namespace Exiv2 { }; // class TiffMnEntry /*! - @brief Composite to model an array of tags, each consisting of one - unsigned short value. Canon and Minolta makernotes use such tags. + @brief Composite to model an array of tags, each consisting of one + unsigned short value. Canon and Minolta makernotes use such tags. The elements of this component are usually of type TiffArrayElement. */ @@ -488,12 +488,12 @@ namespace Exiv2 { //! @name Creators //@{ //! Default constructor - TiffArrayEntry(uint16_t tag, - uint16_t group, + TiffArrayEntry(uint16_t tag, + uint16_t group, uint16_t elGroup, uint16_t elSize) - : TiffEntryBase(tag, group), - elSize_(elSize), + : TiffEntryBase(tag, group), + elSize_(elSize), elGroup_(elGroup) {} //! Virtual destructor virtual ~TiffArrayEntry(); @@ -523,7 +523,7 @@ namespace Exiv2 { /*! @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. */ class TiffArrayElement : public TiffEntryBase { @@ -531,12 +531,12 @@ namespace Exiv2 { //! @name Creators //@{ //! Constructor - TiffArrayElement(uint16_t tag, + TiffArrayElement(uint16_t tag, uint16_t group, - TypeId elTypeId, - ByteOrder elByteOrder) + TypeId elTypeId, + ByteOrder elByteOrder) : TiffEntryBase(tag, group), - elTypeId_(elTypeId), + elTypeId_(elTypeId), elByteOrder_(elByteOrder) {} //! Virtual destructor. virtual ~TiffArrayElement() {} @@ -557,7 +557,7 @@ namespace Exiv2 { private: // DATA 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 diff --git a/src/tiffparse.cpp b/src/tiffparse.cpp index 25d67eeb..a047ccc4 100644 --- a/src/tiffparse.cpp +++ b/src/tiffparse.cpp @@ -52,8 +52,8 @@ try { TiffRwState::AutoPtr state( new TiffRwState(tiffHeader.byteOrder(), 0, createFct)); - TiffReader reader(buf.pData_, - buf.size_, + TiffReader reader(buf.pData_, + buf.size_, rootDir.get(), state); diff --git a/src/tiffparser.cpp b/src/tiffparser.cpp index a12d12fe..4f63c742 100644 --- a/src/tiffparser.cpp +++ b/src/tiffparser.cpp @@ -55,7 +55,7 @@ EXIV2_RCSID("@(#) $Id$"); + Review boundary checking, is it better to check the offsets? + Define and implement consistent error handling for recursive hierarchy + 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. + TiffComponent: should it have end() and setEnd() or pData and size? + Can NewTiffCompFct and TiffCompFactoryFct be combined? @@ -87,7 +87,7 @@ namespace Exiv2 { Makernote structures) and determines the corresponding Exiv2 TIFF 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 - 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 combination, which create function is used and what the group of the new component is. diff --git a/src/tiffparser.hpp b/src/tiffparser.hpp index d28eb5a4..8958401c 100644 --- a/src/tiffparser.hpp +++ b/src/tiffparser.hpp @@ -56,7 +56,7 @@ namespace Exiv2 { class TiffCreator { 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. 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 - 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. */ class TiffParser { diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp index 91d86fc6..81ac80d6 100644 --- a/src/tiffvisitor.cpp +++ b/src/tiffvisitor.cpp @@ -136,7 +136,7 @@ namespace Exiv2 { TiffMetadataDecoder::TiffMetadataDecoder(Image* pImage, TiffComponent* const pRoot, uint32_t threshold) - : pImage_(pImage), pRoot_(pRoot), threshold_(threshold) + : pImage_(pImage), pRoot_(pRoot), threshold_(threshold) { // Find camera make TiffFinder finder(0x010f, Group::ifd0); @@ -217,7 +217,7 @@ namespace Exiv2 { << std::setfill('0') << std::hex << object->tag() << "\n"; #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 ExifKey key(object->tag(), object->groupName()); setExifTag(key, object->pValue()); @@ -236,9 +236,9 @@ namespace Exiv2 { i = groupType_.find(object->group()); 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 - ExifKey key(object->tag(), tiffGroupName(Group::ifd0)); + ExifKey key(object->tag(), tiffGroupName(Group::ifd0)); setExifTag(key, object->pValue()); } @@ -252,7 +252,7 @@ namespace Exiv2 { groupType_[object->group()] = object->pValue()->toLong(); } - const TiffDecoderInfo* td = find(tiffDecoderInfo_, + const TiffDecoderInfo* td = find(tiffDecoderInfo_, TiffDecoderInfo::Key(make_, object->tag(), object->group())); if (td) { // skip decoding if td->decoderFct_ == 0 @@ -262,8 +262,8 @@ namespace Exiv2 { return; } assert(pImage_ != 0); - // "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 + // "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 // necessary to use groupName here ExifKey key(object->tag(), object->groupName()); // Todo: Too much searching here, optimize when threshold goes. @@ -281,7 +281,7 @@ namespace Exiv2 { #ifndef SUPPRESS_WARNINGS std::cerr << "Warning: " << "Size " << pValue->size() << " of " << key.key() - << " exceeds " << threshold_ + << " exceeds " << threshold_ << " bytes limit. Not decoded.\n"; #endif return; @@ -341,7 +341,7 @@ namespace Exiv2 { { assert(object != 0); - os_ << prefix() << object->groupName() << " directory with " + os_ << prefix() << object->groupName() << " directory with " // cast to make MSVC happy << std::dec << static_cast(object->components_.size()); if (object->components_.size() == 1) os_ << " entry:\n"; @@ -355,7 +355,7 @@ namespace Exiv2 { decIndent(); if (object->hasNext()) { if (object->pNext_) os_ << prefix() << "Next directory:\n"; - else os_ << prefix() << "No next directory\n"; + else os_ << prefix() << "No next directory\n"; } } // TiffPrinter::visitDirectoryNext @@ -378,7 +378,7 @@ namespace Exiv2 { void TiffPrinter::visitIfdMakernote(TiffIfdMakernote* object) { - // Nothing to do + // Nothing to do } // TiffPrinter::visitIfdMakernote void TiffPrinter::printTiffEntry(TiffEntryBase* object, @@ -417,7 +417,7 @@ namespace Exiv2 { void TiffPrinter::visitArrayElement(TiffArrayElement* object) { - printTiffEntry(object, prefix()); + printTiffEntry(object, prefix()); } // TiffPrinter::visitArrayElement TiffReader::TiffReader(const byte* pData, @@ -454,7 +454,7 @@ namespace Exiv2 { // 0 for create function indicates 'no change' if (state->createFct_ == 0) state->createFct_ = pState_->createFct_; // invalidByteOrder indicates 'no change' - if (state->byteOrder_ == invalidByteOrder) state->byteOrder_ = pState_->byteOrder_; + if (state->byteOrder_ == invalidByteOrder) state->byteOrder_ = pState_->byteOrder_; pState_ = state.release(); } } @@ -464,14 +464,14 @@ namespace Exiv2 { assert(pState_); return pState_->byteOrder_; } - + uint32_t TiffReader::baseOffset() const { assert(pState_); return pState_->baseOffset_; } - TiffComponent::AutoPtr TiffReader::create(uint32_t extendedTag, + TiffComponent::AutoPtr TiffReader::create(uint32_t extendedTag, uint16_t group) const { assert(pState_); @@ -630,7 +630,7 @@ namespace Exiv2 { return; } // 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)); td->setStart(pData_ + baseOffset() + offset); object->addChild(td); @@ -661,7 +661,7 @@ namespace Exiv2 { if (te && te->pValue()) { make = te->pValue()->toString(); // create concrete makernote, based on make and makernote contents - object->mn_ = TiffMnCreator::create(object->tag(), + object->mn_ = TiffMnCreator::create(object->tag(), object->mnGroup_, make, object->pData(), @@ -676,12 +676,12 @@ namespace Exiv2 { { assert(object != 0); - if (!object->readHeader(object->start(), - static_cast(pLast_ - object->start()), + if (!object->readHeader(object->start(), + static_cast(pLast_ - object->start()), byteOrder())) { #ifndef SUPPRESS_WARNINGS - std::cerr << "Error: Failed to read " - << object->ifd_.groupName() + std::cerr << "Error: Failed to read " + << object->ifd_.groupName() << " IFD Makernote header.\n"; #ifdef DEBUG if (static_cast(pLast_ - object->start()) >= 16) { @@ -816,8 +816,8 @@ namespace Exiv2 { object->pData_ = p; Value::AutoPtr v = Value::create(object->typeId()); if (v.get()) { - ByteOrder b = - object->elByteOrder() == invalidByteOrder ? + ByteOrder b = + object->elByteOrder() == invalidByteOrder ? byteOrder() : object->elByteOrder(); v->read(object->pData(), object->size(), b); object->pValue_ = v.release(); diff --git a/src/tiffvisitor.hpp b/src/tiffvisitor.hpp index df33a57f..7bb58221 100644 --- a/src/tiffvisitor.hpp +++ b/src/tiffvisitor.hpp @@ -20,7 +20,7 @@ */ /*! @file tiffvisitor.hpp - @brief + @brief @version $Rev$ @author Andreas Huggel (ahu) ahuggel@gmx.net @@ -56,7 +56,7 @@ namespace Exiv2 { // 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) A concrete visitor class is used as shown in the example below. Accept() @@ -108,7 +108,7 @@ namespace Exiv2 { */ 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. */ virtual void visitDirectoryEnd(TiffDirectory* object) {} @@ -140,7 +140,7 @@ namespace Exiv2 { /*! @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 - 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(). */ class TiffFinder : public TiffVisitor { @@ -148,7 +148,7 @@ namespace Exiv2 { //! @name Creators //@{ //! 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) {} //! Virtual destructor virtual ~TiffFinder() {} @@ -170,9 +170,9 @@ namespace Exiv2 { virtual void visitMnEntry(TiffMnEntry* object); //! Find tag and group in an IFD makernote 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); - //! Find tag and group in an array element + //! Find tag and group in an array element virtual void visitArrayElement(TiffArrayElement* object); //! Check if \em object matches \em tag and \em group @@ -189,7 +189,7 @@ namespace Exiv2 { */ TiffComponent* result() const { return tiffComponent_; } //@} - + private: uint16_t tag_; uint16_t group_; @@ -203,11 +203,11 @@ namespace Exiv2 { struct TiffDecoderInfo { 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 of the key of the same size. E.g., decoder info = "OLYMPUS", 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. */ bool operator==(const Key& key) const; @@ -245,7 +245,7 @@ namespace Exiv2 { @brief Constructor, taking the image to add the metadata to, the root element of the composite to decode and an optional 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). */ TiffMetadataDecoder(Image* pImage, @@ -305,8 +305,8 @@ namespace Exiv2 { }; // class TiffMetadataDecoder /*! - @brief Simple state class containing relevant state information for - the TIFF reader. This is in a separate class so that the + @brief Simple state class containing relevant state information for + the TIFF reader. This is in a separate class so that the reader can change state if needed (e.g., to read certain complex makernotes). */ @@ -314,12 +314,12 @@ namespace Exiv2 { friend class TiffReader; public: //! TiffRWState auto_ptr type - typedef std::auto_ptr AutoPtr; + typedef std::auto_ptr AutoPtr; //! @name Creators //@{ //! Constructor. - TiffRwState(ByteOrder byteOrder, + TiffRwState(ByteOrder byteOrder, uint32_t baseOffset, TiffCompFactoryFct createFct =0) : byteOrder_(byteOrder), @@ -330,12 +330,12 @@ namespace Exiv2 { //! @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. */ 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 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_; } /*! - @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 makernotes can independently use their own factory function and lookup table, which can be defined together with the makernote @@ -356,7 +356,7 @@ namespace Exiv2 { */ TiffCompFactoryFct createFct() const { return createFct_; } //@} - + private: ByteOrder byteOrder_; const uint32_t baseOffset_; @@ -378,7 +378,7 @@ namespace Exiv2 { @param pData Pointer to the data buffer, starting with a TIFF header. @param size Number of bytes in the data buffer. @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. */ TiffReader(const byte* pData, @@ -443,7 +443,7 @@ namespace Exiv2 { }; // 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. */ class TiffPrinter : public TiffVisitor { @@ -491,7 +491,7 @@ namespace Exiv2 { //! @name Accessors //@{ //! Print a standard TIFF entry. - void printTiffEntry(TiffEntryBase* object, + void printTiffEntry(TiffEntryBase* object, const std::string& prefix ="") const; //! Return the current prefix std::string prefix() const { return prefix_; } diff --git a/src/types.hpp b/src/types.hpp index 4f6f9810..063cc68c 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -62,7 +62,7 @@ typedef __int32 int32_t; /*! @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 [33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?. */ #define EXV_CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) @@ -106,7 +106,7 @@ namespace Exiv2 { enum IfdId { ifdIdNotSet, ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id, canonIfdId, canonCs1IfdId, canonCs2IfdId, canonCfIfdId, - fujiIfdId, + fujiIfdId, minoltaIfdId, minoltaCs5DIfdId, minoltaCs7DIfdId, minoltaCsOldIfdId, minoltaCsNewIfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId, @@ -315,7 +315,7 @@ namespace Exiv2 { /*! @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. 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 @@ -327,34 +327,34 @@ namespace Exiv2 { int i; int k; const char* data; - + struct Key; bool operator==(const Bar::Key& rhs) const; }; - + struct Bar::Key { Key(int a, int b) : i(a), k(b) {} int i; int k; }; - + bool Bar::operator==(const Bar::Key& key) const // definition { return i == key.i && k == key.k; } - + const Bar bars[] = { - { 1, 1, "bar data 1" }, - { 1, 2, "bar data 2" }, + { 1, 1, "bar data 1" }, + { 1, 2, "bar data 2" }, { 1, 3, "bar data 3" } }; - + int main ( void ) { const Bar* bar = find(bars, Bar::Key(1, 3)); if (bar) std::cout << bar->data << "\n"; else std::cout << "Key not found.\n"; return 0; - } + } @endcode */ template