![]() |
Exiv2
|
TIFF composite visitor to read the TIFF structure from a block of memory and build the composite from it (Visitor pattern). Used by TiffParser to read the TIFF data from a block of memory. More...
#include <tiffvisitor_int.hpp>
Public Member Functions | |
Creators | |
TiffReader (const byte *pData, uint32_t size, TiffComponent *pRoot, TiffRwState state) | |
Constructor. The data buffer and table describing the TIFF structure of the data are set in the constructor. More... | |
virtual | ~TiffReader () |
Virtual destructor. | |
Manipulators | |
virtual void | visitEntry (TiffEntry *object) |
Read a TIFF entry from the data buffer. | |
virtual void | visitDataEntry (TiffDataEntry *object) |
Read a TIFF data entry from the data buffer. | |
virtual void | visitImageEntry (TiffImageEntry *object) |
Read a TIFF image entry from the data buffer. | |
virtual void | visitSizeEntry (TiffSizeEntry *object) |
Read a TIFF size entry from the data buffer. | |
virtual void | visitDirectory (TiffDirectory *object) |
Read a TIFF directory from the data buffer. | |
virtual void | visitSubIfd (TiffSubIfd *object) |
Read a TIFF sub-IFD from the data buffer. | |
virtual void | visitMnEntry (TiffMnEntry *object) |
Read a TIFF makernote entry from the data buffer. | |
virtual void | visitIfdMakernote (TiffIfdMakernote *object) |
Read an IFD makernote from the data buffer. | |
virtual void | visitIfdMakernoteEnd (TiffIfdMakernote *object) |
Reset reader to its original state, undo makernote specific settings. | |
virtual void | visitBinaryArray (TiffBinaryArray *object) |
Read a binary array from the data buffer. | |
virtual void | visitBinaryElement (TiffBinaryElement *object) |
Read an element of a binary array from the data buffer. | |
void | readTiffEntry (TiffEntryBase *object) |
Read a standard TIFF entry from the data buffer. | |
void | readDataEntryBase (TiffDataEntryBase *object) |
Read a TiffDataEntryBase from the data buffer. | |
void | setMnState (const TiffRwState *state=0) |
Set the state of the reader to one suitable for the Makernote. More... | |
void | setOrigState () |
Set the state to the original state as set in the constructor. | |
bool | circularReference (const byte *start, IfdId group) |
Check IFD directory pointer start for circular reference. | |
int | nextIdx (IfdId group) |
Return the next idx sequence number for group. | |
void | postProcess () |
Read deferred components. More... | |
Accessors | |
ByteOrder | byteOrder () const |
Return the byte order. | |
uint32_t | baseOffset () const |
Return the base offset. See class TiffRwState for details. | |
![]() | |
TiffVisitor () | |
Default constructor. Initialises all stop/go flags to true. | |
virtual | ~TiffVisitor () |
Virtual destructor. | |
void | setGo (GoEvent event, bool go) |
Set the stop/go flag: true for go, false for stop. More... | |
virtual void | visitDirectoryNext (TiffDirectory *object) |
Operation to perform for a TIFF directory, after all components and before the next entry is processed. | |
virtual void | visitDirectoryEnd (TiffDirectory *object) |
Operation to perform for a TIFF directory, at the end of the processing. | |
virtual void | visitBinaryArrayEnd (TiffBinaryArray *object) |
Operation to perform for a TIFF binary array, at the end of the processing. | |
bool | go (GoEvent event) const |
Check if stop flag for event is clear, return true if it's clear. | |
Additional Inherited Members | |
![]() | |
enum | GoEvent { geTraverse = 0, geKnownMakernote = 1 } |
Events for the stop/go flag. See setGo(). More... | |
TIFF composite visitor to read the TIFF structure from a block of memory and build the composite from it (Visitor pattern). Used by TiffParser to read the TIFF data from a block of memory.
Exiv2::Internal::TiffReader::TiffReader | ( | const byte * | pData, |
uint32_t | size, | ||
TiffComponent * | pRoot, | ||
TiffRwState | state | ||
) |
Constructor. The data buffer and table describing the TIFF structure of the data are set in the constructor.
pData | Pointer to the data buffer, starting with a TIFF header. |
size | Number of bytes in the data buffer. |
pRoot | Root element of the TIFF composite. |
state | State object for creation function, byte order and base offset. |
void Exiv2::Internal::TiffReader::postProcess | ( | ) |
Read deferred components.
This function is called after the TIFF composite is read by passing a TiffReader to the accept() function of the root component. It reads all components for which reading was deferred during that pass. This is usually done to make sure that all other components are accessible at the time the deferred components are processed.
References setMnState(), and setOrigState().
void Exiv2::Internal::TiffReader::setMnState | ( | const TiffRwState * | state = 0 | ) |
Set the state of the reader to one suitable for the Makernote.
Uses the state passed in, if any, and remembers it for use during subsequent calls without any argument.
References Exiv2::Internal::TiffRwState::baseOffset(), and Exiv2::Internal::TiffRwState::byteOrder().
Referenced by postProcess(), and visitIfdMakernote().