#include <ifd.hpp>
Collaboration diagram for Exiv2::Entry:
Public Member Functions | |
Creators | |
Entry (bool alloc=true) | |
Default constructor. The entry allocates memory for its data if alloc is true (the default), otherwise it remembers just the pointers into a read and writeable data buffer which it doesn't allocate or delete. | |
~Entry () | |
Destructor. | |
Entry (const Entry &rhs) | |
Copy constructor. | |
Manipulators | |
Entry & | operator= (const Entry &rhs) |
Assignment operator. | |
void | setTag (uint16_t tag) |
Set the tag. | |
void | setIfdId (IfdId ifdId) |
Set the IFD id. | |
void | setIdx (int idx) |
Set the index (unique id of an entry within one IFD). | |
void | setMakerNote (MakerNote *makerNote) |
Set the pointer to the MakerNote. | |
void | setOffset (long offset) |
Set the offset. The offset is relative to the start of the IFD. | |
void | setValue (uint32_t data, ByteOrder byteOrder) |
Set the value of the entry to a single unsigned long component, i.e., set the type of the entry to unsigned long, number of components to one and the value according to the data provided. | |
void | setValue (uint16_t type, uint32_t count, const byte *data, long size) |
Set type, count, the data buffer and its size. | |
void | setDataArea (const byte *buf, long len) |
Set the data area. Memory management as for setValue(uint16_t, uint32_t, const byte*, long). | |
void | setDataAreaOffsets (uint32_t offset, ByteOrder byteOrder) |
Set the offset(s) to the data area of an entry. | |
Accessors | |
uint16_t | tag () const |
Return the tag. | |
uint16_t | type () const |
Return the type id. | |
const char * | typeName () const |
Return the name of the type. | |
long | typeSize () const |
Return the size in bytes of one element of this type. | |
IfdId | ifdId () const |
Return the IFD id. | |
int | idx () const |
Return the index (unique id >0 of an entry within an IFD, 0 if not set). | |
MakerNote * | makerNote () const |
Return the pointer to the associated MakerNote. | |
uint32_t | count () const |
Return the number of components in the value. | |
long | size () const |
Return the size of the data buffer in bytes. | |
long | offset () const |
Return the offset from the start of the IFD to the data of the entry. | |
const byte * | data () const |
Return a pointer to the data buffer. Do not attempt to write to this pointer. | |
const byte * | component (uint32_t n) const |
Return a pointer to the n-th component, 0 if there is no n-th component. Do not attempt to write to this pointer. | |
bool | alloc () const |
Get the memory allocation mode. | |
long | sizeDataArea () const |
Return the size of the data area. | |
const byte * | dataArea () const |
Return a pointer to the data area. Do not attempt to write to this pointer. |
|
Return a pointer to the data area. Do not attempt to write to this pointer. For certain tags the regular value of an IFD entry is an offset to a data area outside of the IFD. Examples are Exif tag 0x8769 in IFD0 (Exif.Image.ExifTag) or tag 0x0201 in IFD1 (Exif.Thumbnail.JPEGInterchangeFormat). The offset of ExifTag points to a data area containing the Exif IFD. That of JPEGInterchangeFormat contains the JPEG thumbnail image. Use this method to access (read-only) the data area of a tag. Use setDataArea() to write to the data area.
|
|
Set the data area. Memory management as for setValue(uint16_t, uint32_t, const byte*, long). For certain tags the regular value of an IFD entry is an offset to a data area outside of the IFD. Examples are Exif tag 0x8769 in IFD0 (Exif.Image.ExifTag) or tag 0x0201 in IFD1 (Exif.Thumbnail.JPEGInterchangeFormat). The offset of ExifTag points to a data area containing the Exif IFD. That of JPEGInterchangeFormat contains the JPEG thumbnail image. This method sets the data area of a tag in accordance with the memory allocation mode.
|
|
Set the offset(s) to the data area of an entry. Add offset to each data component of the entry. This is used by Ifd::copy to convert the data components of an entry containing offsets relative to the data area to become offsets from the start of the TIFF header. Usually, entries with a data area have exactly one unsigned long data component, which is 0. |
|
Set type, count, the data buffer and its size.
Copies the provided buffer when called in memory allocation mode.
|
|
Set the value of the entry to a single unsigned long component, i.e., set the type of the entry to unsigned long, number of components to one and the value according to the data provided.
The size of the data buffer is set to at least four bytes, but is left unchanged if it can accomodate the pointer. This method can be used to set the value of a tag which contains a pointer (offset) to a location in the Exif data (like e.g., ExifTag, 0x8769 in IFD0, which contains a pointer to the Exif IFD).
|
|
Return the size of the data buffer in bytes.
|