All Packages Class Hierarchy This Package Previous Next Index
Class com.roguewave.vsj.PersistableStreamer
java.lang.Object
|
+----com.roguewave.vsj.PersistableStreamer
- public class PersistableStreamer
- extends Object
- implements ObjectStreamer
Class PersistableStreamer is an ObjectStreamer for streaming objects
that support Tools.h++ Isomorphic persistence.
On the C++ side, These are classes
marked "Isomorphic" in the Persistence Section of the Tools.h++ class
reference, including any classes that are made persistent
by use of the RWDEFINE_PERSISTABLE macro.
The code in this class corresponds to the "behind the scenes" code
in Tools.h++ generated automatically through the use of the
RWDEFINE_PERSITABLE macro. In particular, this code takes care
of reading and writing back-references---for objects that are encountered
mulitple times---in order to maintain the shape of a graph of objects,
as well as allow for circular references.
To create a PersistableStreamer you must supply an instance of
DefinePersistable. Methods in DefinePersistable correspond to the
C++ global rwSaveGuts and rwRestoreGuts functions that
one must define for a particular class when using the
RWDEFINE_PERSTABLE macro.
- See Also:
- DefinePersistable
-
PersistableStreamer(DefinePersistable)
- Create a PersistableStreamer from the given DefinePersistable.
-
restore(VirtualInputStream)
- Read an object, or graph of objects, written using the same
back-referencing protocol used by the code generated from
the Tools.h++ RWDEFINE_PERSISTABLE macro.
-
save(Object, VirtualOutputStream)
- Write an object, or graph of objects, using the same
back-referencing protocol used by the code generated from
the Tools.h++ RWDEFINE_PERSISTABLE macro.
PersistableStreamer
public PersistableStreamer(DefinePersistable streamer)
- Create a PersistableStreamer from the given DefinePersistable.
restore
public Object restore(VirtualInputStream vstr) throws IOException
- Read an object, or graph of objects, written using the same
back-referencing protocol used by the code generated from
the Tools.h++ RWDEFINE_PERSISTABLE macro.
save
public void save(Object obj,
VirtualOutputStream vstr) throws IOException
- Write an object, or graph of objects, using the same
back-referencing protocol used by the code generated from
the Tools.h++ RWDEFINE_PERSISTABLE macro.
All Packages Class Hierarchy This Package Previous Next Index