code::OutputStream Class Reference

Inheritance diagram for code::OutputStream:

code::AOStream code::BOOStream List of all members.

Detailed Description

An abstract base class that provides an overloaded << operator for many basic types.

On the CODE system, there are two subclasses of OutputStream: AOStream which provides an ASCII stream BOOStream which provides a portable binary representation

Typically, most classes will provide a friend stream >> representation. That representation will then work in providing both types of streamed output.

float and double are not provided in this abstract class even though there is no portable way to represent them in binary. This is because several unfriendly data formats define them anyway. You should avoid using these operators in binary.

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

AsciiDump


Public Member Functions

virtual OutputStreamoperator<< (bool)=0
 Write a bool to the OutputStream buffer.
virtual OutputStreamoperator<< (char)=0
 Write a char to the OutputStream buffer.
virtual OutputStreamoperator<< (unsigned char)=0
 Write an unsigned char to the OutputStream buffer.
virtual OutputStreamoperator<< (int16_t)=0
 Write a 16-bit signed integer to the OutputStream buffer.
virtual OutputStreamoperator<< (uint16_t)=0
 Write a 16-bit unsigned integer to the OutputStream buffer.
virtual OutputStreamoperator<< (int32_t)=0
 Write a 32-bit signed integer to the OutputStream buffer.
virtual OutputStreamoperator<< (uint32_t)=0
 Write a 32-bit unsigned integer to the OutputStream buffer.
virtual OutputStreamoperator<< (int64_t)=0
 Write a 64-bit signed integer to the OutputStream buffer.
virtual OutputStreamoperator<< (uint64_t)=0
 Write a 64-bit unsigned integer to the OutputStream buffer.
virtual OutputStreamoperator<< (float)=0
 Write a float to the OutputStream buffer.
virtual OutputStreamoperator<< (double)=0
 Write a double to the OutputStream buffer.
virtual OutputStreamoperator<< (const std::string &)=0
 Write a std::string to the OutputStream buffer.
virtual ~OutputStream ()
 virtual destructor to permit subclassing.


Constructor & Destructor Documentation

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

virtual destructor to permit subclassing.


Member Function Documentation

virtual OutputStream& code::OutputStream::operator<< ( const std::string &   )  [pure 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.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( double   )  [pure virtual]

Write a double to the OutputStream buffer.

WARNING: doubles are not really very portable. If you are defining a new data format, please use int/long, multiplying your value by the needed precision. This is for those formats that do use double and can not be helped.

Parameters:
l the long to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( float   )  [pure virtual]

Write a float to the OutputStream buffer.

WARNING: floats are not really very portable. If you are defining a new data format, please use int/long, multiplying your value by the needed precision. This is for those formats that do use float and can not be helped.

Parameters:
l the long to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( uint64_t   )  [pure virtual]

Write a 64-bit unsigned integer to the OutputStream buffer.

Parameters:
value the value to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( int64_t   )  [pure virtual]

Write a 64-bit signed integer to the OutputStream buffer.

Parameters:
value the value to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( uint32_t   )  [pure virtual]

Write a 32-bit unsigned integer to the OutputStream buffer.

Parameters:
value the value to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( int32_t   )  [pure virtual]

Write a 32-bit signed integer to the OutputStream buffer.

Parameters:
value the value to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( uint16_t   )  [pure virtual]

Write a 16-bit unsigned integer to the OutputStream buffer.

Parameters:
value the value to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( int16_t   )  [pure virtual]

Write a 16-bit signed integer to the OutputStream buffer.

Parameters:
value the value to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( unsigned  char  )  [pure virtual]

Write an unsigned char to the OutputStream buffer.

Parameters:
uch the unsigned char to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( char   )  [pure virtual]

Write a char to the OutputStream buffer.

Parameters:
char the char to add.

Implemented in code::AOStream, and code::BOOStream.

virtual OutputStream& code::OutputStream::operator<< ( bool   )  [pure virtual]

Write a bool to the OutputStream buffer.

Parameters:
bool the bool to add.

Implemented in code::AOStream, and code::BOOStream.


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