Moved ExifDatum::ignore from exif.hpp to the exif.cpp.

This frees up exif.hpp from needing to include tags_int.hpp.

The downside is that this function is no longer inline.
v0.27.3
sridharb 9 years ago
parent d05634a2e3
commit d78dec24e3

@ -35,7 +35,6 @@
#include "tags.hpp"
#include "value.hpp"
#include "types.hpp"
#include "tags_int.hpp"
// + standard includes
#include <string>
@ -249,47 +248,7 @@ namespace Exiv2 {
@return true if it can be ignored, false otherwise.
*/
bool ignore(void) const
{
bool bRet = false;
const Value &v = value();
if (v.count() > 0)
{
const TagInfo* ti = Internal::tagInfo(tag(), static_cast<Internal::IfdId>(ifdId()));
if (ti && ti->hasUndefined_)
{
const Value &udv = ti->undefValue_;
if ((udv.count() != 0))
{
switch (ti->compT_)
{
case TagInfo::String:
{
bRet = compare<std::string>(v.toString(), udv.toString(), ti->compO_);
break;
}
case TagInfo::Long:
{
bRet = compare<long>(v.toLong(), udv.toLong(), ti->compO_);
break;
}
case TagInfo::Float:
{
bRet = compare<float>(v.toFloat(), udv.toFloat(), ti->compO_);
break;
}
case TagInfo::Rational:
{
bRet = compare<Rational>(v.toRational(), udv.toRational(), ti->compO_);
break;
}
}
}
}
}
return bRet;
}
bool ignore(void) const;
//! Return the size of the data area.
long sizeDataArea() const;
/*!

@ -417,7 +417,49 @@ namespace Exiv2 {
return value_.get() == 0 ? Value::AutoPtr(0) : value_->clone();
}
long Exifdatum::sizeDataArea() const
bool Exifdatum::ignore(void) const
{
bool bRet = false;
const Value &v = value();
if (v.count() > 0)
{
const TagInfo* ti = Internal::tagInfo(tag(), static_cast<Internal::IfdId>(ifdId()));
if (ti && ti->hasUndefined_)
{
const Value &udv = ti->undefValue_;
if ((udv.count() != 0))
{
switch (ti->compT_)
{
case TagInfo::String:
{
bRet = compare<std::string>(v.toString(), udv.toString(), ti->compO_);
break;
}
case TagInfo::Long:
{
bRet = compare<long>(v.toLong(), udv.toLong(), ti->compO_);
break;
}
case TagInfo::Float:
{
bRet = compare<float>(v.toFloat(), udv.toFloat(), ti->compO_);
break;
}
case TagInfo::Rational:
{
bRet = compare<Rational>(v.toRational(), udv.toRational(), ti->compO_);
break;
}
}
}
}
}
return bRet;
}
long Exifdatum::sizeDataArea() const
{
return value_.get() == 0 ? 0 : value_->sizeDataArea();
}

Loading…
Cancel
Save