#include <source/toolbox/database/Serializable.h>
Inheritance diagram for SAMRAI::tbox::Serializable:
Public Member Functions | |
Serializable () | |
virtual | ~Serializable () |
virtual void | putToDatabase (Pointer< Database > db)=0 |
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.
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.
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 >.