1#ifndef UTIL_PARAM_COMPONENT_H
2#define UTIL_PARAM_COMPONENT_H
11#include <util/mpi/MpiFileIo.h>
12#include <util/archives/Serializable.h>
96 std::string
indent()
const;
104 template <
class Archive>
105 void serialize(Archive& ar,
const unsigned int version);
162 template <
class T>
friend class Factory;
176 template <
class Archive>
180 if (Archive::is_saving()) {
181 std::ostringstream buffer;
186 if (Archive::is_loading()) {
187 std::istringstream buffer(str);
Loading (input) archive for binary istream.
Saving / output archive for binary ostream.
Identifies whether this processor may do file I/O.
Abstract base class for classes that input and ouput parameters to file.
std::string indent() const
Return indent string for this object (string of spaces).
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
virtual ~ParamComponent()
Destructor.
virtual void readParam(std::istream &in)=0
Read parameter(s) from file.
static void initStatic()
Initialize static echo member to false.
virtual void resetParam()
Nontrivial implementation provided by ParamComposite subclass.
ParamComponent()
Constructor.
void setIndent(const ParamComponent &parent, bool next=true)
Set indent level.
virtual void load(Serializable::IArchive &ar)
Load internal state from an archive.
virtual void writeParam(std::ostream &out) const =0
Read parameter(s) to file.
static bool echo()
Get echo parameter.
static void setEcho(bool echo=true)
Enable or disable echoing for all subclasses of ParamComponent.
void serialize(Archive &ar, const unsigned int version)
Serialize this ParamComponent as a string.
Abstract class for serializable objects.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.