SAMRAI::tbox::Serializable Class Reference

#include <source/toolbox/database/Serializable.h>

Inheritance diagram for SAMRAI::tbox::Serializable:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Serializable ()
virtual ~Serializable ()
virtual void putToDatabase (Pointer< Database > db)=0

Detailed Description

Class Serializable is an abstract base class for those objects that can serialize their data to a database. This class provides one function that must be implemented in a derived subclass, putToDatabase(Pointer<Database> db), which should put its data members into the specified database object.

Note that the derivation from DescribedClass is virtual. The reason for this is to avoid dynamic casting problems for smart pointers. For some objects in SAMRAI, inheritance from Serializable introduces an additional class hierarchy apart from some other that may be used to implement the subclass object. Pointers to base objects may need to be dynamically cast to derived objects in either hierarchy.


Constructor & Destructor Documentation

SAMRAI::tbox::Serializable::Serializable (  )  [inline]

The constructor for the serializable base class does nothing interesting.

SAMRAI::tbox::Serializable::~Serializable (  )  [virtual]

The virtual destructor for the serializable base class does nothing interesting.


Member Function Documentation

virtual void SAMRAI::tbox::Serializable::putToDatabase ( Pointer< Database db  )  [pure virtual]

This method serializes the object by writing data to the specified database.

NOTE: The asymetry (not having a "getFromDatabase") is from the historical method for doing SAMRAI restart. The constructor for a Serializable class should get the database to restore state from by making a getRootDatabase call to the RestartManager.

Implemented in SAMRAI::tbox::StatisticRestartDatabase, SAMRAI::hier::MultiblockPatchHierarchy< DIM >, SAMRAI::hier::BasePatchHierarchy< DIM >, SAMRAI::hier::PatchHierarchy< DIM >, SAMRAI::mesh::BaseGriddingAlgorithm< DIM >, SAMRAI::mesh::GriddingAlgorithm< DIM >, SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >, SAMRAI::geom::CartesianGridGeometry< DIM >, SAMRAI::geom::BlockGridGeometry< DIM >, SAMRAI::geom::SkeletonGridGeometry< DIM >, SAMRAI::solv::SNES_SAMRAIContext< DIM >, SAMRAI::solv::KINSOL_SAMRAIContext< DIM >, SAMRAI::algs::HyperbolicLevelIntegrator< DIM >, SAMRAI::algs::ImplicitIntegrator< DIM >, SAMRAI::algs::MethodOfLinesIntegrator< DIM >, SAMRAI::algs::TimeRefinementIntegrator< DIM >, and SAMRAI::appu::EmbeddedBoundaryGeometry< DIM >.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:29:00 2009 for SAMRAI by  doxygen 1.5.1