io_vtlate Class Template Reference

A template for adding I/O classes. More...

#include <collection.h>

Inheritance diagram for io_vtlate:

io_base

Detailed Description

template<class object>
class io_vtlate< object >

This class is experimental.

Definition at line 1542 of file collection.h.


Public Member Functions

Functions to be overloaded
These functions should be overloaded in all descendants of io_tlate.

virtual const char * type ()
 The name of the type to be processed.
virtual int input (cinput *cin, in_file_format *ins, object *op)
 Method for reading an object from ins.
virtual int output (coutput *cout, out_file_format *outs, object *op)
 Method for writing an object to outs.
Functions to be overloaded for static data
These functions should be overloaded in all descendants of io_tlate which control I/O for classes which contain static data.

virtual bool has_static_data ()
 true if the object contains static I/O data
virtual int stat_input (cinput *cin, in_file_format *ins, object *op)
 Method for reading static data for an object from ins.
virtual int stat_output (coutput *cout, out_file_format *outs, object *op)
 Method for writing static data for an object to outs.

Member Function Documentation

virtual int stat_input ( cinput cin,
in_file_format ins,
object *  op 
) [inline, virtual]

One must be careful about objects which set the static data in their constructors. An object is automatically created in order to read its static data. This means that if the static data is set in the constructor, then possibly useful information will be overwritten through the creation of this temporary object.

If one needs to set static data in the constructor of a singleton object, then the create() and remove() functions should be empty and a separate pointer to the singleton should be provided instead of void *vp.

This is only used if has_static_data() returns true;

Definition at line 1596 of file collection.h.


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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page