24 #include "exception.h"
25 #include "metavalue.h"
27 using namespace Debug;
31 MetaValue::MetaValue(
const MetaValue & r)
36 MetaValue::MetaValue(
const value_t &v)
48 return MetaValue::value_t(v);
56 case Internals::IFD::EXIF_FORMAT_BYTE:
58 m_value = convert<uint8_t>(e);
61 case Internals::IFD::EXIF_FORMAT_ASCII:
63 m_value = convert<std::string>(e);
66 case Internals::IFD::EXIF_FORMAT_SHORT:
68 m_value = convert<uint16_t>(e);
71 case Internals::IFD::EXIF_FORMAT_LONG:
73 m_value = convert<uint32_t>(e);
77 Trace(DEBUG1) <<
"unhandled type " << e->type() <<
"\n";
83 inline T MetaValue::get()
const
84 throw(Internals::BadTypeException)
87 assert(!m_value.empty());
89 v = boost::get<T>(m_value);
92 throw Internals::BadTypeException();
98 uint32_t MetaValue::getInteger()
const
99 throw(Internals::BadTypeException)
101 return get<uint32_t>();
104 std::string MetaValue::getString()
const
105 throw(Internals::BadTypeException)
107 return get<std::string>();
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard. I guess it failed.
static T get(IFDEntry &e, uint32_t idx=0, bool ignore_type=false)
boost::shared_ptr< IFDEntry > Ref