Exiv2::CiffComponent Class Reference

Interface class for components of the CIFF directory hierarchy of a Crw (Canon Raw data) image. Both CIFF directories as well as entries implement this interface. More...

#include <crwimage.hpp>

Inheritance diagram for Exiv2::CiffComponent:

Inheritance graph
[legend]
Collaboration diagram for Exiv2::CiffComponent:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Creators
virtual ~CiffComponent ()
 Virtual destructor.
Manipulators
virtual void add (RawMetadata::AutoPtr component)=0
 Add a component to the composition.
virtual void read (const byte *buf, uint32_t len, uint32_t start, ByteOrder byteOrder, int32_t shift=0)
 Read a component from a data buffer.
void setDir (uint16_t dir)
 Set the directory tag for this component.
Accessors
virtual void extract (Image &image, ByteOrder byteOrder) const =0
 Extract metadata from the component and add it to image.
virtual void print (std::ostream &os, ByteOrder byteOrder, const std::string &prefix="") const
 Print debug info about a component to os.
uint16_t dir () const
 Return the tag of the directory containing this component.
uint16_t tag () const
 Return the tag of this component.
uint32_t size () const
 Return the data size of this component.
uint32_t offset () const
 Return the offset to the data from the start of the directory.
const bytepData () const
 Return a pointer to the data area of this component.
uint16_t tagId () const
 Return the tag id of this component.
TypeId typeId () const
 Return the type id of thi component.
DataLocId dataLocation () const
 Return the data location for this component.

Static Public Member Functions

static TypeId typeId (uint16_t tag)
 Return the type id for a tag.
static DataLocId dataLocation (uint16_t tag)
 Return the data location id for a tag.

Detailed Description

Interface class for components of the CIFF directory hierarchy of a Crw (Canon Raw data) image. Both CIFF directories as well as entries implement this interface.


Member Function Documentation

virtual void Exiv2::CiffComponent::extract Image image,
ByteOrder  byteOrder
const [pure virtual]
 

Extract metadata from the component and add it to image.

Parameters:
image Image to add metadata to
byteOrder Byte order

Implements Exiv2::RawMetadata.

Implemented in Exiv2::CiffEntry, and Exiv2::CiffDirectory.

void Exiv2::CiffComponent::print std::ostream &  os,
ByteOrder  byteOrder,
const std::string &  prefix = ""
const [virtual]
 

Print debug info about a component to os.

Parameters:
os Output stream to write to
byteOrder Byte order
prefix Prefix to be written before each line of output

Implements Exiv2::RawMetadata.

Reimplemented in Exiv2::CiffDirectory.

void Exiv2::CiffComponent::read const byte buf,
uint32_t  len,
uint32_t  start,
ByteOrder  byteOrder,
int32_t  shift = 0
[virtual]
 

Read a component from a data buffer.

Parameters:
buf Pointer to the data buffer.
len Number of bytes in the data buffer.
start Component starts at buf + start.
byteOrder Applicable byte order (little or big endian).
shift offsets in component are relative to buf + shift.
Exceptions:
Error If the component cannot be parsed.

Implements Exiv2::RawMetadata.

Reimplemented in Exiv2::CiffDirectory.

uint32_t Exiv2::CiffComponent::size  )  const [inline]
 

Return the data size of this component.

Note:
If the data is contained in the directory entry itself, this method returns 8, which is the maximum number of data bytes this component can have. The actual size, i.e., used data bytes, may be less than 8.


The documentation for this class was generated from the following files:
Generated on Sat Nov 19 22:19:57 2005 for Exiv2 by  doxygen 1.4.5