Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

SavableState Class Reference

Base class for objects that can save/restore state. More...

#include <state.h>

Inheritance diagram for SavableState

Inheritance graph
[legend]
Collaboration diagram for SavableState:

Collaboration graph
[legend]
List of all members.

Public Methods

SavableState& operator= (const SavableState &)
virtual ~SavableState ()
void save_state (StateOut &)
 Save the state of the object as specified by the StateOut object. More...

void save_object_state (StateOut &)
 This can be used for saving state when the exact type of the object is known for both the save and the restore. More...

virtual void save_vbase_state (StateOut &)
 Save the virtual bases for the object. More...

virtual void save_data_state (StateOut &)
 Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. More...


Static Public Methods

void save_state (SavableState *s, StateOut &)
SavableState* restore_state (StateIn &si)
 Restores objects saved with save_state. More...

SavableState* key_restore_state (StateIn &si, const char *keyword)
 Like restore_state, but keyword is used to override values while restoring.

SavableState* dir_restore_state (StateIn &si, const char *objectname, const char *keyword=0)

Protected Methods

 SavableState ()
 SavableState (const SavableState &)
 SavableState (StateIn &)
 Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above. More...


Detailed Description

Base class for objects that can save/restore state.


Constructor & Destructor Documentation

SavableState::SavableState ( StateIn & ) [protected]
 

Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above.

All derived class StateIn& constructors must invoke the SavableState(StateIn&) constructor.


Member Function Documentation

SavableState * SavableState::restore_state ( StateIn & si ) [static]
 

Restores objects saved with save_state.

The exact type of the next object in si can be any type publically derived from the SavableState. Derived classes implement a similar static function that returns a pointer to the derived class. If the objectname is given the directory will be consulted to find and restore that object.

void SavableState::save_data_state ( StateOut & s ) [virtual]
 

Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them.

This must be implemented by the derived class if the class has data.

Reimplemented in AtomInfo, IntCoor, SumIntCoor, SetIntCoor, IntCoorGen, MolecularCoor, IntMolecularCoor, SymmMolecularCoor, RedundMolecularCoor, CartMolecularCoor, MolecularEnergy, FinDispMolecularHessian, Molecule, MolecularFrequencies, SimpleCo, GaussianBasisSet, GaussianShell, Integral, DenFunctional, NElFunctional, SumDenFunctional, StdDenFunctional, LSDACFunctional, PBECFunctional, PW91CFunctional, P86CFunctional, SlaterXFunctional, VWNLCFunctional, VWN1LCFunctional, VWN2LCFunctional, VWN3LCFunctional, VWN4LCFunctional, VWN5LCFunctional, PW92LCFunctional, PZ81LCFunctional, XalphaFunctional, Becke88XFunctional, LYPCFunctional, PW86XFunctional, PBEXFunctional, PW91XFunctional, mPW91XFunctional, G96XFunctional, DenIntegrator, IntegrationWeight, BeckeIntegrationWeight, RadialIntegrator, AngularIntegrator, EulerMaclaurinRadialIntegrator, LebedevLaikovIntegrator, GaussLegendreAngularIntegrator, RadialAngularIntegrator, IntegralV3, MBPT2, CLHF, CLSCF, HSOSHF, HSOSSCF, SCF, UnrestrictedSCF, OneBodyWavefunction, Wavefunction, Convergence, DIIS, EFCOpt, Function, Optimize, LineOpt, QNewtonOpt, SCExtrapData, SCExtrapError, SelfConsistentExtrapolation, HessianUpdate, DFPUpdate, BFGSUpdate, PowellUpdate, SCMatrixBlock, SCVectorSimpleBlock, SCVectorSimpleSubBlock, SCMatrixRectBlock, SCMatrixRectSubBlock, SCMatrixLTriBlock, SCMatrixLTriSubBlock, SCMatrixDiagBlock, SCMatrixDiagSubBlock, SCBlockInfo, SCDimension, PointGroup, Debugger, and Units.

void SavableState::save_object_state ( StateOut & )
 

This can be used for saving state when the exact type of the object is known for both the save and the restore.

To restore objects saved in this way the user must directly invoke the object's StateIn& constructor.

void SavableState::save_state ( StateOut & )
 

Save the state of the object as specified by the StateOut object.

This routine saves the state of the object (which includes the nonvirtual bases), the virtual bases, and type information. The default implementation should be adequate.

void SavableState::save_vbase_state ( StateOut & ) [virtual]
 

Save the virtual bases for the object.

This must be done in the same order that the ctor initializes the virtual bases. This does not include the DescribedClass and SavableState virtual base classes. This must be implemented by the user if the class has other virtual bases. (These virtual bases must come after SavableState, if SavableState is virtual.)


The documentation for this class was generated from the following file:
Generated at Thu Oct 4 18:09:43 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.