Added ExifKey::defaultCount() to access the new count reference information.

v0.27.3
Andreas Huggel 15 years ago
parent 0da6e6f47d
commit 4928c8d270

@ -2887,6 +2887,12 @@ namespace Exiv2 {
return p_->tagInfo_->typeId_;
}
uint16_t ExifKey::defaultCount() const
{
if (p_->tagInfo_ == 0 || p_->tagInfo_->tag_ == 0xffff) return unknownTag.count_;
return p_->tagInfo_->count_;
}
uint16_t ExifKey::tag() const
{
return p_->tag_;

@ -172,7 +172,7 @@ namespace Exiv2 {
@throw Error if the key cannot be constructed from the tag and IFD
item parameters.
*/
ExifKey(const TagInfo& tagInfo);
explicit ExifKey(const TagInfo& tagInfo);
//! Copy constructor
ExifKey(const ExifKey& rhs);
//! Destructor
@ -204,6 +204,8 @@ namespace Exiv2 {
std::string tagDesc() const; // Todo: should be in the base class
//! Return the default type id for this tag.
TypeId defaultTypeId() const; // Todo: should be in the base class
//! Return the default number of components (not bytes!) this tag has. (0=any, -1=count not known.)
uint16_t defaultCount() const;
virtual uint16_t tag() const;
AutoPtr clone() const;

Loading…
Cancel
Save