36 isUsed_ = source.isUsed_;
37 isDefault_ = source.isDefault_;
38 docString_ = source.docString_;
39 validator_ = source.validator_;
45 : val_(std::move(other.val_)),
46 isUsed_(other.isUsed_),
47 isDefault_(other.isDefault_),
48 docString_(std::move(other.docString_)),
49 validator_(std::move(other.validator_))
56 this->val_ = std::move(other.val_);
57 this->isUsed_ = other.isUsed_;
58 this->isDefault_ = other.isDefault_;
59 this->docString_ = std::move(other.docString_);
60 this->validator_ = std::move(other.validator_);
66 const any &value_in,
bool isDefault_in
70 isDefault_ = isDefault_in;
81 validator_ = validator_in;
87 docString_ = docString_in;
92 bool isDefault_in,
const std::string &docString_in
96 isDefault_ = isDefault_in;
98 docString_ = docString_in;
105 return ( !val_.has_value() ?
false : val_.type() ==
typeid(
ParameterList) );
110 if( !this->
isList() ) os << val_;
124 size_t starPos = formatString.find(
"*");
125 std::string prefix = formatString.substr(0,starPos);
126 std::string postfix = formatString.substr(starPos+1);
127 std::string valueTypeName = val_.typeName();
128 size_t prePos = valueTypeName.find(prefix);
129 size_t postPos = valueTypeName.find(postfix);
130 return (prePos != std::string::npos) && (prePos==0)
131 && (postPos != std::string::npos) && (prePos < postPos);
136 size_t starPos = formatString.find(
"*");
137 std::string prefix = formatString.substr(0,starPos);
138 std::string postfix = formatString.substr(starPos+1);
139 std::string valueTypeName = val_.typeName();
140 size_t prePos = valueTypeName.find(prefix);
141 size_t postPos = valueTypeName.find(postfix);
142 return (prePos != std::string::npos) && (prePos==0)
143 && (postPos != std::string::npos) && (prePos < postPos);
150void ParameterEntry::reset()
Object held as the "value" in the Teuchos::ParameterList std::map.
Templated Parameter List class.
A thin wrapper around the Teuchos Array class that allows for 2 dimensional arrays.
std::string getArrayTypeNameTraitsFormat()
Get the format that is used for the specialization of the TypeName traits class for Array.
void setValidator(RCP< const ParameterEntryValidator > const &validator)
Set the validator.
ParameterList & setList(bool isDefault=false, const std::string &docString="")
Create a parameter entry that is an empty list.
ParameterEntry & operator=(const ParameterEntry &source)
Replace the current parameter entry with source.
ParameterEntry()
Default Constructor.
bool isTwoDArray() const
Test if the type of data being contained is a Teuchos::TwoDArray.
bool isArray() const
Test if the type of data being contained is a Teuchos::Array.
std::ostream & leftshift(std::ostream &os, bool printFlags=true) const
Output a non-list parameter to the given output stream.
void setDocString(const std::string &docString)
Set the documentation std::string.
bool isList() const
Return whether or not the value itself is a list.
void setAnyValue(const any &value, bool isDefault=false)
Set the value as an any object.
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
std::string getTwoDArrayTypeNameTraitsFormat()
Get the format that is used for the specialization of the TypeName traits class for TwoDArray.
Modified boost::any class, which is a container for a templated value.
ValueType & any_cast(any &operand)
Used to extract the templated value held in Teuchos::any to a given value type.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...