ug4
|
Interface for handling serialization and deserialization of data associated with geometric objects. More...
#include <serialization.h>
Public Member Functions | |
virtual void | deserialization_done () |
this method will be called after read_info has been called for all geometric objects. More... | |
virtual void | deserialization_starts () |
this method is called after read_info has been called for all geometric objects. More... | |
virtual void | read_data (BinaryBuffer &in, TGeomObj *o)=0 |
read data associated with the given object. Pure virtual. More... | |
virtual void | read_info (BinaryBuffer &in) |
Read the info written during write_info here. Default: empty implementation. More... | |
virtual void | write_data (BinaryBuffer &out, TGeomObj *o) const =0 |
write data associated with the given object. Pure virtual. More... | |
virtual void | write_info (BinaryBuffer &out) const |
can be used to write arbitrary info to the file. More... | |
virtual | ~GeomObjDataSerializer () |
Interface for handling serialization and deserialization of data associated with geometric objects.
The GeomObjDataSerializer allows to serialize data associated with geometric objects. Before the data will be serialized, write_info is called. Accordingly read_info is called before data is deserialized.
Note that this class handles serialization and deserialization at once.
Make sure to completely read all data written by the associated write calls.
Note that the following typedefs exist: VertexDataSerializer, EdgeDataSerializer, FaceDataSerializer, VolumeDataSerializer.
If one wants to serialize data of all objects in a grid, he should take a look at GridDataSerializer.
If you call read_info and/or read_data directly, make sure to also call deserialization_done after deserialization has been performed for all geometric objects.
|
inlinevirtual |
|
inlinevirtual |
this method will be called after read_info has been called for all geometric objects.
|
inlinevirtual |
this method is called after read_info has been called for all geometric objects.
|
pure virtual |
read data associated with the given object. Pure virtual.
Implemented in ug::GeomObjAttachmentSerializer< TGeomObj, TAttachment >.
|
inlinevirtual |
Read the info written during write_info here. Default: empty implementation.
|
pure virtual |
write data associated with the given object. Pure virtual.
Implemented in ug::GeomObjAttachmentSerializer< TGeomObj, TAttachment >.
|
inlinevirtual |
can be used to write arbitrary info to the file.
Make sure to read everything you've written during read_data. Default implementation is empty.