1#ifndef UTIL_PARAMETER_H
2#define UTIL_PARAMETER_H
11#include <util/param/ParamComponent.h>
12#include <util/archives/Serializable_includes.h>
13#include <util/param/Label.h>
95 int m,
int n,
int np,
bool isActive);
134 virtual void readParam(std::istream &in);
170 std::string
label()
const;
195 virtual void readLabel(std::istream& in);
222 virtual void bcastValue(){}
230 template <
class Type>
243 template <
class Type>
256 template <
class Type>
258 Type* ptr,
int m,
int n,
int np,
263 ar.
pack(ptr, m, n, np);
void pack(const T &data)
Pack one object of type T.
A label string in a file format.
ParamComponent()
Constructor.
static void saveOptionalCArray(Serializable::OArchive &ar, Type *ptr, int n, bool isActive)
Save an optional C-array of n values to an output archive.
virtual ~Parameter()
Destructor.
virtual void readLabel(std::istream &in)
Read and attempt to match label string.
std::string label() const
Return label string.
Parameter(const char *label, bool isRequired=true)
Constructor.
virtual void save(Serializable::OArchive &ar)
Save to an archive.
virtual void readValue(std::istream &in)
Read parameter value from an input stream.
static const int Precision
Precision for io of floating point data field.
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
bool isActive_
Is this parameter active (always true if isRequired).
virtual void readParam(std::istream &in)
Read a label and (if the label matches) a parameter value.
static void saveOptionalCArray2D(Serializable::OArchive &ar, Type *ptr, int m, int n, int np, bool isActive)
Save an optional two-dimensional C array to an output archive.
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
bool isRequired() const
Is this an optional parameter?
Label label_
Label object that contains parameter label string.
static void saveOptional(Serializable::OArchive &ar, Type &value, bool isActive)
Save an optional parameter value to an output archive.
bool isActive() const
Is this parameter active?
static const int Width
Width of output field for a scalar variable.
virtual void load(Serializable::IArchive &ar)
Load from an archive.
BinaryFileIArchive IArchive
Type of input archive used by load method.
BinaryFileOArchive OArchive
Type of output archive used by save method.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.