libopenraw
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>
Option< T > getValue (uint16_t id) const
Option< uint32_t > getIntegerValue (uint16_t id)
off_t nextIFD ()
Ref getSubIFD (uint32_t idx=0) const
Option< std::vector< IfdDir::Ref > > getSubIFDs ()
Ref getExifIFD ()
Ref getMakerNoteIfd ()

Detailed Description

Definition at line 44 of file ifddir.hpp.

Member Typedef Documentation

◆ Ref

typedef std::shared_ptr<IfdDir> OpenRaw::Internals::IfdDir::Ref

Definition at line 46 of file ifddir.hpp.

◆ RefVec

typedef std::vector<Ref> OpenRaw::Internals::IfdDir::RefVec

Definition at line 47 of file ifddir.hpp.

Constructor & Destructor Documentation

◆ IfdDir()

OpenRaw::Internals::IfdDir::IfdDir ( off_t _offset,
IfdFileContainer & _container )

Definition at line 50 of file ifddir.cpp.

◆ ~IfdDir()

OpenRaw::Internals::IfdDir::~IfdDir ( )
virtual

Definition at line 55 of file ifddir.cpp.

Member Function Documentation

◆ container()

const IfdFileContainer & OpenRaw::Internals::IfdDir::container ( ) const
inline

Definition at line 57 of file ifddir.hpp.

◆ getEntry()

IfdEntry::Ref OpenRaw::Internals::IfdDir::getEntry ( uint16_t id) const

Definition at line 90 of file ifddir.cpp.

◆ 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.

References getExifIFD(), and getValue().

Referenced by getExifIFD().

◆ getIntegerValue()

Option< uint32_t > OpenRaw::Internals::IfdDir::getIntegerValue ( uint16_t id)

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
Returns
an Option<uint32_t> containing the value or none.

Definition at line 101 of file ifddir.cpp.

References getIntegerValue().

Referenced by getIntegerValue().

◆ getMakerNoteIfd()

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

get the MakerNote IFD.

Returns
Ref to the new MakerNoteDir if found

Definition at line 191 of file ifddir.cpp.

References OpenRaw::Internals::MakerNoteDir::createMakerNote(), and getMakerNoteIfd().

Referenced by getMakerNoteIfd().

◆ 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 131 of file ifddir.cpp.

References getSubIFD().

Referenced by getSubIFD().

◆ getSubIFDs()

Option< std::vector< IfdDir::Ref > > OpenRaw::Internals::IfdDir::getSubIFDs ( )

get all SubIFDs

Returns
an option of ifds the list of IFDs Ref

Definition at line 151 of file ifddir.cpp.

References getSubIFDs().

Referenced by getSubIFDs().

◆ getValue()

template<typename T>
Option< T > OpenRaw::Internals::IfdDir::getValue ( uint16_t id) const
inline

Get a T value from an entry

Parameters
idthe IFD field id
Returns
an Option<T> containing the value or none.

Definition at line 70 of file ifddir.hpp.

References OpenRaw::Internals::IfdTypeTrait< T >::get().

Referenced by getExifIFD().

◆ isPrimary()

bool OpenRaw::Internals::IfdDir::isPrimary ( ) const

Definition at line 38 of file ifddir.cpp.

◆ isThumbnail()

bool OpenRaw::Internals::IfdDir::isThumbnail ( ) const

Definition at line 44 of file ifddir.cpp.

◆ load()

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

load the directory to memory

Definition at line 59 of file ifddir.cpp.

References load().

Referenced by load().

◆ nextIFD()

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

get the offset of the next IFD in absolute

Definition at line 110 of file ifddir.cpp.

References nextIFD().

Referenced by nextIFD().

◆ numTags()

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

return the number of entries

Definition at line 62 of file ifddir.hpp.

◆ offset()

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

return the offset

Definition at line 56 of file ifddir.hpp.

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


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