Exiv2::CanonMakerNote Class Reference

MakerNote for Canon cameras. More...

#include <canonmn.hpp>

Inheritance diagram for Exiv2::CanonMakerNote:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::auto_ptr< CanonMakerNoteAutoPtr
 Shortcut for a CanonMakerNote auto pointer.

Public Member Functions

Creators
 CanonMakerNote (bool alloc=true)
 Constructor. Allows to choose whether or not memory management is required for the makernote entries.
 CanonMakerNote (const CanonMakerNote &rhs)
 Copy constructor.
virtual ~CanonMakerNote ()
 Virtual destructor.
Manipulators
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.
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.
void updateBase (byte *pNewBase)
 Update the base pointer of the MakerNote and all its entries to pNewBase.
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 create (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.
AutoPtr clone () const
 Return an auto-pointer to a clone of this object. The caller owns the new object and the auto-pointer ensures that it will be deleted.

Static Public Member Functions

Print functions for Canon MakerNote tags
static std::ostream & print0x0008 (std::ostream &os, const Value &value)
 Print the image number.
static std::ostream & print0x000c (std::ostream &os, const Value &value)
 Print the serial number of the camera.
static std::ostream & printCs10x0001 (std::ostream &os, const Value &value)
 Macro mode.
static std::ostream & printCs10x0002 (std::ostream &os, const Value &value)
 Self timer.
static std::ostream & printCs10x0003 (std::ostream &os, const Value &value)
 Quality.
static std::ostream & printCs10x0004 (std::ostream &os, const Value &value)
 Flash mode.
static std::ostream & printCs10x0005 (std::ostream &os, const Value &value)
 Drive mode.
static std::ostream & printCs10x0007 (std::ostream &os, const Value &value)
 Focus mode (G1 seems to use field 32 in preference to this).
static std::ostream & printCs10x000a (std::ostream &os, const Value &value)
 Image size.
static std::ostream & printCs10x000b (std::ostream &os, const Value &value)
 Easy shooting.
static std::ostream & printCs10x000c (std::ostream &os, const Value &value)
 Digital zoom.
static std::ostream & printCs10x0010 (std::ostream &os, const Value &value)
 ISO.
static std::ostream & printCs10x0011 (std::ostream &os, const Value &value)
 Metering mode.
static std::ostream & printCs10x0012 (std::ostream &os, const Value &value)
 Focus type.
static std::ostream & printCs10x0013 (std::ostream &os, const Value &value)
 AF point selected.
static std::ostream & printCs10x0014 (std::ostream &os, const Value &value)
 Exposure mode.
static std::ostream & printCs10x001c (std::ostream &os, const Value &value)
 Flash activity.
static std::ostream & printCs10x001d (std::ostream &os, const Value &value)
 Flash details.
static std::ostream & printCs10x0020 (std::ostream &os, const Value &value)
 Focus mode (G1 seems to use this in preference to field 7).
static std::ostream & printCs1Lnh (std::ostream &os, const Value &value)
 Low, normal, high print function.
static std::ostream & printCs1Lens (std::ostream &os, const Value &value)
 Camera lens information.
static std::ostream & printCs20x0002 (std::ostream &os, const Value &value)
 ISO speed used.
static std::ostream & printCs20x0007 (std::ostream &os, const Value &value)
 White balance.
static std::ostream & printCs20x0009 (std::ostream &os, const Value &value)
 Sequence number.
static std::ostream & printCs20x000e (std::ostream &os, const Value &value)
 AF point used.
static std::ostream & printCs20x000f (std::ostream &os, const Value &value)
 Flash bias.
static std::ostream & printCs20x0013 (std::ostream &os, const Value &value)
 Subject distance.

Detailed Description

MakerNote for Canon cameras.


Member Function Documentation

CanonMakerNote::AutoPtr Exiv2::CanonMakerNote::clone  )  const
 

Return an auto-pointer to a clone of this object. The caller owns the new object and the auto-pointer ensures that it will be deleted.

Note:
In non-alloc mode the clone potentially contains pointers to the same data buffer as the original. Use updateBase(byte* pNewBase) to adjust them.

Reimplemented from Exiv2::IfdMakerNote.

CanonMakerNote::AutoPtr Exiv2::CanonMakerNote::create 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.

Parameters:
alloc Memory management model for the newly created object. Indicates if memory required to store data should be allocated and deallocated (true) or not (false). If false, only pointers to the buffer provided to read() will be kept. See Ifd for more background on this concept.

Reimplemented from Exiv2::IfdMakerNote.

void Exiv2::CanonMakerNote::updateBase byte pNewBase  )  [virtual]
 

Update the base pointer of the MakerNote and all its entries to pNewBase.

Allows to re-locate the underlying data buffer to a new location pNewBase. This method only has an effect in non-alloc mode.

Reimplemented from Exiv2::IfdMakerNote.


The documentation for this class was generated from the following files:
Generated on Sun Feb 26 04:28:37 2006 for Exiv2 by  doxygen 1.4.6