![]() |
Exiv2
|
Abstract base class defining the interface for TIFF composite visitors (Visitor pattern) More...
#include <tiffvisitor_int.hpp>
Public Types | |
enum | GoEvent { geTraverse = 0, geKnownMakernote = 1 } |
Events for the stop/go flag. See setGo(). More... | |
Public Member Functions | |
Creators | |
TiffVisitor () | |
Default constructor. Initialises all stop/go flags to true. | |
virtual | ~TiffVisitor () |
Virtual destructor. | |
Manipulators | |
void | setGo (GoEvent event, bool go) |
Set the stop/go flag: true for go, false for stop. More... | |
virtual void | visitEntry (TiffEntry *object)=0 |
Operation to perform for a TIFF entry. | |
virtual void | visitDataEntry (TiffDataEntry *object)=0 |
Operation to perform for a TIFF data entry. | |
virtual void | visitImageEntry (TiffImageEntry *object)=0 |
Operation to perform for a TIFF image entry. | |
virtual void | visitSizeEntry (TiffSizeEntry *object)=0 |
Operation to perform for a TIFF size entry. | |
virtual void | visitDirectory (TiffDirectory *object)=0 |
Operation to perform for a TIFF directory. | |
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 | visitSubIfd (TiffSubIfd *object)=0 |
Operation to perform for a TIFF sub-IFD. | |
virtual void | visitMnEntry (TiffMnEntry *object)=0 |
Operation to perform for the makernote component. | |
virtual void | visitIfdMakernote (TiffIfdMakernote *object)=0 |
Operation to perform for an IFD makernote. | |
virtual void | visitIfdMakernoteEnd (TiffIfdMakernote *object) |
Operation to perform after processing an IFD makernote. | |
virtual void | visitBinaryArray (TiffBinaryArray *object)=0 |
Operation to perform for a binary array. | |
virtual void | visitBinaryArrayEnd (TiffBinaryArray *object) |
Operation to perform for a TIFF binary array, at the end of the processing. | |
virtual void | visitBinaryElement (TiffBinaryElement *object)=0 |
Operation to perform for an element of a binary array. | |
Accessors | |
bool | go (GoEvent event) const |
Check if stop flag for event is clear, return true if it's clear. | |
Abstract base class defining the interface for TIFF composite visitors (Visitor pattern)
A concrete visitor class is used as shown in the example below. Accept() will invoke the member function corresponding to the concrete type of each component in the composite.
Events for the stop/go flag. See setGo().
Enumerator | |
---|---|
geTraverse | Signal to control traversing of the composite tree. |
geKnownMakernote | Signal used by TiffReader to signal an unknown makernote. |
void Exiv2::Internal::TiffVisitor::setGo | ( | GoEvent | event, |
bool | go | ||
) |
Set the stop/go flag: true for go, false for stop.
This mechanism is used by visitors and components to signal special events. Specifically, TiffFinder sets the geTraverse flag as soon as it finds the correct component to signal to components that the search should be aborted. TiffReader uses geKnownMakernote to signal problems reading a makernote to the TiffMnEntry component. There is an array of flags, one for each defined event, so different signals can be used independent of each other.
References go().
Referenced by Exiv2::Internal::TiffFinder::findObject(), Exiv2::Internal::TiffFinder::init(), Exiv2::Internal::TiffEncoder::setDirty(), and Exiv2::Internal::TiffReader::visitIfdMakernote().