MPQC  2.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
sc::SavableState Class Reference

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

#include <state.h>

Inheritance diagram for sc::SavableState:
Inheritance graph
[legend]
Collaboration diagram for sc::SavableState:
Collaboration graph
[legend]

Public Member Functions

SavableStateoperator= (const 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...
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const throw ()
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
virtual void print (std::ostream &=ExEnv::out0()) const
 Print the object.
 
- Public Member Functions inherited from sc::RefCount
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 
int managed () const
 Return 1 if the object is managed. Otherwise return 0.
 
- Public Member Functions inherited from sc::Identity
Identifier identifier ()
 Return the Identifier for this argument. More...
 

Static Public Member Functions

static void save_state (SavableState *s, StateOut &)
 
static SavableStaterestore_state (StateIn &si)
 Restores objects saved with save_state. More...
 
static SavableStatekey_restore_state (StateIn &si, const char *keyword)
 Like restore_state, but keyword is used to override values while restoring.
 
static SavableStatedir_restore_state (StateIn &si, const char *objectname, const char *keyword=0)
 

Protected Member Functions

 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...
 
- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

Detailed Description

Base class for objects that can save/restore state.

Constructor & Destructor Documentation

◆ SavableState()

sc::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

◆ restore_state()

static SavableState* sc::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.

◆ save_data_state()

virtual void sc::SavableState::save_data_state ( StateOut )
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 sc::PointGroup, sc::AtomInfo, sc::Units, sc::SCMatrixBlock, sc::G96XFunctional, sc::mPW91XFunctional, sc::CartMolecularCoor, sc::PW91XFunctional, sc::RedundMolecularCoor, sc::PBEXFunctional, sc::SymmMolecularCoor, sc::PW86XFunctional, sc::LYPCFunctional, sc::Becke88XFunctional, sc::XalphaFunctional, sc::IntMolecularCoor, sc::PZ81LCFunctional, sc::PW92LCFunctional, sc::VWN5LCFunctional, sc::VWN4LCFunctional, sc::VWN3LCFunctional, sc::VWN2LCFunctional, sc::VWN1LCFunctional, sc::VWNLCFunctional, sc::SlaterXFunctional, sc::Molecule, sc::NewP86CFunctional, sc::RadialAngularIntegrator, sc::P86CFunctional, sc::GaussianBasisSet, sc::PW91CFunctional, sc::SCElementDot, sc::MolecularCoor, sc::SCMatrixDiagSubBlock, sc::SCElementKNorm, sc::GaussLegendreAngularIntegrator, sc::PBECFunctional, sc::SCElementSumAbs, sc::SCMatrixDiagBlock, sc::IntCoorGen, sc::SCElementMinAbs, sc::LSDACFunctional, sc::SCElementMaxAbs, sc::StdDenFunctional, sc::LebedevLaikovIntegrator, sc::SCMatrixLTriSubBlock, sc::SCElementShiftDiagonal, sc::SCElementScaleDiagonal, sc::MolEnergyConvergence, sc::SCMatrixLTriBlock, sc::SCElementInvert, sc::SCElementSquareRoot, sc::SCElementAssign, sc::EulerMaclaurinRadialIntegrator, sc::MBPT2, sc::SCMatrixRectSubBlock, sc::SCElementRandomize, sc::MBPT2_R12, sc::R12IntEval, sc::AngularIntegrator, sc::SCElementScale, sc::SetIntCoor, sc::SumMolecularEnergy, sc::HCoreWfn, sc::SumDenFunctional, sc::SCDestructiveElementProduct, sc::RadialIntegrator, sc::SCF, sc::SCMatrixRectBlock, sc::SCElementScalarProduct, sc::BeckeIntegrationWeight, sc::DiagMolecularHessian, sc::PsiCCSD_T, sc::SCVectorSimpleSubBlock, sc::NElFunctional, sc::FinDispMolecularHessian, sc::Debugger, sc::GuessMolecularHessian, sc::PsiCCSD, sc::Wavefunction, sc::TwoBodyMOIntsTransform, sc::SumIntCoor, sc::LineOpt, sc::IntegrationWeight, sc::MolecularEnergy, sc::SCDimension, sc::SCVectorSimpleBlock, sc::GaussianShell, sc::R12IntEvalInfo, sc::PowellUpdate, sc::R12IntsAcc_MPIIOFile_Ind, sc::ReadMolecularHessian, sc::Convergence, sc::Function, sc::DenFunctional, sc::QNewtonOpt, sc::BFGSUpdate, sc::SCMatrixBlockList, sc::HSOSSCF, sc::MolecularFrequencies, sc::SimpleCo, sc::MOIndexSpace, sc::SymmSCMatrixSCExtrapError, sc::SelfConsistentExtrapolation, sc::IntegralCCA, sc::R12IntsAcc, sc::EFCOpt, sc::OverlapOrthog, sc::DIIS, sc::DFPUpdate, sc::DenIntegrator, sc::SymmSCMatrixNSCExtrapData, sc::Optimize, sc::SumAccumH, sc::MOIntsTransformFactory, sc::Integral, sc::ShellPairsCints, sc::R12IntsAcc_MPIIOFile, sc::R12IntsAcc_Node0File, sc::PsiSCF, sc::IntCoor, sc::MP2R12Energy, sc::HSOSKS, sc::SCBlockInfo, sc::SymmSCMatrix4SCExtrapData, sc::OneBodyWavefunction, sc::UKS, sc::CLSCF, sc::SCExtrapError, sc::R12IntsAcc_MemoryGrp, sc::AccumHNull, sc::CLKS, sc::UnrestrictedSCF, sc::BEMSolventH, sc::TaylorMolecularEnergy, sc::GDIISOpt, sc::MolecularHessian, sc::TCSCF, sc::TwoBodyGrid, sc::IntegralCints, sc::TwoBodyMOIntsTransform_ikjy, sc::TwoBodyMOIntsTransform_ixjy, sc::TwoBodyMOIntsTransform_ijxy, sc::ExtendedHuckelWfn, sc::HessianUpdate, sc::OSSSCF, sc::NewtonOpt, sc::SteepestDescentOpt, sc::IntegralV3, sc::SymmSCMatrix2SCExtrapData, sc::PsiWavefunction, sc::ShellPairCints, sc::UHF, sc::AccumH, sc::SCExtrapData, sc::CLHF, sc::HSOSHF, sc::MP2BasisExtrap, sc::OSSHF, sc::TCHF, and sc::SymmSCMatrixSCExtrapData.

◆ save_object_state()

void sc::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.

◆ save_state()

void sc::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.

◆ save_vbase_state()

virtual void sc::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 Sun Jan 26 2020 23:33:08 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.