Tools.h++ Class Reference

Table Of Contents
static RWClassID
classIsA();
Returns the RWClassID of this class.
static RWBoolean
isAtom(RWClassID id);
Returns TRUE if id is the RWClassID that is associated with an RWCollectable class that
has a programmer-chosen RWStringID.
static RWspace
nilStoreSize();
Returns the number of bytes required to store a rwnil pointer in an RWFile.
Related Global Operators
RWvostream&
operator<<(RWvostream&, const RWCollectable& obj);
RWFile&
operator<<(RWFile&, const RWCollectable& obj);
Saves the object obj to a virtual stream or RWFile, respectively. Recursively calls the
virtual function saveGuts(), taking duplicate objects into account. See the Tools.h++
User's Guide section entitled "Persistence" for more information.
RWvistream&
operator>>(RWvistream&, RWCollectable& obj);
RWFile&
operator>>(RWFile&, RWCollectable& obj);
Restores an object inheriting from RWCollectable into obj from a virtual stream or
RWFile, respectively, replacing the previous contents of obj. Recursively calls the virtual
function restoreGuts(), taking duplicate objects into account. See the Tools.h++ User's
Guide section entitled "Persistence" for more information. Various exceptions that could
be thrown are RWInternalErr (if the RWFactory does not know how to make the object),
and RWExternalErr (corrupted stream or file).
RWvistream&
operator>>(RWvistream&, RWCollectable*& obj);
RWFile&
operator>>(RWFile&, RWCollectable*& obj);
Looks at the next object on the input stream or RWFile, respectively, and either creates a
new object of the proper type off the heap and returns a pointer to it, or else returns a
pointer to a previously read instance. Recursively calls the virtual function restoreGuts(),
taking duplicate objects into account. If an object is created off the heap, then you are
responsible for deleting it. See the Tools.h++ User's Guide section entitled "Persistence"