libopenraw
Public Types | Public Member Functions | List of all members
OpenRaw::Internals::IfdDir Class Reference
Inheritance diagram for OpenRaw::Internals::IfdDir:
OpenRaw::Internals::MakerNoteDir

Public Types

typedef std::shared_ptr< IfdDirRef
 
typedef std::vector< Ref > RefVec
 

Public Member Functions

 IfdDir (off_t _offset, IfdFileContainer &_container)
 
bool isPrimary () const
 
bool isThumbnail () const
 
off_t offset () const
 
const IfdFileContainercontainer () const
 
bool load ()
 
int numTags ()
 
IfdEntry::Ref getEntry (uint16_t id) const
 
template<typename T >
bool getValue (uint16_t id, T &v) const
 
bool getIntegerValue (uint16_t id, uint32_t &v)
 
off_t nextIFD ()
 
Ref getSubIFD (uint32_t idx=0) const
 
bool getSubIFDs (std::vector< IfdDir::Ref > &ifds)
 
Ref getExifIFD ()
 
Ref getMakerNoteIfd ()
 

Detailed Description

Definition at line 43 of file ifddir.hpp.

Member Function Documentation

§ getExifIFD()

IfdDir::Ref OpenRaw::Internals::IfdDir::getExifIFD ( )

get the Exif IFD.

Returns
Ref to the new IfdDir if found

The SubIFD is located at offset found in the field EXIF_TAG_SUB_IFDS

Definition at line 173 of file ifddir.cpp.

Referenced by getValue().

§ getIntegerValue()

bool OpenRaw::Internals::IfdDir::getIntegerValue ( uint16_t  id,
uint32_t &  v 
)

Get an loosely typed integer value from an entry. This method is preferred over getLongValue() or getShortValue() unless you really want the strong typing that IFD structure provide

Parameters
idthe IFD field id
Return values
vthe long value
Returns
true if success

Definition at line 94 of file ifddir.cpp.

Referenced by getValue().

§ getMakerNoteIfd()

IfdDir::Ref OpenRaw::Internals::IfdDir::getMakerNoteIfd ( )

get the MakerNote IFD.

Returns
Ref to the new MakerNoteDir if found

Definition at line 192 of file ifddir.cpp.

References OpenRaw::Internals::MakerNoteDir::createMakerNote().

Referenced by getValue().

§ getSubIFD()

IfdDir::Ref OpenRaw::Internals::IfdDir::getSubIFD ( uint32_t  idx = 0) const

get the SubIFD at index idx.

Returns
Ref to the new IfdDir if found

The SubIFD is locate at offset found in the field EXIF_TAG_SUB_IFDS

Definition at line 128 of file ifddir.cpp.

Referenced by getValue().

§ getSubIFDs()

bool OpenRaw::Internals::IfdDir::getSubIFDs ( std::vector< IfdDir::Ref > &  ifds)

get all SubIFDs

Return values
ifdsthe list of IFDs Ref
Returns
true if found / success

Definition at line 148 of file ifddir.cpp.

Referenced by getValue().

§ getValue()

template<typename T >
bool OpenRaw::Internals::IfdDir::getValue ( uint16_t  id,
T &  v 
) const
inline

Get a T value from an entry

Parameters
idthe IFD field id
Return values
vthe long value
Returns
true if success

Definition at line 70 of file ifddir.hpp.

References OpenRaw::Internals::IfdTypeTrait< T >::get(), getExifIFD(), getIntegerValue(), getMakerNoteIfd(), getSubIFD(), getSubIFDs(), and nextIFD().

§ load()

bool OpenRaw::Internals::IfdDir::load ( )

load the directory to memory

Definition at line 58 of file ifddir.cpp.

Referenced by offset().

§ nextIFD()

off_t OpenRaw::Internals::IfdDir::nextIFD ( )

get the offset of the next IFD in absolute

Definition at line 105 of file ifddir.cpp.

Referenced by getValue().

§ numTags()

int OpenRaw::Internals::IfdDir::numTags ( )
inline

return the number of entries

Definition at line 61 of file ifddir.hpp.

§ offset()

off_t OpenRaw::Internals::IfdDir::offset ( ) const
inline

return the offset

Definition at line 55 of file ifddir.hpp.

References load().

Referenced by OpenRaw::Internals::MakerNoteDir::createMakerNote().


The documentation for this class was generated from the following files: