libopenraw
OpenRaw::Internals::IfdTypeTrait< T > Struct Template Reference

#include <ifdentry.hpp>

Public Member Functions

uint8_t EL (const uint8_t *b, size_t) noexcept
uint8_t BE (const uint8_t *b, size_t) noexcept
uint16_t EL (const uint8_t *b, size_t) noexcept
uint16_t BE (const uint8_t *b, size_t) noexcept
uint32_t EL (const uint8_t *b, size_t) noexcept
uint32_t BE (const uint8_t *b, size_t) noexcept
std::string EL (const uint8_t *b, size_t len) noexcept
std::string BE (const uint8_t *b, size_t len) noexcept
IFD::Rational EL (const uint8_t *b, size_t) noexcept
IFD::Rational BE (const uint8_t *b, size_t) noexcept
IFD::SRational EL (const uint8_t *b, size_t) noexcept
IFD::SRational BE (const uint8_t *b, size_t) noexcept

Static Public Member Functions

static T EL (const uint8_t *d, size_t len) noexcept
static T BE (const uint8_t *d, size_t len) noexcept
static T get (IfdEntry &e, uint32_t idx=0, bool ignore_type=false) noexcept(false)

Static Public Attributes

static const uint16_t type
static const size_t size

Detailed Description

template<typename T>
struct OpenRaw::Internals::IfdTypeTrait< T >

Describe and IFDType

Definition at line 53 of file ifdentry.hpp.

Member Function Documentation

◆ BE() [1/6]

std::string OpenRaw::Internals::IfdTypeTrait< std::string >::BE ( const uint8_t * b,
size_t len )
inlinenoexcept

Definition at line 114 of file ifdentry.hpp.

◆ BE() [2/6]

uint8_t OpenRaw::Internals::IfdTypeTrait< uint8_t >::BE ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 71 of file ifdentry.hpp.

◆ BE() [3/6]

uint16_t OpenRaw::Internals::IfdTypeTrait< uint16_t >::BE ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 84 of file ifdentry.hpp.

◆ BE() [4/6]

uint32_t OpenRaw::Internals::IfdTypeTrait< uint32_t >::BE ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 96 of file ifdentry.hpp.

◆ BE() [5/6]

IFD::Rational OpenRaw::Internals::IfdTypeTrait< IFD::Rational >::BE ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 135 of file ifdentry.hpp.

◆ BE() [6/6]

IFD::SRational OpenRaw::Internals::IfdTypeTrait< IFD::SRational >::BE ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 153 of file ifdentry.hpp.

◆ EL() [1/6]

std::string OpenRaw::Internals::IfdTypeTrait< std::string >::EL ( const uint8_t * b,
size_t len )
inlinenoexcept

Definition at line 102 of file ifdentry.hpp.

◆ EL() [2/6]

uint8_t OpenRaw::Internals::IfdTypeTrait< uint8_t >::EL ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 65 of file ifdentry.hpp.

◆ EL() [3/6]

uint16_t OpenRaw::Internals::IfdTypeTrait< uint16_t >::EL ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 78 of file ifdentry.hpp.

◆ EL() [4/6]

uint32_t OpenRaw::Internals::IfdTypeTrait< uint32_t >::EL ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 90 of file ifdentry.hpp.

◆ EL() [5/6]

IFD::Rational OpenRaw::Internals::IfdTypeTrait< IFD::Rational >::EL ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 126 of file ifdentry.hpp.

◆ EL() [6/6]

IFD::SRational OpenRaw::Internals::IfdTypeTrait< IFD::SRational >::EL ( const uint8_t * b,
size_t  )
inlinenoexcept

Definition at line 144 of file ifdentry.hpp.

◆ get()

template<typename T>
T OpenRaw::Internals::IfdTypeTrait< T >::get ( IfdEntry & e,
uint32_t idx = 0,
bool ignore_type = false )
static

get the value of type T

Parameters
Tthe type of the value needed
idxthe index, by default 0
ignore_typeif true, don't check type. DANGEROUS Default is false.
Returns
the value
Exceptions
BadTypeExceptionin case of wrong typing.
OutOfRangeExceptionin case of subscript out of range

Definition at line 262 of file ifdentry.hpp.

References OpenRaw::Internals::RawContainer::ENDIAN_LITTLE, size, and type.

Referenced by OpenRaw::Internals::IfdEntry::getArray(), and OpenRaw::Internals::IfdDir::getValue().

Member Data Documentation

◆ size

template<typename T>
const size_t OpenRaw::Internals::IfdTypeTrait< T >::size
static

the storage size unit in IFD

Definition at line 56 of file ifdentry.hpp.

Referenced by get().

◆ type

template<typename T>
const uint16_t OpenRaw::Internals::IfdTypeTrait< T >::type
static

the EXIF enum for the type

Definition at line 55 of file ifdentry.hpp.

Referenced by get().


The documentation for this struct was generated from the following file: