class PSerialiser: public PObject

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<< (unsigned char)
Output unsigned 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<< (unsigned short)
Output unsigned short to serial stream.
[more]virtual PSerialiser& operator<< (int)
Output int to serial stream.
[more]virtual PSerialiser& operator<< (unsigned int)
Output unsigned int to serial stream.
[more]virtual PSerialiser& operator<< (long)
Output long to serial stream.
[more]virtual PSerialiser& operator<< (unsigned long)
Output unsigned long 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 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

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous 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)
Output char to serial stream.

ovirtual PSerialiser& operator<<(unsigned char)
Output unsigned char to serial stream.

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

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

ovirtual PSerialiser& operator<<(unsigned short)
Output unsigned short to serial stream.

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

ovirtual PSerialiser& operator<<(unsigned int)
Output unsigned int to serial stream.

ovirtual PSerialiser& operator<<(long)
Output long to serial stream.

ovirtual PSerialiser& operator<<(unsigned long)
Output unsigned long to serial stream.

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

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

ovirtual PSerialiser& operator<<(long double)
Output long double to serial stream.

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

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

ovirtual PSerialiser& operator<<(const signed char *)
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++.