ug4
ug::GridDataSerializer Class Reference

Interface for handling serialization and deserialization of data associated with all geometric objects in a grid. More...

#include <serialization.h>

+ Inheritance diagram for ug::GridDataSerializer:

Public Member Functions

virtual void deserialization_done ()
 this method is 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, Edge *o)
 
virtual void read_data (BinaryBuffer &in, Face *o)
 
virtual void read_data (BinaryBuffer &in, Vertex *o)
 
virtual void read_data (BinaryBuffer &in, Volume *o)
 
virtual void read_info (BinaryBuffer &in)
 Read the info written during write_info here. Default: empty implementation. More...
 
virtual void write_data (BinaryBuffer &out, Edge *o) const
 
virtual void write_data (BinaryBuffer &out, Face *o) const
 
virtual void write_data (BinaryBuffer &out, Vertex *o) const
 
virtual void write_data (BinaryBuffer &out, Volume *o) const
 
virtual void write_info (BinaryBuffer &out) const
 can be used to write arbitrary info to the file. More...
 
virtual ~GridDataSerializer ()
 

Detailed Description

Interface for handling serialization and deserialization of data associated with all geometric objects in a grid.

The GridDataSerializer allows to serialize data associated with all geometric objects in a grid. 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.

All methods have an empty implementation by default.

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.

Constructor & Destructor Documentation

◆ ~GridDataSerializer()

virtual ug::GridDataSerializer::~GridDataSerializer ( )
inlinevirtual

Member Function Documentation

◆ deserialization_done()

virtual void ug::GridDataSerializer::deserialization_done ( )
inlinevirtual

this method is called after read_info has been called for all geometric objects.

◆ deserialization_starts()

virtual void ug::GridDataSerializer::deserialization_starts ( )
inlinevirtual

this method is called after read_info has been called for all geometric objects.

◆ read_data() [1/4]

virtual void ug::GridDataSerializer::read_data ( BinaryBuffer in,
Edge o 
)
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ read_data() [2/4]

virtual void ug::GridDataSerializer::read_data ( BinaryBuffer in,
Face o 
)
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ read_data() [3/4]

virtual void ug::GridDataSerializer::read_data ( BinaryBuffer in,
Vertex o 
)
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ read_data() [4/4]

virtual void ug::GridDataSerializer::read_data ( BinaryBuffer in,
Volume o 
)
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ read_info()

virtual void ug::GridDataSerializer::read_info ( BinaryBuffer in)
inlinevirtual

Read the info written during write_info here. Default: empty implementation.

Reimplemented in ug::SubsetHandlerSerializer.

◆ write_data() [1/4]

virtual void ug::GridDataSerializer::write_data ( BinaryBuffer out,
Edge o 
) const
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ write_data() [2/4]

virtual void ug::GridDataSerializer::write_data ( BinaryBuffer out,
Face o 
) const
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ write_data() [3/4]

virtual void ug::GridDataSerializer::write_data ( BinaryBuffer out,
Vertex o 
) const
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ write_data() [4/4]

virtual void ug::GridDataSerializer::write_data ( BinaryBuffer out,
Volume o 
) const
inlinevirtual

Reimplemented in ug::SubsetHandlerSerializer.

◆ write_info()

virtual void ug::GridDataSerializer::write_info ( BinaryBuffer out) const
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.

Reimplemented in ug::SubsetHandlerSerializer.


The documentation for this class was generated from the following file: