#include <Teuchos_ParameterList.hpp>
Collaboration diagram for Teuchos::ParameterList:
Public Types | |
| typedef Map::const_iterator | ConstIterator |
| Parameter container const iterator typedef. | |
Public Member Functions | |
Constructors/Destructor. | |
| ParameterList () | |
| Constructor. | |
| ParameterList (const ParameterList &source) | |
| Copy Constructor. | |
| ~ParameterList () | |
| Deconstructor. | |
Set Methods | |
| ParameterList & | operator= (const ParameterList &source) |
Replace the current parameter list with 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 Methods | |
| 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 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 exception is thrown if this parameter doesn't exist. | |
Sublist Methods | |
| ParameterList & | sublist (const string &name) |
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 Methods | |
| 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 Methods | |
| ostream & | print (ostream &os, int indent=0) 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. | |
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). | |
Private Types | |
| typedef Teuchos::map< string, ParameterEntry > | Map |
| Parameter container typedef. | |
| typedef Map::iterator | Iterator |
| Parameter container iterator typedef. | |
Private Member Functions | |
| ParameterEntry & | entry (Iterator i) |
| Access to ParameterEntry (i.e., returns i->second). | |
Private Attributes | |
| Map | params_ |
| Parameter list. | |
Related Functions | |
| (Note that these are not member functions.) | |
| 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. | |
| 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" methods. These parameters can be the standard types (double, float, int, ...) and parameter lists, allowing for a hierarchy of parameter lists. These parameters can also be pointers to vectors or functions.
Definition at line 61 of file Teuchos_ParameterList.hpp.
|
|
Parameter container typedef.
Definition at line 64 of file Teuchos_ParameterList.hpp. |
|
|
Parameter container iterator typedef.
Definition at line 67 of file Teuchos_ParameterList.hpp. |
|
|
Parameter container const iterator typedef.
Definition at line 74 of file Teuchos_ParameterList.hpp. |
|
|
Constructor.
Definition at line 38 of file Teuchos_ParameterList.cpp. |
|
|
Copy Constructor.
Definition at line 40 of file Teuchos_ParameterList.cpp. |
|
|
Deconstructor.
Definition at line 54 of file Teuchos_ParameterList.cpp. |
|
|
Replace the current parameter list with
Definition at line 45 of file Teuchos_ParameterList.cpp. |
|
||||||||||||||||
|
Sets different types of parameters. The type depends on the second entry.
Definition at line 246 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 106 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 112 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Template specialization for the case when a user sets the parameter with a ParameterList.
Definition at line 117 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Set a parameter directly as a ParameterEntry.
Definition at line 124 of file Teuchos_ParameterList.hpp. |
|
||||||||||||||||
|
Retrieves parameter
Definition at line 252 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 146 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 152 of file Teuchos_ParameterList.hpp. |
|
||||||||||
|
Retrieves parameter
Definition at line 271 of file Teuchos_ParameterList.hpp. |
|
||||||||||
|
Retrieves parameter
Definition at line 286 of file Teuchos_ParameterList.hpp. |
|
|
Creates an empty sublist and returns a reference to the sublist
Definition at line 83 of file Teuchos_ParameterList.cpp. |
|
|
Return a const reference to an existing sublist
Definition at line 100 of file Teuchos_ParameterList.cpp. |
|
|
Query the existence of a parameter.
Definition at line 78 of file Teuchos_ParameterList.cpp. |
|
|
Query the existence of a parameter and whether it is a parameter list.
Definition at line 68 of file Teuchos_ParameterList.cpp. |
|
||||||||||
|
Query the existence and type of a parameter.
Definition at line 322 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Printing method for parameter lists. Indenting is used to indicate parameter list hierarchies.
Definition at line 115 of file Teuchos_ParameterList.cpp. |
|
|
Print out unused parameters in the ParameterList.
Definition at line 58 of file Teuchos_ParameterList.cpp. |
|
|
An iterator pointing to the first entry.
Definition at line 139 of file Teuchos_ParameterList.cpp. |
|
|
An iterator pointing beyond the last entry.
Definition at line 144 of file Teuchos_ParameterList.cpp. |
|
|
Access to ParameterEntry (i.e., returns i->second).
Definition at line 180 of file Teuchos_ParameterList.cpp. |
|
|
Access to name (i.e., returns i->first).
Definition at line 170 of file Teuchos_ParameterList.cpp. |
|
|
Access to ParameterEntry (i.e., returns i->second).
Definition at line 175 of file Teuchos_ParameterList.cpp. |
|
||||||||||||||||
|
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 348 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 370 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 392 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 404 of file Teuchos_ParameterList.hpp. |
|
||||||||||||
|
Output stream operator for handling the printing of the parameter list.
Definition at line 412 of file Teuchos_ParameterList.hpp. |
|
|
Parameter list.
Definition at line 241 of file Teuchos_ParameterList.hpp. |
1.3.9.1