Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rovsoft::io::BinaryOStreamer Class Reference

This class writes to a binary stream in little endian format. More...

#include <BinaryOStreamer.hh>

Inheritance diagram for rovsoft::io::BinaryOStreamer:

Inheritance graph
[legend]
Collaboration diagram for rovsoft::io::BinaryOStreamer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BinaryOStreamer (std::ostream *out) throw (lib::NullPointerExceptionPtr)
 Builds a BinaryOStreamer writing its output to ostream out.
virtual BinaryOStreamerwriteChar (char arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteByte (char arg) throw (IOExceptionPtr)
 Writes a single byte.
virtual BinaryOStreamerwriteUByte (unsigned char arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteShort (short arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteUShort (unsigned short arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteLong (long arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteULong (unsigned long arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteLongLong (long long arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteULongLong (unsigned long long arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteFloat (float arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteDouble (double arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteLengthString (const std::string &arg) throw (IOExceptionPtr)
virtual BinaryOStreamerwriteString (const std::string &arg) throw (IOExceptionPtr)
virtual ~BinaryOStreamer ()
 Deletes the ostream object if output is not a null pointer!.

Protected Member Functions

BinaryOStreamerwriteArraytoStream (char *array, int length) throw (IOExceptionPtr)

Protected Attributes

std::ostream * output

Detailed Description

This class writes to a binary stream in little endian format.

That means, the LSB of a short or an int for example is send first.


Constructor & Destructor Documentation

rovsoft::io::BinaryOStreamer::BinaryOStreamer std::ostream *  out  )  throw (lib::NullPointerExceptionPtr)
 

Builds a BinaryOStreamer writing its output to ostream out.

the object to which out points to, should have been dynamically generated, because this BinaryOstreamer will delete it when it gets destroyed.

Exceptions:
NullPointerExceptionPtr if out is a null pointer.
Parameters:
out The stream used for writting data.

rovsoft::io::BinaryOStreamer::~BinaryOStreamer  )  [virtual]
 

Deletes the ostream object if output is not a null pointer!.


Member Function Documentation

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeArraytoStream char *  array,
int  length
throw (IOExceptionPtr) [protected]
 

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeByte char  arg  )  throw (IOExceptionPtr) [virtual]
 

Writes a single byte.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer, and rovsoft::io::BinarySubstitutionOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeChar char  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.
Returns:
this object for concatenation.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeDouble double  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeFloat float  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeLengthString const std::string &  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeLong long  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeLongLong long long  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeShort short  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeString const std::string &  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeUByte unsigned char  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeULong unsigned long  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeULongLong unsigned long long  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.

BinaryOStreamer & rovsoft::io::BinaryOStreamer::writeUShort unsigned short  arg  )  throw (IOExceptionPtr) [virtual]
 

See also:
writeByte() used by this method for writing. So for details of thrown exceptions, please see this method.

Implements rovsoft::io::OStreamer.

Reimplemented in rovsoft::io::BinaryLenSegmentOStreamer.


Member Data Documentation

std::ostream* rovsoft::io::BinaryOStreamer::output [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue May 31 14:19:28 2005 for Rovsoft by  doxygen 1.4.3