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 BinaryOStreamer & writeChar (char arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeByte (char arg) throw (IOExceptionPtr)
 Writes a single byte.
virtual BinaryOStreamer & writeUByte (unsigned char arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeShort (short arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeUShort (unsigned short arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeLong (long arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeULong (unsigned long arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeLongLong (long long arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeULongLong (unsigned long long arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeFloat (float arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeDouble (double arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeLengthString (const std::string &arg) throw (IOExceptionPtr)
virtual BinaryOStreamer & writeString (const std::string &arg) throw (IOExceptionPtr)
virtual ~BinaryOStreamer ()
 Deletes the ostream object if output is not a null pointer!.

Protected Member Functions

BinaryOStreamer & writeArraytoStream (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