code::AOStream Class Reference

Inheritance diagram for code::AOStream:

code::OutputStream List of all members.

Detailed Description

AOStream provides an ASCII stream for output.

Author:
: Lakshman
Version:
:
Id
code_AsciiStream.h,v 1.6 2009/06/02 20:17:39 lakshman Exp
See also:
NetworkFormat

AsciiDump


Public Member Functions

 AOStream (std::ostream &output_stream, const std::string &separation="\n")
virtual AOStreamoperator<< (float val)
 Write a float to the stream.
virtual AOStreamoperator<< (double val)
 Write a float to the stream.
virtual AOStreamoperator<< (bool val)
 Write a bool to the stream.
virtual AOStreamoperator<< (char val)
 Write a char to the stream.
virtual AOStreamoperator<< (unsigned char val)
 Write an unsigned char to the stream.
virtual AOStreamoperator<< (int16_t val)
 Write a 16-bit signed integer to the stream.
virtual AOStreamoperator<< (uint16_t val)
 Write a 16-bit unsigned integer to the stream.
virtual AOStreamoperator<< (int32_t val)
 Write a 32-bit signed integer to the stream.
virtual AOStreamoperator<< (uint32_t val)
 Write a 32-bit unsigned integer to the stream.
virtual AOStreamoperator<< (int64_t val)
 Write a 64-bit signed integer to the stream.
virtual AOStreamoperator<< (uint64_t val)
 Write a 64-bit unsigned integer to the stream.
virtual AOStreamoperator<< (const std::string &val)
 Write a std::string to the OutputStream buffer.
virtual ~AOStream ()
 virtual destructor to permit subclassing.

Protected Attributes

std::ostream & os
 The output stream we are sending it to.
std::string sep
 The std::string we use to separate successive items.


Constructor & Destructor Documentation

code::AOStream::AOStream ( std::ostream &  output_stream,
const std::string &  separation = "\n" 
) [inline]

virtual code::AOStream::~AOStream (  )  [inline, virtual]

virtual destructor to permit subclassing.


Member Function Documentation

virtual AOStream& code::AOStream::operator<< ( const std::string &  val  )  [virtual]

Write a std::string to the OutputStream buffer.

This is done by writing an int (the std::string length) and a series of characters (the std::string contents).

Parameters:
s the std::string to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( uint64_t  val  )  [inline, virtual]

Write a 64-bit unsigned integer to the stream.

Parameters:
val the value to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( int64_t  val  )  [inline, virtual]

Write a 64-bit signed integer to the stream.

Parameters:
val the value to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( uint32_t  val  )  [inline, virtual]

Write a 32-bit unsigned integer to the stream.

Parameters:
val the value to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( int32_t  val  )  [inline, virtual]

Write a 32-bit signed integer to the stream.

Parameters:
val the value to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( uint16_t  val  )  [inline, virtual]

Write a 16-bit unsigned integer to the stream.

Parameters:
val the value to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( int16_t  val  )  [inline, virtual]

Write a 16-bit signed integer to the stream.

Parameters:
val the value to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( unsigned char  val  )  [inline, virtual]

Write an unsigned char to the stream.

Parameters:
val the value to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( char  val  )  [inline, virtual]

Write a char to the stream.

Parameters:
char the char to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( bool  val  )  [inline, virtual]

Write a bool to the stream.

Parameters:
bool the bool to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( double  val  )  [inline, virtual]

Write a float to the stream.

Note that float and double are present in AsciiStream but not in the binary stream.

Parameters:
double the double to add.

Implements code::OutputStream.

virtual AOStream& code::AOStream::operator<< ( float  val  )  [inline, virtual]

Write a float to the stream.

Note that float and double are present in AsciiStream but not in the binary stream.

Parameters:
float the float to add.

Implements code::OutputStream.


Member Data Documentation

std::ostream& code::AOStream::os [protected]

The output stream we are sending it to.

std::string code::AOStream::sep [protected]

The std::string we use to separate successive items.

Use newlines, tabs or pipes (|) but use the symbol consistently.


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7