#include <tobjstrm.h>
Public Methods | |
TStreamableClass (const char *aName, BUILDER aBuild, int aDelta) |
Definition at line 155 of file tobjstrm.h.
|
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)(); |