1#ifndef UTIL_SCALAR_PARAM_H
2#define UTIL_SCALAR_PARAM_H
11#include <util/param/Parameter.h>
12#include <util/archives/Serializable_includes.h>
110 template <
class Type>
117 template <
class Type>
119 { in >> *valuePtr_; }
121 template <
class Type>
125 template <
class Type>
130 template <
class Type>
132 { bcast<Type>(ioCommunicator(), *valuePtr_, 0); }
138 template <
class Type>
144 out << std::right << std::scientific
154 template <
class Type>
156 { valuePtr_ = &value; }
This file contains templates for global functions send<T>, recv<T> and bcast<T>.
Saving archive for binary istream.
Saving / output archive for binary ostream.
A single variable in a parameter file.
std::string label() const
Return label string.
static const int Precision
Precision for io of floating point data field.
bool isRequired() const
Is this an optional parameter?
static const int Width
Width of output field for a scalar variable.
Template for a Parameter object associated with a scalar variable.
virtual void readValue(std::istream &in)
Read parameter value from an input stream.
void setValue(Type &value)
Set the pointer to point a specific variable.
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
void writeParam(std::ostream &out) const
Write parameter to stream.
virtual void bcastValue()
Broadcast parameter value within the ioCommunicator.
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
ScalarParam(const char *label, Type &value, bool isRequired=true)
Constructor.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.