|
Teuchos Package Browser (Single Doxygen Collection) Version of the Day
|
Generic parameterlist driven bulider class. More...
#include <Teuchos_ObjectBuilder.hpp>

Public Member Functions | |
| ObjectBuilder () | |
| | |
| ~ObjectBuilder () | |
| | |
| void | setObjectName (const std::string &objectName) |
| Set the name of the object this will be a builder for, e.g. "Object". | |
| void | setObjectTypeName (const std::string &objectTypeName) |
| Set the name of the parameterlist selector, e.g. "Object Type". | |
| void | setObjectFactory (const RCP< const AbstractFactory< ObjectType > > &objectFactory, const std::string &objectFactoryName) |
| Set a new Object factory object. | |
| std::string | getObjectName () const |
Get the name of the Object that will be created on the next call to this->create(). | |
| void | setDefaultObject (const std::string &defaultObject_name) |
| Set the name of the desired object to be created when the parameter list does not specify which object you want and when create is called without arguments. | |
| RCP< ObjectType > | create (const std::string &objectName="") const |
| | |
Private Types | |
| typedef RCP< const AbstractFactory< ObjectType > > | object_fcty_t |
Private Member Functions | |
| void | initializeDefaults_ () |
Private Attributes | |
| RCP< ParameterList > | paramList_ |
| RCP< const ParameterList > | validParamList_ |
| RCP< const StringToIntegralParameterEntryValidator < int > > | objectValidator_ |
| std::string | object_name_ |
| std::string | objectType_name_ |
| Array< std::string > | validObjectNames_ |
| Array< object_fcty_t > | objectArray_ |
| std::string | defaultObject_name_ |
Overridden from ParameterListAcceptor | |
| void | setParameterList (const RCP< ParameterList > ¶mList) |
| | |
| RCP< ParameterList > | getNonconstParameterList () |
| | |
| RCP< ParameterList > | unsetParameterList () |
| | |
| RCP< const ParameterList > | getParameterList () const |
| | |
| RCP< const ParameterList > | getValidParameters () const |
| | |
Generic parameterlist driven bulider class.
This is a generic builder class that provides a validated parameter list and can build anything that can be constructed with a default constructor and accepts a parameter list through setParameterList (e.g. it derives from ParameterListAcceptor).
Note the following:
The default object name is "Object" (this can be changed through setObjectName)
The default object type name is "Object Type" (this can be changed through setObjectTypeName)
The valid parameter list has a parameter named "Object Type" with a default value of "None"
The builder will create a null RCP if no factories have been set on it with setObjectFactory
A parameter list need not be set on the builder to call create, it will simply create the default factory which is either "None" if no factories have been set or it will be the last factory that was set
Setting a parameter list on the builder allows you to specify which object will be created by default and allows you to control what options will be used in each object.
Definition at line 76 of file Teuchos_ObjectBuilder.hpp.
typedef RCP<const AbstractFactory<ObjectType > > Teuchos::ObjectBuilder< ObjectType >::object_fcty_t [private] |
Definition at line 143 of file Teuchos_ObjectBuilder.hpp.
| Teuchos::ObjectBuilder< ObjectType >::ObjectBuilder | ( | ) |
Definition at line 195 of file Teuchos_ObjectBuilder.hpp.
| Teuchos::ObjectBuilder< ObjectType >::~ObjectBuilder | ( | ) |
Definition at line 202 of file Teuchos_ObjectBuilder.hpp.
| void Teuchos::ObjectBuilder< ObjectType >::setObjectName | ( | const std::string & | objectName | ) |
Set the name of the object this will be a builder for, e.g. "Object".
Definition at line 387 of file Teuchos_ObjectBuilder.hpp.
| void Teuchos::ObjectBuilder< ObjectType >::setObjectTypeName | ( | const std::string & | objectTypeName | ) |
Set the name of the parameterlist selector, e.g. "Object Type".
Definition at line 398 of file Teuchos_ObjectBuilder.hpp.
| void Teuchos::ObjectBuilder< ObjectType >::setObjectFactory | ( | const RCP< const AbstractFactory< ObjectType > > & | objectFactory, |
| const std::string & | objectFactoryName | ||
| ) |
Set a new Object factory object.
Definition at line 214 of file Teuchos_ObjectBuilder.hpp.
| std::string Teuchos::ObjectBuilder< ObjectType >::getObjectName | ( | ) | const |
Get the name of the Object that will be created on the next call to this->create().
Definition at line 232 of file Teuchos_ObjectBuilder.hpp.
| void Teuchos::ObjectBuilder< ObjectType >::setDefaultObject | ( | const std::string & | defaultObject_name | ) |
Set the name of the desired object to be created when the parameter list does not specify which object you want and when create is called without arguments.
Definition at line 326 of file Teuchos_ObjectBuilder.hpp.
| RCP< ObjectType > Teuchos::ObjectBuilder< ObjectType >::create | ( | const std::string & | objectName = "" | ) | const |
Definition at line 343 of file Teuchos_ObjectBuilder.hpp.
| void Teuchos::ObjectBuilder< ObjectType >::setParameterList | ( | const RCP< ParameterList > & | paramList | ) | [virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 250 of file Teuchos_ObjectBuilder.hpp.
| RCP< ParameterList > Teuchos::ObjectBuilder< ObjectType >::getNonconstParameterList | ( | ) | [virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 263 of file Teuchos_ObjectBuilder.hpp.
| RCP< ParameterList > Teuchos::ObjectBuilder< ObjectType >::unsetParameterList | ( | ) | [virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 271 of file Teuchos_ObjectBuilder.hpp.
| RCP< const ParameterList > Teuchos::ObjectBuilder< ObjectType >::getParameterList | ( | ) | const [virtual] |
Reimplemented from Teuchos::ParameterListAcceptor.
Definition at line 286 of file Teuchos_ObjectBuilder.hpp.
| RCP< const ParameterList > Teuchos::ObjectBuilder< ObjectType >::getValidParameters | ( | ) | const [virtual] |
Reimplemented from Teuchos::ParameterListAcceptor.
Definition at line 294 of file Teuchos_ObjectBuilder.hpp.
| void Teuchos::ObjectBuilder< ObjectType >::initializeDefaults_ | ( | ) | [private] |
Definition at line 409 of file Teuchos_ObjectBuilder.hpp.
RCP<ParameterList> Teuchos::ObjectBuilder< ObjectType >::paramList_ [private] |
Definition at line 148 of file Teuchos_ObjectBuilder.hpp.
RCP<const ParameterList> Teuchos::ObjectBuilder< ObjectType >::validParamList_ [mutable, private] |
Definition at line 149 of file Teuchos_ObjectBuilder.hpp.
RCP<const StringToIntegralParameterEntryValidator<int> > Teuchos::ObjectBuilder< ObjectType >::objectValidator_ [mutable, private] |
Definition at line 150 of file Teuchos_ObjectBuilder.hpp.
std::string Teuchos::ObjectBuilder< ObjectType >::object_name_ [private] |
Definition at line 152 of file Teuchos_ObjectBuilder.hpp.
std::string Teuchos::ObjectBuilder< ObjectType >::objectType_name_ [private] |
Definition at line 153 of file Teuchos_ObjectBuilder.hpp.
Array<std::string> Teuchos::ObjectBuilder< ObjectType >::validObjectNames_ [private] |
Definition at line 155 of file Teuchos_ObjectBuilder.hpp.
Array<object_fcty_t> Teuchos::ObjectBuilder< ObjectType >::objectArray_ [private] |
Definition at line 156 of file Teuchos_ObjectBuilder.hpp.
std::string Teuchos::ObjectBuilder< ObjectType >::defaultObject_name_ [private] |
Definition at line 157 of file Teuchos_ObjectBuilder.hpp.
1.7.4