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 >
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 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()

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.

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

Referenced by getValue().

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

Referenced by getValue().

◆ 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(), getExifIFD(), getIntegerValue(), getMakerNoteIfd(), getSubIFD(), getSubIFDs(), and nextIFD().

◆ load()

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

load the directory to memory

Definition at line 59 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 110 of file ifddir.cpp.

Referenced by getValue().

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

References load().

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


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