23 : label_(label, isRequired),
65 << label_ << std::right
67 <<
"[ absent ]" << std::endl;
74 UTIL_THROW(
"Error: not isIoProcessor and not hasIoCommunicator");
77 UTIL_THROW(
"Error: not isIoProcessor and no MPI");
116 <<
"[ absent ]" << std::endl;
122 UTIL_THROW(
"Error: not isIoProcessor and !hasIoCommunicator");
125 UTIL_THROW(
"Error: not isIoProcessor and no MPI");
static bool isMatched()
Did the most recent attempt to match a Label succeed?
virtual void writeParam(std::ostream &out)=0
Read parameter(s) to file.
std::string label() const
Return label string.
Label label_
Label object that contains parameter label string.
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
bool isRequired() const
Is this the label for a required component?
void bcast< bool >(MPI::Intracomm &comm, bool &data, int root)
Explicit specialization of bcast for bool data.
Parameter(const char *label, bool isRequired=true)
Constructor.
Saving / output archive for binary ostream.
virtual ~Parameter()
Destructor.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
std::string string() const
Return label string.
MPI::Intracomm & ioCommunicator() const
Get the MPI communicator by reference.
virtual void bcastValue()
Broadcast parameter value within the ioCommunicator.
Utility classes for scientific computation.
static bool echo()
Get echo parameter.
virtual void readValue(std::istream &in)
Read parameter value from an input stream.
virtual void save(Serializable::OArchive &ar)
Save to an archive.
bool isIoProcessor() const
Can this processor do file I/O ?
bool isActive() const
Is this parameter active?
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
static std::ostream & file()
Get log ostream by reference.
bool hasIoCommunicator() const
Does this object have an associated MPI communicator?
Saving archive for binary istream.
static const int Width
Width of output field for a scalar variable.
virtual void load(Serializable::IArchive &ar)
Load from an archive.
This file contains templates for global functions send<T>, recv<T> and bcast<T>.
bool isActive_
Is this parameter active (always true if isRequired).
bool isRequired() const
Is this an optional parameter?
virtual void readParam(std::istream &in)
Read a label and (if the label matches) a parameter value.
std::string indent() const
Return indent string for this object (string of spaces).