Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

Exiv2::AsciiValue Class Reference

Value for an Ascii string type. More...

#include <value.hpp>

Inheritance diagram for Exiv2::AsciiValue:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::auto_ptr< AsciiValueAutoPtr
 Shortcut for a AsciiValue auto pointer.

Public Member Functions

Creators
 AsciiValue ()
 Default constructor.
 AsciiValue (const std::string &buf)
 Constructor.
 AsciiValue (const AsciiValue &rhs)
 Copy constructor.
virtual ~AsciiValue ()
 Virtual destructor.
Manipulators
AsciiValueoperator= (const AsciiValue &rhs)
 Assignment operator.
virtual void read (const byte *buf, long len, ByteOrder byteOrder=invalidByteOrder)
 Read the value from a character buffer. Appends a terminating '\0' character if buf doesn't end with 0.
virtual void read (const std::string &buf)
 Set the value to that of the string buf. Overrides base class to append a terminating '\0' character if buf doesn't end with '\0'.
Accessors
AutoPtr clone () const
 Return an auto-pointer to a copy of itself (deep copy). The caller owns this copy and the auto-pointer ensures that it will be deleted.
virtual std::ostream & write (std::ostream &os) const
 Write the value to an output stream. Any trailing '\0' characters of the ASCII value are stripped and not written to the output stream.

Detailed Description

Value for an Ascii string type.

This class is for null terminated single byte Ascii strings. This class also ensures that the string is null terminated.


Member Function Documentation

void Exiv2::AsciiValue::read const byte buf,
long  len,
ByteOrder  byteOrder = invalidByteOrder
[virtual]
 

Read the value from a character buffer. Appends a terminating '\0' character if buf doesn't end with 0.

Note:
The byte order is required by the interface but not used by this method, so just use the default.
Parameters:
buf Pointer to the data buffer to read from
len Number of bytes in the data buffer
byteOrder Byte order. Not needed.

Reimplemented from Exiv2::StringValueBase.


The documentation for this class was generated from the following files:
Generated on Sat Mar 5 19:54:32 2005 for Exiv2 by  doxygen 1.4.1