RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
rawspeed::CiffIFD Class Referencefinal

#include "tiff/CiffIFD.h"

Collaboration diagram for rawspeed::CiffIFD:
[legend]

Classes

struct  Limits

Public Member Functions

 CiffIFD (CiffIFD *parent)
 CiffIFD (CiffIFD *parent, ByteStream directory)
std::vector< const CiffIFD * > RAWSPEED_READONLY getIFDsWithTag (CiffTag tag) const
std::vector< const CiffIFD * > RAWSPEED_READONLY getIFDsWithTagWhere (CiffTag tag, uint32_t isValue) const
std::vector< const CiffIFD * > RAWSPEED_READONLY getIFDsWithTagWhere (CiffTag tag, const std::string &isValue) const
bool RAWSPEED_READONLY hasEntry (CiffTag tag) const
bool RAWSPEED_READONLY hasEntryRecursive (CiffTag tag) const
const CiffEntry *RAWSPEED_READONLY getEntry (CiffTag tag) const
const CiffEntry *RAWSPEED_READONLY getEntryRecursive (CiffTag tag) const
const CiffEntry *RAWSPEED_READONLY getEntryRecursiveWhere (CiffTag tag, uint32_t isValue) const
const CiffEntry *RAWSPEED_READONLY getEntryRecursiveWhere (CiffTag tag, const std::string &isValue) const
template<typename Lambda>
std::vector< const CiffIFD * > getIFDsWithTagIf (CiffTag tag, const Lambda &f) const
template<typename Lambda>
const CiffEntrygetEntryRecursiveIf (CiffTag tag, const Lambda &f) const

Private Member Functions

void recursivelyIncrementSubIFDCount ()
void checkSubIFDs (int headroom) const
void recursivelyCheckSubIFDs (int headroom) const
void add (std::unique_ptr< CiffIFD > subIFD)
void add (std::unique_ptr< CiffEntry > entry)
void parseIFDEntry (NORangesSet< Buffer > *valueDatas, ByteStream valueData, ByteStream &dirEntries)
template<typename Lambda>
std::vector< const CiffIFD * > RAWSPEED_READONLY getIFDsWithTagIf (CiffTag tag, const Lambda &f) const
template<typename Lambda>
const CiffEntry *RAWSPEED_READONLY getEntryRecursiveIf (CiffTag tag, const Lambda &f) const

Private Attributes

CiffIFD *const parent
std::vector< std::unique_ptr< const CiffIFD > > mSubIFD
std::map< CiffTag, std::unique_ptr< const CiffEntry > > mEntry
int subIFDCount = 0
int subIFDCountRecursive = 0

Detailed Description

Definition at line 42 of file CiffIFD.h.

Constructor & Destructor Documentation

◆ CiffIFD() [1/2]

rawspeed::CiffIFD::CiffIFD ( CiffIFD * parent)
explicit

Definition at line 68 of file CiffIFD.cpp.

References CiffIFD(), parent, recursivelyCheckSubIFDs(), and recursivelyIncrementSubIFDCount().

Referenced by CiffIFD(), CiffIFD(), getEntryRecursiveIf(), recursivelyCheckSubIFDs(), and recursivelyIncrementSubIFDCount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CiffIFD() [2/2]

rawspeed::CiffIFD::CiffIFD ( CiffIFD * parent,
ByteStream directory )

Definition at line 76 of file CiffIFD.cpp.

References CiffIFD(), assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::Buffer::getSize(), rawspeed::ByteStream::getStream(), rawspeed::ByteStream::getU16(), rawspeed::ByteStream::getU32(), mEntry, mSubIFD, parseIFDEntry(), rawspeed::ByteStream::setPosition(), subIFDCount, subIFDCountRecursive, and ThrowCPE.

Here is the call graph for this function:

Member Function Documentation

◆ add() [1/2]

void rawspeed::CiffIFD::add ( std::unique_ptr< CiffEntry > entry)
private

Definition at line 161 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::isIn(), and mEntry.

Here is the call graph for this function:

◆ add() [2/2]

void rawspeed::CiffIFD::add ( std::unique_ptr< CiffIFD > subIFD)
private

Definition at line 152 of file CiffIFD.cpp.

References assert(), and mSubIFD.

Referenced by parseIFDEntry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkSubIFDs()

void rawspeed::CiffIFD::checkSubIFDs ( int headroom) const
private

Definition at line 122 of file CiffIFD.cpp.

References assert(), rawspeed::CiffIFD::Limits::RecursiveSubIFDCount, rawspeed::CiffIFD::Limits::SubIFDCount, subIFDCount, subIFDCountRecursive, and ThrowCPE.

Here is the call graph for this function:

◆ getEntry()

const CiffEntry * rawspeed::CiffIFD::getEntry ( CiffTag tag) const
nodiscard

Definition at line 248 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::isIn(), mEntry, and ThrowCPE.

Here is the call graph for this function:

◆ getEntryRecursive()

const CiffEntry * rawspeed::CiffIFD::getEntryRecursive ( CiffTag tag) const
nodiscard

Definition at line 257 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, getEntryRecursiveIf(), and rawspeed::isIn().

Here is the call graph for this function:

◆ getEntryRecursiveIf() [1/2]

template<typename Lambda>
const CiffEntry * rawspeed::CiffIFD::getEntryRecursiveIf ( CiffTag tag,
const Lambda & f ) const

Definition at line 189 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::isIn(), mEntry, and mSubIFD.

Here is the call graph for this function:

◆ getEntryRecursiveIf() [2/2]

template<typename Lambda>
const CiffEntry *RAWSPEED_READONLY rawspeed::CiffIFD::getEntryRecursiveIf ( CiffTag tag,
const Lambda & f ) const
private

References CiffIFD(), and parent.

Referenced by getEntryRecursive(), getEntryRecursiveWhere(), and getEntryRecursiveWhere().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntryRecursiveWhere() [1/2]

const CiffEntry * rawspeed::CiffIFD::getEntryRecursiveWhere ( CiffTag tag,
const std::string & isValue ) const
nodiscard

Definition at line 272 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, getEntryRecursiveIf(), rawspeed::CiffEntry::getString(), rawspeed::isIn(), and rawspeed::CiffEntry::isString().

Here is the call graph for this function:

◆ getEntryRecursiveWhere() [2/2]

const CiffEntry * rawspeed::CiffIFD::getEntryRecursiveWhere ( CiffTag tag,
uint32_t isValue ) const
nodiscard

Definition at line 263 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, getEntryRecursiveIf(), rawspeed::CiffEntry::getU32(), rawspeed::isIn(), and rawspeed::CiffEntry::isInt().

Here is the call graph for this function:

◆ getIFDsWithTag()

vector< const CiffIFD * > rawspeed::CiffIFD::getIFDsWithTag ( CiffTag tag) const
nodiscard

Definition at line 208 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, getIFDsWithTagIf(), and rawspeed::isIn().

Here is the call graph for this function:

◆ getIFDsWithTagIf() [1/2]

template<typename Lambda>
std::vector< const CiffIFD * > rawspeed::CiffIFD::getIFDsWithTagIf ( CiffTag tag,
const Lambda & f ) const

Definition at line 168 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::isIn(), mEntry, and mSubIFD.

Here is the call graph for this function:

◆ getIFDsWithTagIf() [2/2]

template<typename Lambda>
std::vector< const CiffIFD * > RAWSPEED_READONLY rawspeed::CiffIFD::getIFDsWithTagIf ( CiffTag tag,
const Lambda & f ) const
private

Referenced by getIFDsWithTag(), getIFDsWithTagWhere(), and getIFDsWithTagWhere().

Here is the caller graph for this function:

◆ getIFDsWithTagWhere() [1/2]

vector< const CiffIFD * > rawspeed::CiffIFD::getIFDsWithTagWhere ( CiffTag tag,
const std::string & isValue ) const
nodiscard

Definition at line 223 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, getIFDsWithTagIf(), rawspeed::CiffEntry::getString(), rawspeed::isIn(), and rawspeed::CiffEntry::isString().

Here is the call graph for this function:

◆ getIFDsWithTagWhere() [2/2]

vector< const CiffIFD * > rawspeed::CiffIFD::getIFDsWithTagWhere ( CiffTag tag,
uint32_t isValue ) const
nodiscard

Definition at line 214 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, getIFDsWithTagIf(), rawspeed::CiffEntry::getU32(), rawspeed::isIn(), and rawspeed::CiffEntry::isInt().

Here is the call graph for this function:

◆ hasEntry()

bool RAWSPEED_READONLY rawspeed::CiffIFD::hasEntry ( CiffTag tag) const
nodiscard

Definition at line 230 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::isIn(), and mEntry.

Here is the call graph for this function:

◆ hasEntryRecursive()

bool RAWSPEED_READONLY rawspeed::CiffIFD::hasEntryRecursive ( CiffTag tag) const
nodiscard

Definition at line 236 of file CiffIFD.cpp.

References assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::isIn(), mEntry, and mSubIFD.

Here is the call graph for this function:

◆ parseIFDEntry()

void rawspeed::CiffIFD::parseIFDEntry ( NORangesSet< Buffer > * valueDatas,
ByteStream valueData,
ByteStream & dirEntries )
private

Definition at line 45 of file CiffIFD.cpp.

References add(), assert(), rawspeed::CiffTagsWeCareAbout, rawspeed::CiffEntry::Create(), rawspeed::CiffEntry::data, rawspeed::ByteStream::getStream(), rawspeed::isIn(), rawspeed::SUB1, rawspeed::SUB2, rawspeed::CiffEntry::tag, and rawspeed::CiffEntry::type.

Referenced by CiffIFD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recursivelyCheckSubIFDs()

void rawspeed::CiffIFD::recursivelyCheckSubIFDs ( int headroom) const
private

Definition at line 136 of file CiffIFD.cpp.

References CiffIFD(), assert(), rawspeed::CiffIFD::Limits::Depth, and ThrowCPE.

Referenced by CiffIFD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recursivelyIncrementSubIFDCount()

void rawspeed::CiffIFD::recursivelyIncrementSubIFDCount ( )
private

Definition at line 111 of file CiffIFD.cpp.

References CiffIFD(), and parent.

Referenced by CiffIFD().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mEntry

std::map<CiffTag, std::unique_ptr<const CiffEntry> > rawspeed::CiffIFD::mEntry
private

◆ mSubIFD

std::vector<std::unique_ptr<const CiffIFD> > rawspeed::CiffIFD::mSubIFD
private

Definition at line 45 of file CiffIFD.h.

Referenced by CiffIFD(), add(), getEntryRecursiveIf(), getIFDsWithTagIf(), and hasEntryRecursive().

◆ parent

CiffIFD* const rawspeed::CiffIFD::parent
private

Definition at line 43 of file CiffIFD.h.

Referenced by CiffIFD(), getEntryRecursiveIf(), and recursivelyIncrementSubIFDCount().

◆ subIFDCount

int rawspeed::CiffIFD::subIFDCount = 0
private

Definition at line 48 of file CiffIFD.h.

Referenced by CiffIFD(), and checkSubIFDs().

◆ subIFDCountRecursive

int rawspeed::CiffIFD::subIFDCountRecursive = 0
private

Definition at line 49 of file CiffIFD.h.

Referenced by CiffIFD(), and checkSubIFDs().


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