|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
This object is held as the "value" in the Teuchos::ParameterList std::map. More...
#include <Teuchos_ParameterEntry.hpp>
Private Member Functions | |
| void | reset () |
| Reset the entry. More... | |
Private Attributes | |
| any | val_ |
| Templated Datatype. More... | |
| bool | isUsed_ |
| Has this parameter been accessed by a "get" function? More... | |
| bool | isDefault_ |
| Was this parameter a default value assigned by a "get" function? More... | |
| std::string | docString_ |
| Optional documentation field. More... | |
| RCP< const ParameterEntryValidator > | validator_ |
| Optional validator object. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename T > | |
| T & | getValue (const ParameterEntry &entry) |
A templated helper function for returning the value of type T held in the ParameterEntry object, where the type T can be specified in the call. This is an easier way to call the getValue method in the ParameterEntry class, since the user does not have to pass in a pointer of type T. More... | |
| template<typename T > | |
| T & | getValue (RCP< const ParameterEntry > entry) |
A templated helper function for returning the value of type T held in the ParameterEntry object, where the type T can be specified in the call. This is an easier way to call the getValue method in the ParameterEntry class, since the user does not have to pass in a pointer of type T. More... | |
| bool | operator== (const ParameterEntry &e1, const ParameterEntry &e2) |
| Returns true if two ParameterEntry objects are equal. More... | |
| bool | operator!= (const ParameterEntry &e1, const ParameterEntry &e2) |
| Returns true if two ParameterEntry objects are not equal. More... | |
| std::ostream & | operator<< (std::ostream &os, const ParameterEntry &e) |
| Output stream operator for handling the printing of parameter entries. More... | |
Public types | |
| typedef unsigned int | ParameterEntryID |
Constructors/Destructor | |
| ParameterEntry () | |
| Default Constructor. More... | |
| ParameterEntry (const ParameterEntry &source) | |
| Copy constructor. More... | |
| template<typename T > | |
| ParameterEntry (T value, bool isDefault=false, bool isList=false, const std::string &docString="", RCP< const ParameterEntryValidator > const &validator=null) | |
| Templated constructor. More... | |
Set Methods | |
| ParameterEntry & | operator= (const ParameterEntry &source) |
Replace the current parameter entry with source. More... | |
| template<typename T > | |
| void | setValue (T value, bool isDefault=false, const std::string &docString="", RCP< const ParameterEntryValidator > const &validator=null) |
| Templated set method that uses the input value type to determine the type of parameter. More... | |
| void | setAnyValue (const any &value, bool isDefault=false) |
| Set the value as an any object. More... | |
| void | setValidator (RCP< const ParameterEntryValidator > const &validator) |
| Set the validator. More... | |
| void | setDocString (const std::string &docString) |
| Set the documentation std::string. More... | |
| ParameterList & | setList (bool isDefault=false, const std::string &docString="") |
| Create a parameter entry that is an empty list. More... | |
Get Methods | |
| template<typename T > | |
| T & | getValue (T *ptr) const |
| Templated get method that uses the input pointer type to determine the type of parameter to return. More... | |
| any & | getAny (bool activeQry=true) |
Direct access to the Teuchos::any data value underlying this object. The bool argument activeQry (default: true) indicates that the call to getAny() will set the isUsed() value of the ParameterEntry to true. More... | |
| const any & | getAny (bool activeQry=true) const |
Constant direct access to the Teuchos::any data value underlying this object. The bool argument activeQry (default: true) indicates that the call to getAny() will set the isUsed() value of the ParameterEntry to true. More... | |
Attribute/Query Methods | |
| bool | isUsed () const |
| Return whether or not the value has been used; i.e., whether or not the value has been retrieved via a get function. More... | |
| bool | isList () const |
| Return whether or not the value itself is a list. More... | |
| template<typename T > | |
| bool | isType () const |
| Test the type of the data being contained. More... | |
| bool | isArray () const |
| Test if the type of data being contained is a Teuchos::Array. More... | |
| bool | isTwoDArray () const |
| Test if the type of data being contained is a Teuchos::TwoDArray. More... | |
| bool | isDefault () const |
| Indicate whether this entry takes on the default value. More... | |
| std::string | docString () const |
| Return the (optional) documentation std::string. More... | |
| RCP< const ParameterEntryValidator > | validator () const |
| Return the (optional) validator object. More... | |
I/O Methods | |
| std::ostream & | leftshift (std::ostream &os, bool printFlags=true) const |
| Output a non-list parameter to the given output stream. More... | |
| static const std::string & | getTagName () |
| Get the string that should be used as the tag name for all parameters when they are serialized to xml. More... | |
This object is held as the "value" in the Teuchos::ParameterList std::map.
This structure holds a Teuchos::any value and information on the status of this parameter (isUsed, isDefault, etc.). The type of parameter is chosen through the templated Set/Get methods.
Definition at line 67 of file Teuchos_ParameterEntry.hpp.
| typedef unsigned int Teuchos::ParameterEntry::ParameterEntryID |
Definition at line 75 of file Teuchos_ParameterEntry.hpp.
| Teuchos::ParameterEntry::ParameterEntry | ( | ) |
Default Constructor.
Definition at line 51 of file Teuchos_ParameterEntry.cpp.
| Teuchos::ParameterEntry::ParameterEntry | ( | const ParameterEntry & | source | ) |
Copy constructor.
Definition at line 57 of file Teuchos_ParameterEntry.cpp.
|
inlineexplicit |
Templated constructor.
Definition at line 315 of file Teuchos_ParameterEntry.hpp.
| ParameterEntry & Teuchos::ParameterEntry::operator= | ( | const ParameterEntry & | source | ) |
Replace the current parameter entry with source.
Definition at line 63 of file Teuchos_ParameterEntry.cpp.
|
inline |
Templated set method that uses the input value type to determine the type of parameter.
Definition at line 337 of file Teuchos_ParameterEntry.hpp.
| void Teuchos::ParameterEntry::setAnyValue | ( | const any & | value, |
| bool | isDefault = false |
||
| ) |
Set the value as an any object.
This wipes all other data including documentation strings.
Warning! Do not use function ths to set a sublist!
Definition at line 77 of file Teuchos_ParameterEntry.cpp.
| void Teuchos::ParameterEntry::setValidator | ( | RCP< const ParameterEntryValidator > const & | validator | ) |
Set the validator.
Definition at line 89 of file Teuchos_ParameterEntry.cpp.
| void Teuchos::ParameterEntry::setDocString | ( | const std::string & | docString | ) |
Set the documentation std::string.
Definition at line 97 of file Teuchos_ParameterEntry.cpp.
| ParameterList & Teuchos::ParameterEntry::setList | ( | bool | isDefault = false, |
| const std::string & | docString = "" |
||
| ) |
Create a parameter entry that is an empty list.
Definition at line 103 of file Teuchos_ParameterEntry.cpp.
|
inline |
Templated get method that uses the input pointer type to determine the type of parameter to return.
Definition at line 357 of file Teuchos_ParameterEntry.hpp.
|
inline |
Direct access to the Teuchos::any data value underlying this object. The bool argument activeQry (default: true) indicates that the call to getAny() will set the isUsed() value of the ParameterEntry to true.
Definition at line 364 of file Teuchos_ParameterEntry.hpp.
|
inline |
Constant direct access to the Teuchos::any data value underlying this object. The bool argument activeQry (default: true) indicates that the call to getAny() will set the isUsed() value of the ParameterEntry to true.
Definition at line 373 of file Teuchos_ParameterEntry.hpp.
|
inline |
Return whether or not the value has been used; i.e., whether or not the value has been retrieved via a get function.
Definition at line 384 of file Teuchos_ParameterEntry.hpp.
| bool Teuchos::ParameterEntry::isList | ( | ) | const |
Return whether or not the value itself is a list.
Definition at line 115 of file Teuchos_ParameterEntry.cpp.
|
inline |
Test the type of the data being contained.
Definition at line 389 of file Teuchos_ParameterEntry.hpp.
| bool Teuchos::ParameterEntry::isArray | ( | ) | const |
Test if the type of data being contained is a Teuchos::Array.
Definition at line 146 of file Teuchos_ParameterEntry.cpp.
| bool Teuchos::ParameterEntry::isTwoDArray | ( | ) | const |
Test if the type of data being contained is a Teuchos::TwoDArray.
Definition at line 134 of file Teuchos_ParameterEntry.cpp.
|
inline |
Indicate whether this entry takes on the default value.
Definition at line 393 of file Teuchos_ParameterEntry.hpp.
|
inline |
Return the (optional) documentation std::string.
Definition at line 397 of file Teuchos_ParameterEntry.hpp.
|
inline |
Return the (optional) validator object.
Definition at line 402 of file Teuchos_ParameterEntry.hpp.
| std::ostream & Teuchos::ParameterEntry::leftshift | ( | std::ostream & | os, |
| bool | printFlags = true |
||
| ) | const |
Output a non-list parameter to the given output stream.
The parameter is followed by "[default]" if it is the default value given through a Set method. Otherwise, if the parameter was unused (not accessed through a Get method), it will be followed by "[unused]". This function is called by the "std::ostream& operator<<".
Definition at line 120 of file Teuchos_ParameterEntry.cpp.
|
inlinestatic |
Get the string that should be used as the tag name for all parameters when they are serialized to xml.
Definition at line 220 of file Teuchos_ParameterEntry.hpp.
|
private |
Reset the entry.
Definition at line 162 of file Teuchos_ParameterEntry.cpp.
|
related |
A templated helper function for returning the value of type T held in the ParameterEntry object, where the type T can be specified in the call. This is an easier way to call the getValue method in the ParameterEntry class, since the user does not have to pass in a pointer of type T.
Definition at line 263 of file Teuchos_ParameterEntry.hpp.
|
related |
A templated helper function for returning the value of type T held in the ParameterEntry object, where the type T can be specified in the call. This is an easier way to call the getValue method in the ParameterEntry class, since the user does not have to pass in a pointer of type T.
Definition at line 274 of file Teuchos_ParameterEntry.hpp.
|
related |
Returns true if two ParameterEntry objects are equal.
Definition at line 282 of file Teuchos_ParameterEntry.hpp.
|
related |
Returns true if two ParameterEntry objects are not equal.
Definition at line 295 of file Teuchos_ParameterEntry.hpp.
|
related |
Output stream operator for handling the printing of parameter entries.
Definition at line 303 of file Teuchos_ParameterEntry.hpp.
|
private |
Templated Datatype.
Definition at line 233 of file Teuchos_ParameterEntry.hpp.
|
mutableprivate |
Has this parameter been accessed by a "get" function?
Definition at line 236 of file Teuchos_ParameterEntry.hpp.
|
mutableprivate |
Was this parameter a default value assigned by a "get" function?
Definition at line 239 of file Teuchos_ParameterEntry.hpp.
|
private |
Optional documentation field.
Definition at line 242 of file Teuchos_ParameterEntry.hpp.
|
private |
Optional validator object.
Definition at line 250 of file Teuchos_ParameterEntry.hpp.
1.8.5