#include <makernote.hpp>
Inheritance diagram for Exiv2::IfdMakerNote:
Public Types | |
typedef std::auto_ptr< IfdMakerNote > | AutoPtr |
Shortcut for an IfdMakerNote auto pointer. | |
Public Member Functions | |
Creators | |
IfdMakerNote (const MakerNote::MnTagInfo *pMnTagInfo=0, bool alloc=true) | |
Constructor. Takes an optional makernote info tag array and allows to choose whether or not memory management is required for the Entries. | |
virtual | ~IfdMakerNote () |
Virtual destructor. | |
Manipulators | |
virtual int | read (const byte *buf, long len, ByteOrder byteOrder, long offset) |
Read the makernote, including the makernote header, from character buffer buf of length len at position offset (from the start of the TIFF header) and encoded in byte order byteOrder. Return 0 if successful. | |
virtual int | readHeader (const byte *buf, long len, ByteOrder byteOrder) |
Read the makernote header from the makernote databuffer. This method must set the offset adjustment (adjOffset_), if needed (assuming that the required information is in the header). Return 0 if successful. | |
virtual long | copy (byte *buf, ByteOrder byteOrder, long offset) |
Copy (write) the makerNote to the character buffer buf at position offset (from the start of the TIFF header), encoded in byte order byteOrder. Update internal offsets if necessary. Return the number of bytes written. | |
void | add (const Entry &entry) |
Add the entry to the makernote. No duplicate-check is performed, i.e., it is possible to add multiple entries with the same tag. The memory allocation mode of the entry to be added must be the same as that of the makernote and the IFD id of the entry must be set to 'makerIfd'. | |
Entries::iterator | begin () |
The first makernote entry. | |
Entries::iterator | end () |
End of the makernote entries. | |
Accessors | |
Entries::const_iterator | begin () const |
The first makernote entry. | |
Entries::const_iterator | end () const |
End of the makernote entries. | |
Entries::const_iterator | findIdx (int idx) const |
Find an entry by idx, return a const iterator to the record. | |
long | size () const |
Return the size of the makernote in bytes. | |
AutoPtr | clone (bool alloc=true) const |
Return an auto-pointer to an newly created, empty instance of the same type as this. The makernote entries are not copied. The caller owns the new object and the auto-pointer ensures that it will be deleted. | |
virtual int | checkHeader () const |
Check the makernote header. This will typically check if a required prefix string is present in the header. Return 0 if successful. | |
virtual long | copyHeader (byte *buf) const |
Write the makernote header to a character buffer, return the number of characters written. | |
virtual long | headerSize () const |
Return the size of the makernote header in bytes. | |
virtual std::string | ifdItem () const =0 |
Return the name of the makernote item. | |
virtual std::ostream & | printTag (std::ostream &os, uint16_t tag, const Value &value) const =0 |
Interpret and print the value of a makernote tag. | |
Protected Attributes | |
bool | absOffset_ |
True: Adjustment of the IFD offsets is to be added to the offset from the start of the TIFF header, False: Adjustment of the IFD offsets is a suitable absolute value. Ignore the offset from the start of the TIFF header. | |
long | adjOffset_ |
Adjustment of the IFD offsets relative to the start of the TIFF header or to the start of the makernote, depending on the setting of absOffset_. | |
DataBuf | header_ |
Data buffer for the makernote header. | |
Ifd | ifd_ |
The makernote IFD. |
|
Check the makernote header. This will typically check if a required prefix string is present in the header. Return 0 if successful.
Reimplemented in Exiv2::FujiMakerNote, Exiv2::Nikon2MakerNote, Exiv2::Nikon3MakerNote, and Exiv2::SigmaMakerNote. |
|
Return an auto-pointer to an newly created, empty instance of the same type as this. The makernote entries are not copied. The caller owns the new object and the auto-pointer ensures that it will be deleted.
Reimplemented from Exiv2::MakerNote. Reimplemented in Exiv2::CanonMakerNote, Exiv2::FujiMakerNote, Exiv2::Nikon1MakerNote, Exiv2::Nikon2MakerNote, Exiv2::Nikon3MakerNote, and Exiv2::SigmaMakerNote. |
|
Write the makernote header to a character buffer, return the number of characters written.
|
|
Return the size of the makernote header in bytes.
|
|
Read the makernote header from the makernote databuffer. This method must set the offset adjustment (adjOffset_), if needed (assuming that the required information is in the header). Return 0 if successful.
Reimplemented in Exiv2::FujiMakerNote, Exiv2::Nikon2MakerNote, Exiv2::Nikon3MakerNote, and Exiv2::SigmaMakerNote. |