TC::Codec Class Reference
[IO Classes and Functions]

Base class for all codec method fro encoding and decoding standard types and prepares methods for decoding and encoding. More...

#include <TCCodec.h>

Inheritance diagram for TC::Codec:

Inheritance graph
[legend]
Collaboration diagram for TC::Codec:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual uint32 Decode (Stream &stream, sint16 &val)=0
 Method for reading one signed 16bit integer from the stream.
virtual uint32 Decode (Stream &stream, uint16 &val)=0
 Method for reading one unsigned 16bit integer from the stream.
virtual uint32 Decode (Stream &stream, sint32 &val)=0
 Method for reading one signed int 32bit integer the stream.
virtual uint32 Decode (Stream &stream, uint32 &val)=0
 Method for reading one unsigned 32bit integer from the stream.
virtual uint32 Decode (Stream &stream, sint64 &val)=0
 Method for reading one signed 64bit integer from the stream.
virtual uint32 Decode (Stream &stream, uint64 &val)=0
 Method for reading one unsigned 64bit integer from the stream.
virtual uint32 Decode (Stream &stream, float &val)=0
 Method for reading one float from the stream.
virtual uint32 Decode (Stream &stream, double &val)=0
 Method for reading one double from the stream.
virtual uint32 Decode (Stream &stream, char *val)=0
 Method for reading one string from the stream.
virtual uint32 Decode (Stream &stream, std::string &val)=0
 Method for reading one string from the stream.
virtual uint32 Decode (Stream &stream, char &val)=0
 Method for reading one char from the stream.
virtual uint32 Decode (Stream &stream, uchar &val)=0
 Method for reading one unsigned char from the stream.
virtual uint32 Encode (sint16 val, Stream &stream)=0
 Method for writing one signed 16bit integer to the stream.
virtual uint32 Encode (uint16 val, Stream &stream)=0
 Method for writing one unsigned 16bit integer to the stream.
virtual uint32 Encode (sint32 val, Stream &stream)=0
 Method for writing one signed 32bit integer to the stream.
virtual uint32 Encode (uint32 val, Stream &stream)=0
 Method for writing one unsigned 32bit integer to the stream.
virtual uint32 Encode (sint64 val, Stream &stream)=0
 Method for writing one signed 64bit integer to the stream.
virtual uint32 Encode (uint64 val, Stream &stream)=0
 Method for writing one unsigned 64bit integer to the stream.
virtual uint32 Encode (float val, Stream &stream)=0
 Method for writing one float to the stream.
virtual uint32 Encode (double val, Stream &stream)=0
 Method for writing one double to the stream.
virtual uint32 Encode (const char *val, Stream &stream)=0
 Method for writing one string to the stream.
virtual uint32 Encode (const std::string &val, Stream &stream)=0
 Method for writing one string to the stream.
virtual uint32 Encode (char val, Stream &stream)=0
 Method for writing one signed char to the stream.
virtual uint32 Encode (uchar val, Stream &stream)=0
 Method for writing one unsigned char to the stream.
virtual uint32 EncodeEndOfLine (Stream &stream)=0
 Writes the end of line characters if needed for the stream.
virtual uint32 EncodeSpace (Stream &stream)=0
 Writes space to the stream if needed for the stream needed for separating words or numbers.
virtual ~Codec ()


Detailed Description

Base class for all codec method fro encoding and decoding standard types and prepares methods for decoding and encoding.

Definition at line 64 of file TCCodec.h.


Constructor & Destructor Documentation

virtual TC::Codec::~Codec (  )  [inline, virtual]

Definition at line 252 of file TCCodec.h.


Member Function Documentation

virtual uint32 TC::Codec::Decode ( Stream stream,
sint16 val 
) [pure virtual]

Method for reading one signed 16bit integer from the stream.

Parameters:
stream Stream from which to decode the data
val the short which should store the short
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
uint16 val 
) [pure virtual]

Method for reading one unsigned 16bit integer from the stream.

Parameters:
stream Stream from which to decode the data
val the short which should store the short
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
sint32 val 
) [pure virtual]

Method for reading one signed int 32bit integer the stream.

Parameters:
stream Stream from which to decode the data
val the int which should store the int
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
uint32 val 
) [pure virtual]

Method for reading one unsigned 32bit integer from the stream.

Parameters:
stream Stream from which to decode the data
val the int which should store the int
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
sint64 val 
) [pure virtual]

Method for reading one signed 64bit integer from the stream.

Parameters:
stream Stream from which to decode the data
val the long which should store the long
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
uint64 val 
) [pure virtual]

Method for reading one unsigned 64bit integer from the stream.

Parameters:
stream Stream from which to decode the data
val the long which should store the long
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
float &  val 
) [pure virtual]

Method for reading one float from the stream.

Parameters:
stream Stream from which to decode the data
val the float which should store the float
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
double &  val 
) [pure virtual]

Method for reading one double from the stream.

Parameters:
stream Stream from which to decode the data
val the double which should store the double
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
char *  val 
) [pure virtual]

Method for reading one string from the stream.

Parameters:
stream Stream from which to decode the data
val the string which should store the string
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
std::string &  val 
) [pure virtual]

Method for reading one string from the stream.

Parameters:
stream Stream from which to decode the data
val the string which should store the string
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
char &  val 
) [pure virtual]

Method for reading one char from the stream.

Parameters:
stream Stream from which to decode the data
val the char which should store the char
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Decode ( Stream stream,
uchar val 
) [pure virtual]

Method for reading one unsigned char from the stream.

Parameters:
stream Stream from which to decode the data
val the char which should store the char
Returns:
Number of bytes decoded

virtual uint32 TC::Codec::Encode ( sint16  val,
Stream stream 
) [pure virtual]

Method for writing one signed 16bit integer to the stream.

Parameters:
stream Stream to which to encode the data
val the short which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( uint16  val,
Stream stream 
) [pure virtual]

Method for writing one unsigned 16bit integer to the stream.

Parameters:
stream Stream to which to encode the data
val the short which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( sint32  val,
Stream stream 
) [pure virtual]

Method for writing one signed 32bit integer to the stream.

Parameters:
stream Stream to which to encode the data
val the int which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( uint32  val,
Stream stream 
) [pure virtual]

Method for writing one unsigned 32bit integer to the stream.

Parameters:
stream Stream to which to encode the data
val the int which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( sint64  val,
Stream stream 
) [pure virtual]

Method for writing one signed 64bit integer to the stream.

Parameters:
stream Stream to which to encode the data
val the long which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( uint64  val,
Stream stream 
) [pure virtual]

Method for writing one unsigned 64bit integer to the stream.

Parameters:
stream Stream to which to encode the data
val the long which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( float  val,
Stream stream 
) [pure virtual]

Method for writing one float to the stream.

Parameters:
stream Stream to which to encode the data
val the float which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( double  val,
Stream stream 
) [pure virtual]

Method for writing one double to the stream.

Parameters:
stream Stream to which to encode the data
val the double which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( const char *  val,
Stream stream 
) [pure virtual]

Method for writing one string to the stream.

Parameters:
stream Stream to which to encode the data
val the string which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( const std::string &  val,
Stream stream 
) [pure virtual]

Method for writing one string to the stream.

Parameters:
stream Stream to which to encode the data
val the string which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( char  val,
Stream stream 
) [pure virtual]

Method for writing one signed char to the stream.

Parameters:
stream Stream to which to encode the data
val the char which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::Encode ( uchar  val,
Stream stream 
) [pure virtual]

Method for writing one unsigned char to the stream.

Parameters:
stream Stream to which to encode the data
val the char which to write
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::EncodeEndOfLine ( Stream stream  )  [pure virtual]

Writes the end of line characters if needed for the stream.

Parameters:
stream Stream to which to encode the end of line
Returns:
Number of bytes encoded

virtual uint32 TC::Codec::EncodeSpace ( Stream stream  )  [pure virtual]

Writes space to the stream if needed for the stream needed for separating words or numbers.

Parameters:
stream Stream to which to encode the space
Returns:
Number of bytes encoded


The documentation for this class was generated from the following file:

Copyright (c) Thomas Goessler 2003 - 2008