NOX::Parameter::List Class Reference

Manipulating lists of parameters. More...

#include <NOX_Parameter_List.H>

Collaboration diagram for NOX::Parameter::List:

[legend]
List of all members.

Public Member Functions

 List ()
 Constructor.
 List (const List &source)
 Copy Constructor.
Listoperator= (const List &source)
 Copy.
 ~List ()
 Deconstructor.
void unused () const
 List unused parameters.
Listsublist (const string &name)
const Listsublist (const string &name) const
 Returns a const reference to the sublist.
bool isParameter (const string &name) const
 Return true if a parameter with this name exists.
ostream & print (ostream &stream, int indent=0) const
 Printing.
Setting Parameters
Sets different types of parameters. The type depends on the second entry. Be sure to use static_cast<type>() when the type is ambiguous. Both char* and string map to are stored as strings internally. Sets the parameter as "unused".

void setParameter (const string &name, bool value)
void setParameter (const string &name, int value)
void setParameter (const string &name, double value)
void setParameter (const string &name, const char *value)
void setParameter (const string &name, char *value)
void setParameter (const string &name, const string &value)
void setParameter (const string &name, const Arbitrary &value)
Getting Parameters
Get different types of parameters. The type depends on the second entry. Returns the nominal value if that parameter has not been specified. The non-const version adds the (name, nominal) pair to the list if it's not already specified. Be sure to use static_cast<type>() when the type is ambiguous. Both char* and string map return string values. Sets the parameters as "used".

bool getParameter (const string &name, bool nominal)
int getParameter (const string &name, int nominal)
double getParameter (const string &name, double nominal)
const string & getParameter (const string &name, const char *nominal)
const string & getParameter (const string &name, const string &nominal)
const ArbitrarygetParameter (const string &name, const Arbitrary &nominal)
bool getParameter (const string &name, bool nominal) const
int getParameter (const string &name, int nominal) const
double getParameter (const string &name, double nominal) const
const string & getParameter (const string &name, const char *nominal) const
const string & getParameter (const string &name, const string &nominal) const
const ArbitrarygetParameter (const string &name, const Arbitrary &nominal) const
Getting Arbitrary Parameters Without Nominal Value
Special commands for accessing parameters without specifying a nominal value. Will throw an error if the parameter does not exist or is of the wrong type. Recommend called isParameterArbitrary() first.

const ArbitrarygetArbitraryParameter (const string &name) const
Is Parameter of the Specified Type?
Returns true if the specified parameter exists AND is of the specified type.

bool isParameterBool (const string &name) const
bool isParameterInt (const string &name) const
bool isParameterDouble (const string &name) const
bool isParameterString (const string &name) const
bool isParameterSublist (const string &name) const
bool isParameterArbitrary (const string &name) const
Is Parameter Equal Value?
Returns true if the specified parameter exists AND is equal to the specified value. (Not valid for Arbitrary or List parameters.)

bool isParameterEqual (const string &name, bool value) const
bool isParameterEqual (const string &name, int value) const
bool isParameterEqual (const string &name, double value) const
bool isParameterEqual (const string &name, const char *value) const
bool isParameterEqual (const string &name, const string &value) const

Detailed Description

Manipulating lists of parameters.


Member Function Documentation

const List & List::sublist const string &  name  )  const
 

Returns a const reference to the sublist.

If the list does not already exist, throws an error. If the name exists but is not a sublist, throws an error.

List & List::sublist const string &  name  ) 
 

Creates and empty sublist and returns a reference to the sublist. If the list already exists, returns reference to that sublist. If the name exists but is not a sublist, throws an error.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:43:33 2008 for NOX by doxygen 1.3.9.1