# Exiv2::TiffComponent Class Reference

Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directories as well as entries implement this interface. A component can be uniquely identified by a tag, group tupel. This class is implemented as a NVI (Non-Virtual Interface) and it has an interface for visitors (Visitor pattern). More...

`#include <tiffcomposite.hpp>`

Inheritance diagram for Exiv2::TiffComponent:

[legend]
List of all members.

## Public Types

typedef std::auto_ptr< TiffComponent > | AutoPtr
| TiffComponent auto_ptr type.
typedef std::vector< TiffComponent * > | Components
| Container type to hold all metadata.

## Public Member Functions

Creators
| TiffComponent (uint16_t tag, uint16_t group)
| Constructor.
virtual | ~TiffComponent ()
| Virtual destructor.
Manipulators
void | addChild (AutoPtr tiffComponent)
| Add a child to the component. Default is to do nothing.
void | addNext (AutoPtr tiffComponent)
| Add a "next" component to the component. Default is to do nothing.
void | accept (TiffVisitor &visitor)
| Interface to accept visitors (Visitor pattern).
void | setStart (const byte *pData)
| Set a pointer to the start of the binary representation of the component in a memory buffer. The buffer must be allocated and freed outside of this class.
Accessors
uint16_t | tag () const
| Return the tag of this entry.
uint16_t | group () const
| Return the group id of this component.
std::string | groupName () const
| Return the group name of this component.
const byte * | start () const
| Return a pointer to the start of the binary representation of the component.

## Protected Member Functions

Manipulators
virtual void | doAddChild (AutoPtr tiffComponent)
| Implements addChild(). The default implementation does nothing.
virtual void | doAddNext (AutoPtr tiffComponent)
| Implements addNext(). The default implementation does nothing.
virtual void | doAccept (TiffVisitor &visitor)=0
| Implements accept().

## Detailed Description

Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directories as well as entries implement this interface. A component can be uniquely identified by a tag, group tupel. This class is implemented as a NVI (Non-Virtual Interface) and it has an interface for visitors (Visitor pattern).

## Member Function Documentation

void Exiv2::TiffComponent::accept | ( | TiffVisitor & | visitor | ) |

Interface to accept visitors (Visitor pattern).

Parameters:

  | visitor | The visitor.

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

- tiffcomposite.hpp
- tiffcomposite.cpp