#include <Teuchos_ParameterList.hpp>
Public Types | |
Public types | |
| typedef Map::const_iterator | ConstIterator |
| Parameter container const iterator typedef. | |
Public Member Functions | |
Constructors/Destructor. | |
| ParameterList () | |
| Constructor. | |
| ParameterList (const std::string &name) | |
| Constructor. | |
| ParameterList (const ParameterList &source) | |
| Copy Constructor. | |
| virtual | ~ParameterList () |
| Deconstructor. | |
Set Functions | |
| void | setName (const std::string &name) |
Set the name of *this list. | |
| ParameterList & | operator= (const ParameterList &source) |
| ParameterList & | setParameters (const ParameterList &source) |
| template<typename T> | |
| void | set (const string &name, T value) |
| Sets different types of parameters. The type depends on the second entry. | |
| void | set (const string &name, char value[]) |
| Template specialization for the case when a user sets the parameter with a character string in parenthesis. | |
| void | set (const string &name, const char value[]) |
| Template specialization for the case when a user sets the parameter with a character string in parenthesis. | |
| void | set (const string &name, ParameterList value) |
| Template specialization for the case when a user sets the parameter with a ParameterList. | |
| void | setEntry (const string &name, const ParameterEntry &entry) |
| Set a parameter directly as a ParameterEntry. | |
Get Functions | |
| template<typename T> | |
| T & | get (const string &name, T def_value) |
Retrieves parameter name of type T from list, if it exists, else the def_value is used to enter a new parameter into the list. | |
| std::string & | get (const string &name, char def_value[]) |
| Template specialization of get, where the nominal value is a character string in parenthesis. Both char* and string are stored as strings and return string values. | |
| std::string & | get (const string &name, const char def_value[]) |
| Template specialization of get, where the nominal value is a character string in parenthesis. Both char* and string are stored as strings and return string values. | |
| template<typename T> | |
| T & | get (const string &name) |
Retrieves parameter name of type T from a list, an Exceptions::InvalidParameter exception is thrown if this parameter doesn't exist or is the wrong type. | |
| template<typename T> | |
| const T & | get (const string &name) const |
Retrieves parameter name of type T from a constant list, an Exceptions::InvalidParameter exception is thrown if this parameter doesn't exist or is the wrong type. | |
| template<typename T> | |
| T * | getPtr (const string &name) |
Retrieves the pointer for parameter name of type T from a list. A null pointer is returned if this parameter doesn't exist or is the wrong type. | |
| template<typename T> | |
| const T * | getPtr (const string &name) const |
Retrieves the pointer for parameter name of type T from a constant list. A null pointer is returned if this parameter doesn't exist or is the wrong type. | |
| ParameterEntry * | getEntryPtr (const string &name) |
Retrieves the pointer for an entry with the name name if it exists. | |
| const ParameterEntry * | getEntryPtr (const string &name) const |
Retrieves the pointer for a constant entry with the name name if it exists. | |
Sublist Functions | |
| ParameterList & | sublist (const string &name, bool mustAlreadyExist=false) |
Creates an empty sublist and returns a reference to the sublist name. If the list already exists, returns reference to that sublist. If the name exists but is not a sublist, an exception is thrown. | |
| const ParameterList & | sublist (const string &name) const |
Return a const reference to an existing sublist name. If the list does not already exist or the name exists but is not a sublist, an exception is thrown. | |
Attribute Functions | |
| const std::string & | name () const |
| Query the name of this parameter list. | |
| bool | isParameter (const string &name) const |
| Query the existence of a parameter. | |
| bool | isSublist (const string &name) const |
| Query the existence of a parameter and whether it is a parameter list. | |
| template<typename T> | |
| bool | isType (const string &name) const |
| Query the existence and type of a parameter. | |
I/O Functions | |
| ostream & | print (ostream &os, int indent=0, bool showTypes=false, bool showFlags=true) const |
| Printing method for parameter lists. Indenting is used to indicate parameter list hierarchies. | |
| void | unused (ostream &os) const |
| Print out unused parameters in the ParameterList. | |
| std::string | currentParametersString () const |
| Create a single formated string of all of the zero-level parameters in this list. | |
Read-only access to the iterator | |
| ConstIterator | begin () const |
| An iterator pointing to the first entry. | |
| ConstIterator | end () const |
| An iterator pointing beyond the last entry. | |
| const ParameterEntry & | entry (ConstIterator i) const |
| Access to ParameterEntry (i.e., returns i->second). | |
| const string & | name (ConstIterator i) const |
| Access to name (i.e., returns i->first). | |
Validation Functions | |
| void | validateParameters (const ParameterList &validParamList, const int depth=1000, const EValidateUsed validateUsed=VALIDATE_USED_ENABLED, const EValidateDefaults validateDefaults=VALIDATE_DEFAULTS_ENABLED) const |
| Validate the parameters is this list given valid selections in the input list. | |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator== (const ParameterList &list1, const ParameterList &list2) |
| Returns true if two parameter lists are the same. | |
| bool | operator!= (const ParameterList &list1, const ParameterList &list2) |
| Returns true if two parameter lists are not the same. | |
| template<typename T> | |
| T & | getParameter (ParameterList &l, const string &name) |
| A templated helper function for getting a parameter from a non-const list. This helper function prevents the need for giving a nominal value of the specific template type. | |
| template<typename T> | |
| const T & | getParameter (const ParameterList &l, const string &name) |
| A templated helper function for getting a parameter from a const list. This helper function prevents the need for giving a nominal value of the specific template type. | |
| template<typename T> | |
| bool | isParameterType (ParameterList &l, const string &name) |
| A templated helper function for determining the type of a parameter entry for a non-const list. This helper function avoids the need for giving a nominal value of the specific template type. | |
| template<typename T> | |
| bool | isParameterType (const ParameterList &l, const string &name) |
| A templated helper function for determining the type of a parameter entry for a const list. This helper function avoids the need for giving a nominal value of the specific template type. | |
| RefCountPtr< ParameterList > | sublist (const RefCountPtr< ParameterList > ¶mList, const string &name, bool mustAlreadyExist=false) |
| Return a RCP to a sublist in another RCP-ed parameter list. | |
| ostream & | operator<< (ostream &os, const ParameterList &l) |
| Output stream operator for handling the printing of the parameter list. | |
Parameters can be added and retreived with the templated "get" and "set" functions. These parameters can any data type which uses value sementics (e.g. double, float, int, *double, *float, *int, ...) which includes other parameter lists, allowing for a hierarchy of parameter lists. These parameters can also be pointers to vectors or functions.
Definition at line 96 of file Teuchos_ParameterList.hpp.
|
|
Parameter container const iterator typedef.
Definition at line 110 of file Teuchos_ParameterList.hpp. |
|
|
Constructor.
Definition at line 65 of file Teuchos_ParameterList.cpp. |
|
|
Constructor.
Definition at line 69 of file Teuchos_ParameterList.cpp. |
|
|
Copy Constructor.
Definition at line 73 of file Teuchos_ParameterList.cpp. |
|
|
Deconstructor.
Definition at line 104 of file Teuchos_ParameterList.cpp. |
|
|
Set the name of
Definition at line 429 of file Teuchos_ParameterList.hpp. |
|
|
Replace the current parameter list with
Definition at line 79 of file Teuchos_ParameterList.cpp. |
|
|
Set the parameters in
Note, this function will set the parameters and sublists from Definition at line 88 of file Teuchos_ParameterList.cpp. |
|
||||||||||||||||
|
Sets different types of parameters. The type depends on the second entry.
Definition at line 438 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Template specialization for the case when a user sets the parameter with a character string in parenthesis.
Definition at line 444 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Template specialization for the case when a user sets the parameter with a character string in parenthesis.
|
|
||||||||||||
|
Template specialization for the case when a user sets the parameter with a ParameterList.
Definition at line 452 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Set a parameter directly as a ParameterEntry.
Definition at line 456 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||
|
Retrieves parameter
Definition at line 462 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Template specialization of get, where the nominal value is a character string in parenthesis. Both char* and string are stored as strings and return string values.
Definition at line 480 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Template specialization of get, where the nominal value is a character string in parenthesis. Both char* and string are stored as strings and return string values.
|
|
||||||||||
|
Retrieves parameter
Definition at line 488 of file Teuchos_ParameterList.hpp. |
|
||||||||||
|
Retrieves parameter
Definition at line 497 of file Teuchos_ParameterList.hpp. |
|
||||||||||
|
Retrieves the pointer for parameter
Definition at line 507 of file Teuchos_ParameterList.hpp. |
|
||||||||||
|
Retrieves the pointer for parameter
Definition at line 517 of file Teuchos_ParameterList.hpp. |
|
|
Retrieves the pointer for an entry with the name
Definition at line 527 of file Teuchos_ParameterList.hpp. |
|
|
Retrieves the pointer for a constant entry with the name
Definition at line 537 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Creates an empty sublist and returns a reference to the sublist
Definition at line 150 of file Teuchos_ParameterList.cpp. |
|
|
Return a const reference to an existing sublist
Definition at line 181 of file Teuchos_ParameterList.cpp. |
|
|
Query the name of this parameter list.
Definition at line 548 of file Teuchos_ParameterList.hpp. |
|
|
Query the existence of a parameter.
Definition at line 145 of file Teuchos_ParameterList.cpp. |
|
|
Query the existence of a parameter and whether it is a parameter list.
Definition at line 135 of file Teuchos_ParameterList.cpp. |
|
||||||||||
|
Query the existence and type of a parameter.
Definition at line 566 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||||||
|
Printing method for parameter lists. Indenting is used to indicate parameter list hierarchies.
Definition at line 198 of file Teuchos_ParameterList.cpp. |
|
|
Print out unused parameters in the ParameterList.
Definition at line 107 of file Teuchos_ParameterList.cpp. |
|
|
Create a single formated string of all of the zero-level parameters in this list.
Definition at line 117 of file Teuchos_ParameterList.cpp. |
|
|
An iterator pointing to the first entry.
Definition at line 234 of file Teuchos_ParameterList.cpp. |
|
|
An iterator pointing beyond the last entry.
Definition at line 239 of file Teuchos_ParameterList.cpp. |
|
|
Access to ParameterEntry (i.e., returns i->second).
Definition at line 275 of file Teuchos_ParameterList.cpp. |
|
|
Access to name (i.e., returns i->first).
Definition at line 265 of file Teuchos_ParameterList.cpp. |
|
||||||||||||||||||||
|
Validate the parameters is this list given valid selections in the input list.
*this is not found in validParamList then an exception of type Exceptions::InvalidParameter will be thrown which will contain an excellent error message returned by excpt.what().A breath-first search is performed to validate all of the parameters in one sublist before moving into nested subslist. Definition at line 282 of file Teuchos_ParameterList.cpp. |
|
||||||||||||
|
Returns true if two parameter lists are the same.
|
|
||||||||||||
|
Returns true if two parameter lists are not the same.
Definition at line 420 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||
|
A templated helper function for getting a parameter from a non-const list. This helper function prevents the need for giving a nominal value of the specific template type.
Definition at line 608 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||
|
A templated helper function for getting a parameter from a const list. This helper function prevents the need for giving a nominal value of the specific template type.
Definition at line 620 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||
|
A templated helper function for determining the type of a parameter entry for a non-const list. This helper function avoids the need for giving a nominal value of the specific template type.
Definition at line 632 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||
|
A templated helper function for determining the type of a parameter entry for a const list. This helper function avoids the need for giving a nominal value of the specific template type.
Definition at line 644 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||
|
Return a RCP to a sublist in another RCP-ed parameter list.
Definition at line 653 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Output stream operator for handling the printing of the parameter list.
Definition at line 666 of file Teuchos_ParameterList.hpp. |
1.3.9.1