![]() |
Exiv2
|
This class models a TIFF directory (Ifd). It is a composite component of the TIFF tree. More...
#include <tiffcomposite_int.hpp>
Public Member Functions | |
Creators | |
TiffDirectory (uint16_t tag, IfdId group, bool hasNext=true) | |
Default constructor. | |
virtual | ~TiffDirectory () |
Virtual destructor. | |
Accessors | |
bool | hasNext () const |
Return true if the directory has a next pointer. | |
![]() | |
TiffComponent (uint16_t tag, IfdId group) | |
Constructor. | |
virtual | ~TiffComponent () |
Virtual destructor. | |
TiffComponent * | addPath (uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, AutoPtr object=AutoPtr(0)) |
Add a TIFF entry tag to the component. Components on the path to the entry are added if they don't exist yet. More... | |
TiffComponent * | addChild (AutoPtr tiffComponent) |
Add a child to the component. Default is to do nothing. More... | |
TiffComponent * | addNext (AutoPtr tiffComponent) |
Add a "next" component to the component. Default is to do nothing. More... | |
void | accept (TiffVisitor &visitor) |
Interface to accept visitors (Visitor pattern). Visitors can perform operations on all components of the composite. More... | |
void | setStart (const byte *pStart) |
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. | |
uint32_t | write (IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx) |
Write a TiffComponent to a binary image. More... | |
uint16_t | tag () const |
Return the tag of this entry. | |
IfdId | group () const |
Return the group id of this component. | |
byte * | start () const |
Return a pointer to the start of the binary representation of the component. | |
AutoPtr | clone () const |
Return an auto-pointer to a copy of itself (deep copy, but without any children). The caller owns this copy and the auto-pointer ensures that it will be deleted. | |
uint32_t | writeData (IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const |
Write the IFD data of this component to a binary image. Return the number of bytes written. Components derived from TiffEntryBase implement this method if needed. | |
uint32_t | writeImage (IoWrapper &ioWrapper, ByteOrder byteOrder) const |
Write the image data of this component to a binary image. Return the number of bytes written. TIFF components implement this method if needed. | |
uint32_t | size () const |
Return the size in bytes of the IFD value of this component when written to a binary image. | |
uint32_t | count () const |
Return the number of components in this component. | |
uint32_t | sizeData () const |
Return the size in bytes of the IFD data of this component when written to a binary image. This is a support function for write(). Components derived from TiffEntryBase implement this method corresponding to their implementation of writeData(). | |
uint32_t | sizeImage () const |
Return the size in bytes of the image data of this component when written to a binary image. This is a support function for write(). TIFF components implement this method corresponding to their implementation of writeImage(). | |
virtual int | idx () const |
Return the unique id of the entry in the image. | |
Protected Member Functions | |
Protected Creators | |
TiffDirectory (const TiffDirectory &rhs) | |
Copy constructor (used to implement clone()). | |
Protected Manipulators | |
virtual TiffComponent * | doAddPath (uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object) |
Implements addPath(). The default implementation does nothing. | |
virtual TiffComponent * | doAddChild (TiffComponent::AutoPtr tiffComponent) |
Implements addChild(). The default implementation does nothing. | |
virtual TiffComponent * | doAddNext (TiffComponent::AutoPtr tiffComponent) |
Implements addNext(). The default implementation does nothing. | |
virtual void | doAccept (TiffVisitor &visitor) |
Implements accept(). | |
virtual uint32_t | doWrite (IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx) |
Implements write(). Write the TIFF directory, values and additional data, including the next-IFD, if any, to the ioWrapper, return the number of bytes written. | |
Protected Accessors | |
virtual TiffDirectory * | doClone () const |
Internal virtual copy constructor, implements clone(). | |
virtual uint32_t | doWriteData (IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const |
This class does not really implement writeData(), it only has write(). This method must not be called; it commits suicide. | |
virtual uint32_t | doWriteImage (IoWrapper &ioWrapper, ByteOrder byteOrder) const |
Implements writeImage(). Write the image data of the TIFF directory to the ioWrapper by forwarding the call to each component as well as the next-IFD, if there is any. Return the number of bytes written. | |
virtual uint32_t | doSize () const |
Implements size(). Return the size of the TIFF directory, values and additional data, including the next-IFD, if any. | |
virtual uint32_t | doCount () const |
Implements count(). Return the number of entries in the TIFF directory. Does not count entries which are marked as deleted. | |
virtual uint32_t | doSizeData () const |
This class does not really implement sizeData(), it only has size(). This method must not be called; it commits suicide. | |
virtual uint32_t | doSizeImage () const |
Implements sizeImage(). Return the sum of the image sizes of all components plus that of the next-IFD, if there is any. | |
Protected Manipulators | |
Protected Accessors |
Friends | |
class | TiffEncoder |
Additional Inherited Members | |
![]() | |
typedef std::auto_ptr< TiffComponent > | AutoPtr |
TiffComponent auto_ptr type. | |
typedef std::vector< TiffComponent * > | Components |
Container type to hold all metadata. | |
This class models a TIFF directory (Ifd). It is a composite component of the TIFF tree.