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);
230 template <
class Type>
232 Type& value,
bool isActive)
243 template <
class Type>
245 Type* ptr,
int n,
bool isActive)
256 template <
class Type>
258 Type* ptr,
int m,
int n,
int np,
263 ar.
pack(ptr, m, n, np);
Saving archive for binary istream.
Saving / output archive for binary ostream.
void pack(const T &data)
Pack one object of type T.
A label string in a file format.
Abstract base class for classes that input and ouput parameters to file.
A single variable in a parameter file.
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.
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.
virtual void bcastValue()
Broadcast parameter value within the ioCommunicator.
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.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.