libopenraw
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
OpenRaw::Internals::IfdEntry Class Reference

Public Types

typedef std::shared_ptr< IfdEntryRef
 

Public Member Functions

 IfdEntry (uint16_t _id, int16_t _type, int32_t _count, uint32_t _data, IfdFileContainer &_container)
 
int16_t type () const noexcept
 
uint32_t count () const noexcept
 
off_t offset () noexcept
 
RawContainer::EndianType endian () const
 
MetaValuemake_meta_value ()
 
bool loadData (size_t unit_size)
 
template<typename T >
Option< std::vector< T > > getArray ()
 
uint32_t getIntegerArrayItem (int idx)
 

Static Public Member Functions

static size_t type_unit_size (IFD::ExifTagType _type)
 

Friends

template<typename T >
struct IfdTypeTrait
 

Detailed Description

Definition at line 161 of file ifdentry.hpp.

Member Typedef Documentation

◆ Ref

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

Ref (ie shared pointer)

Definition at line 165 of file ifdentry.hpp.

Member Function Documentation

◆ count()

uint32_t OpenRaw::Internals::IfdEntry::count ( ) const
inlinenoexcept

the count of items in the entry

Definition at line 178 of file ifdentry.hpp.

◆ getArray()

template<typename T >
Option<std::vector<T> > OpenRaw::Internals::IfdEntry::getArray ( )
inline

get the array values of type T

Parameters
Tthe type of the value needed
arraythe storage
Exceptions
whateveris thrown

Definition at line 216 of file ifdentry.hpp.

◆ loadData()

bool OpenRaw::Internals::IfdEntry::loadData ( size_t  unit_size)

load the data for the entry if all the data fits in m_data, it is a noop

Parameters
unit_sizethe size of 1 unit of data
Returns
true if success.

Definition at line 161 of file ifdentry.cpp.

References OpenRaw::Internals::RawContainer::ENDIAN_LITTLE, OpenRaw::Internals::IfdFileContainer::exifOffsetCorrection(), OpenRaw::Internals::RawContainer::fetchData(), and OpenRaw::Internals::IfdTypeTrait< T >::get().

◆ offset()

off_t OpenRaw::Internals::IfdEntry::offset ( )
inlinenoexcept

the offset of the data. It can just be the value if the entry is self contained.

Definition at line 186 of file ifdentry.hpp.

References OpenRaw::Internals::RawContainer::ENDIAN_LITTLE.

◆ type_unit_size()

size_t OpenRaw::Internals::IfdEntry::type_unit_size ( IFD::ExifTagType  _type)
static

Unit size for type

Definition at line 95 of file ifdentry.cpp.


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