Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TStreamableClass Class Reference

TStreamableClass is used by TStreamableTypes and pstream in the registration of streamable classes. More...

#include <tobjstrm.h>

List of all members.

Public Methods

 TStreamableClass (const char *aName, BUILDER aBuild, int aDelta)


Detailed Description

TStreamableClass is used by TStreamableTypes and pstream in the registration of streamable classes.

Definition at line 155 of file tobjstrm.h.


Constructor & Destructor Documentation

TStreamableClass::TStreamableClass ( const char * aName,
BUILDER aBuild,
int aDelta )
 

Creates a TStreamable object with the given name and the given builder function, then calls pstream::registerTypes().

Each streamable class TClassName has a build member function. There are also the familiar non-member overloaded >> and << operators for stream I/O associated with each streamable class.

For type-safe object-stream I/O, the stream manager needs to access the names and the type information for each class.

To ensure that the appropriate functions are linked into any application using the stream manager, you must provide an extern reference such as this:

 extern TStreamableClass registerTClassName;
 

where TClassName is the name of the class for which objects need to be streamed. BUILDER is typedefed as follows:

 typedef TStreamable *(*BUILDER)();
 


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:35 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001