class PSerialiser

This class allows the serialisation of objects to an output stream.

Inheritance:


Public Methods

[more] PSerialiser ( ostream & strm )
Construct a serialiser
[more]virtual PSerialiser& operator<< (char)
Output char to serial stream
[more]virtual PSerialiser& operator<< (signed char)
Output signed char to serial stream
[more]virtual PSerialiser& operator<< (short)
Output short to serial stream
[more]virtual PSerialiser& operator<< (int)
Output int to serial stream
[more]virtual PSerialiser& operator<< (unsigned long)
Output unsigned long to serial streamOutput unsigned int to serial streamOutput unsigned short to serial streamOutput unsigned char to serial stream
[more]virtual PSerialiser& operator<< (float)
Output float to serial stream
[more]virtual PSerialiser& operator<< (double)
Output double to serial stream
[more]virtual PSerialiser& operator<< (long double)
Output long double to serial streamOutput long to serial stream
[more]virtual PSerialiser& operator<< (const char* )
Output C string to serial stream
[more]virtual PSerialiser& operator<< (const unsigned char* )
Output C string to serial stream
[more]virtual PSerialiser& operator<< (const signed char* )
Output C string to serial stream
[more]virtual PSerialiser& operator<< (PObject &)
Output the data to the serialiser object.

Protected Fields

[more]ostream& stream
Stream to output serial data to


Inherited from PObject:

Public Methods

Run Time Type functions

I/O functions

Miscellaneous functions

Public Members

Comparison functions


Documentation

This class allows the serialisation of objects to an output stream. This packages up objects so that they can be reconstructed by an instance of the PUnSerialiser class. The stream they are sent to can be any stream; file, string, pipe, socket etc.

Serialisation can be done in two manners: binary or text. This depends on the serialiser instance that was constructed. Each objects PObject::Serialise() function is called and it is up to that function to output in binary or text.

To a large extent, if only the << operator is used on the PSerialser instance, the text and binary versions of the PObject::Serialise() function can be made identical.

This class is an abstract class and descendents of PTextSerialiser or PBinarySerialiser should be created.

o PSerialiser( ostream & strm )
Construct a serialiser

ovirtual PSerialiser& operator<<(char) = 0
Output char to serial stream

ovirtual PSerialiser& operator<<(signed char) = 0
Output signed char to serial stream

ovirtual PSerialiser& operator<<(short) = 0
Output short to serial stream

ovirtual PSerialiser& operator<<(int) = 0
Output int to serial stream

ovirtual PSerialiser& operator<<(unsigned long) = 0
Output unsigned long to serial streamOutput unsigned int to serial streamOutput unsigned short to serial streamOutput unsigned char to serial stream

ovirtual PSerialiser& operator<<(float) = 0
Output float to serial stream

ovirtual PSerialiser& operator<<(double) = 0
Output double to serial stream

ovirtual PSerialiser& operator<<(long double) = 0
Output long double to serial streamOutput long to serial stream

ovirtual PSerialiser& operator<<(const char* ) = 0
Output C string to serial stream

ovirtual PSerialiser& operator<<(const unsigned char* ) = 0
Output C string to serial stream

ovirtual PSerialiser& operator<<(const signed char* ) = 0
Output C string to serial stream

ovirtual PSerialiser& operator<<(PObject &)
Output the data to the serialiser object. When the operator is executed on a PObject descendent then that objects PObject::Serialise() function is called.

oostream& stream
Stream to output serial data to


Direct child classes:
PTextSerialiser
PBinarySerialiser

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.