PSCF v1.1
Public Types | Public Member Functions | List of all members
Util::Serializable Class Referenceabstract

Abstract class for serializable objects. More...

#include <Serializable.h>

Inheritance diagram for Util::Serializable:
Util::ParamComponent Util::Begin Util::Blank Util::End Util::ParamComposite Util::Parameter Pscf::MixtureTmpl< Polymer, Solvent > Pscf::MixtureTmpl< Polymer< D >, Solvent< D > > Pscf::PolymerTmpl< Block< D > > Pscf::SweepTmpl< DArray< System::WField > > Pscf::SweepTmpl< BasisFieldState< D > > Pscf::Fd1d::Domain Pscf::Fd1d::Iterator Pscf::Fd1d::System Pscf::Homogeneous::Mixture Pscf::Homogeneous::Molecule Pscf::Interaction Pscf::MixtureTmpl< TP, TS > Pscf::PolymerTmpl< Block > Pscf::Pspc::Domain< D > Pscf::Pspc::Iterator< D > Pscf::Pspc::Mask< D > Pscf::Pspc::System< D > Pscf::Pspc::WFieldContainer< D > Pscf::Pspg::Domain< D > Pscf::Pspg::Iterator< D > Pscf::Pspg::System< D > Pscf::Pspg::WFieldContainer< D > Pscf::SolventDescriptor Pscf::SweepTmpl< State > Util::AutoCorr< Data, Product > Util::AutoCorrArray< Data, Product > Util::AutoCorrelation< Data, Product > Util::Average Util::Distribution Util::FileMaster Util::IntDistribution Util::Manager< Data > Util::MeanSqDispArray< Data > Util::Random Util::SymmTensorAverage Util::TensorAverage Util::ArrayParam< Type > Util::MatrixParam< Type > Util::ScalarParam< Type >

Public Types

typedef BinaryFileOArchive OArchive
 Type of output archive used by save method. More...
 
typedef BinaryFileIArchive IArchive
 Type of input archive used by load method. More...
 

Public Member Functions

virtual ~Serializable ()
 Destructor. More...
 
virtual void save (OArchive &ar)=0
 Save to an archive. More...
 
virtual void load (IArchive &ar)=0
 Load from an archive. More...
 

Detailed Description

Abstract class for serializable objects.

This class defines an interface for serialization of objects. The save() method saves the internal state of an object to an archive, and the load() method loads the state from an archive.

The type of archive to be used is specified by the OArchive and IArchive typedefs. The two concrete classes that are referred to by these typedefs should be forward declared in this file, and the header files for these two classes must be included in the file Serializable_includes.h. The file Serializable_includes.h should be included in source files that implement that load and save methods for subclasses.

Definition at line 34 of file Serializable.h.

Member Typedef Documentation

◆ OArchive

Type of output archive used by save method.

Definition at line 42 of file Serializable.h.

◆ IArchive

Type of input archive used by load method.

Definition at line 47 of file Serializable.h.

Constructor & Destructor Documentation

◆ ~Serializable()

virtual Util::Serializable::~Serializable ( )
inlinevirtual

Destructor.

Definition at line 52 of file Serializable.h.

Member Function Documentation

◆ save()

virtual void Util::Serializable::save ( OArchive ar)
pure virtual

◆ load()

virtual void Util::Serializable::load ( IArchive ar)
pure virtual

Load from an archive.

Parameters
arbinary loading (input) archive.

Implemented in Util::AutoCorrelation< Data, Product >, Util::ArrayParam< Type >, Util::MatrixParam< Type >, Util::ParamComponent, Util::ParamComposite, and Util::Parameter.


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