69 isUsed_ = source.isUsed_;
70 isDefault_ = source.isDefault_;
71 docString_ = source.docString_;
72 validator_ = source.validator_;
78 const any &value_in,
bool isDefault_in
82 isDefault_ = isDefault_in;
93 validator_ = validator_in;
99 docString_ = docString_in;
104 bool isDefault_in,
const std::string &docString_in
108 isDefault_ = isDefault_in;
110 docString_ = docString_in;
111 return any_cast<ParameterList>( val_ );
122 if( !this->
isList() ) os << val_;
135 std::string formatString = getTwoDArrayTypeNameTraitsFormat();
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);
147 std::string formatString = getArrayTypeNameTraitsFormat();
148 size_t starPos = formatString.find(
"*");
149 std::string prefix = formatString.substr(0,starPos);
150 std::string postfix = formatString.substr(starPos+1);
151 std::string valueTypeName = val_.
typeName();
152 size_t prePos = valueTypeName.find(prefix);
153 size_t postPos = valueTypeName.find(postfix);
154 return (prePos != std::string::npos) && (prePos==0)
155 && (postPos != std::string::npos) && (prePos < postPos);
162void 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.
This object is held as the "value" in the Teuchos::ParameterList std::map.
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.
Modified boost::any class, which is a container for a templated value.
std::string typeName() const
Return the name of the type.
const std::type_info & type() const
Return the type of value being stored.
bool empty() const
Return true if nothing is being stored.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...