Exiv2::TiffVisitor Class Reference

Abstract base class defining the interface for TIFF composite vistors (Visitor pattern). More...

#include <tiffvisitor.hpp>

Inheritance diagram for Exiv2::TiffVisitor:

Inheritance graph
[legend]
List of all members.

Public Member Functions

Creators
 TiffVisitor ()
 Default constructor.
virtual ~TiffVisitor ()
 Virtual destructor.
Manipulators
void setGo (bool go)
 Set the stop/go flag: true for go, false for stop.
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 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 *)
 Operation to perform for a TIFF directory, after all components and before the next entry is processed.
virtual void visitDirectoryEnd (TiffDirectory *)
 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 *)
 Operation to perform after processing an IFD makernote.
virtual void visitArrayEntry (TiffArrayEntry *object)=0
 Operation to perform for an array entry (as found in Canon makernotes).
virtual void visitArrayElement (TiffArrayElement *object)=0
 Operation to perform for an array element.
Accessors
bool go ()
 Check if stop flag is clear, return true if it's clear.

Detailed Description

Abstract base class defining the interface for TIFF composite vistors (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.

      void visitorExample(Exiv2::TiffComponent* tiffComponent, Exiv2::TiffVisitor& visitor)
      {
          tiffComponent->accept(visitor);
      }


Member Function Documentation

void Exiv2::TiffVisitor::setGo bool  go  )  [inline]
 

Set the stop/go flag: true for go, false for stop.

This mechanism can be used by concrete visitors to signal certain events. For example, TiffFinder sets the stop flag as soon as it finds the correct component to signal to that the search should be stopped. TiffReader uses it to signal problems reading a makernote. As the flag doesn't carry any information on the type of event which triggered it, it is for each visitor to establish and adhere to conventions about its meaning.


The documentation for this class was generated from the following file:
Generated on Wed Dec 20 19:37:08 2006 for Exiv2 by  doxygen 1.3.9.1