8#include "MatrixParam.h"
9#include "BracketPolicy.h"
12#include <util/mpi/MpiSendRecv.h>
23 template <
typename Type>
36 std::string name = name_;
46 template <
typename Type>
53 template <
typename Type>
62 std::string
string = name_;
75 template <
typename Type>
83 std::string
string = name_;
86 label_.setIsRequired(
false);
92 label_.setIsRequired(isRequired_);
104 std::string
string = name_;
113 std::string
string = name_;
115 hasBrackets_ =
false;
125 template <
class Type>
131 in >>
Label(rBracket_);
136 std::string
string = name_;
138 hasBrackets_ =
false;
149 template <
class Type>
153 out <<
indent() << rBracket_ << std::endl;
A label string in a file format.
static bool isMatched()
Did the most recent attempt to match a Label succeed?
std::string indent() const
Return indent string for this object (string of spaces).
int m() const
Get the logical array dimension.
std::string label() const
Return label string.
void setBrackets(std::string lBracket, std::string rBracket)
Set left and right bracket / delimiter strings.
virtual void readLabel(std::istream &in)
Read parameter label from an input stream.
virtual ~MatrixParam()
Destructor.
void readEndBracket(std::istream &in)
Read the closing delimiter, if any.
void writeEndBracket(std::ostream &out) const
Write the end bracket delimiter, if any.
bool isRequired() const
Is this an optional parameter?
Label label_
Label object that contains parameter label string.
MatrixParam(const char *label, int m, int n, bool isRequired=true)
Constructor.
int n() const
Get the logical array dimension.
Parameter(const char *label, bool isRequired=true)
Constructor.
bool isActive_
Is this parameter active (always true if isRequired).
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
BracketPolicy::Type get()
Get value of bracket policy.
Utility classes for scientific computation.