Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Teuchos::ObjectBuilder< ObjectType > Class Template Reference

Generic parameterlist driven bulider class. More...

#include <Teuchos_ObjectBuilder.hpp>

Inheritance diagram for Teuchos::ObjectBuilder< ObjectType >:
Inheritance graph
[legend]

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". More...
 
void setObjectTypeName (const std::string &objectTypeName)
 Set the name of the parameterlist selector, e.g. "Object Type". More...
 
void setObjectFactory (const RCP< const AbstractFactory< ObjectType > > &objectFactory, const std::string &objectFactoryName)
 Set a new Object factory object. More...
 
std::string getObjectName () const
 Get the name of the Object that will be created on the next call to this->create(). More...
 
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. More...
 
RCP< ObjectType > create (const std::string &objectName="") const
 
- Public Member Functions inherited from Teuchos::ParameterListAcceptor
virtual ~ParameterListAcceptor ()
 Destructor. More...
 
virtual RCP< const
DependencySheet
getDependencies () const
 Rreturn a const DependencySheet of all the dependencies that should be applied to the ParameterList returned by this->getValidParameters(). More...
 

Private Types

typedef RCP< const
AbstractFactory< ObjectType > > 
object_fcty_t
 

Private Member Functions

void initializeDefaults_ ()
 

Private Attributes

RCP< ParameterListparamList_
 
RCP< const ParameterListvalidParamList_
 
RCP< const
StringToIntegralParameterEntryValidator
< int > > 
objectValidator_
 
std::string object_name_
 
std::string objectType_name_
 
Array< std::string > validObjectNames_
 
Array< object_fcty_tobjectArray_
 
std::string defaultObject_name_
 

Overridden from ParameterListAcceptor

void setParameterList (const RCP< ParameterList > &paramList)
 
RCP< ParameterListgetNonconstParameterList ()
 
RCP< ParameterListunsetParameterList ()
 
RCP< const ParameterListgetParameterList () const
 
RCP< const ParameterListgetValidParameters () const
 

Detailed Description

template<class ObjectType>
class Teuchos::ObjectBuilder< ObjectType >

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:

Author
Todd Coffey tscof.nosp@m.fe@s.nosp@m.andia.nosp@m..gov

Definition at line 89 of file Teuchos_ObjectBuilder.hpp.

Member Typedef Documentation

template<class ObjectType >
typedef RCP<const AbstractFactory<ObjectType > > Teuchos::ObjectBuilder< ObjectType >::object_fcty_t
private

Definition at line 156 of file Teuchos_ObjectBuilder.hpp.

Constructor & Destructor Documentation

template<class ObjectType >
Teuchos::ObjectBuilder< ObjectType >::ObjectBuilder ( )

Definition at line 208 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
Teuchos::ObjectBuilder< ObjectType >::~ObjectBuilder ( )

Definition at line 215 of file Teuchos_ObjectBuilder.hpp.

Member Function Documentation

template<class ObjectType >
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 394 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
void Teuchos::ObjectBuilder< ObjectType >::setObjectTypeName ( const std::string &  objectTypeName)

Set the name of the parameterlist selector, e.g. "Object Type".

Definition at line 405 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
void Teuchos::ObjectBuilder< ObjectType >::setObjectFactory ( const RCP< const AbstractFactory< ObjectType > > &  objectFactory,
const std::string &  objectFactoryName 
)

Set a new Object factory object.

Definition at line 221 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
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 239 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
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 333 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
RCP< ObjectType > Teuchos::ObjectBuilder< ObjectType >::create ( const std::string &  objectName = "") const

Definition at line 350 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
void Teuchos::ObjectBuilder< ObjectType >::setParameterList ( const RCP< ParameterList > &  paramList)
virtual

Implements Teuchos::ParameterListAcceptor.

Definition at line 257 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
RCP< ParameterList > Teuchos::ObjectBuilder< ObjectType >::getNonconstParameterList ( )
virtual

Implements Teuchos::ParameterListAcceptor.

Definition at line 270 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
RCP< ParameterList > Teuchos::ObjectBuilder< ObjectType >::unsetParameterList ( )
virtual

Implements Teuchos::ParameterListAcceptor.

Definition at line 278 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
RCP< const ParameterList > Teuchos::ObjectBuilder< ObjectType >::getParameterList ( ) const
virtual

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 293 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
RCP< const ParameterList > Teuchos::ObjectBuilder< ObjectType >::getValidParameters ( ) const
virtual

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 301 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
void Teuchos::ObjectBuilder< ObjectType >::initializeDefaults_ ( )
private

Definition at line 416 of file Teuchos_ObjectBuilder.hpp.

Member Data Documentation

template<class ObjectType >
RCP<ParameterList> Teuchos::ObjectBuilder< ObjectType >::paramList_
private

Definition at line 161 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
RCP<const ParameterList> Teuchos::ObjectBuilder< ObjectType >::validParamList_
mutableprivate

Definition at line 162 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
RCP<const StringToIntegralParameterEntryValidator<int> > Teuchos::ObjectBuilder< ObjectType >::objectValidator_
mutableprivate

Definition at line 163 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
std::string Teuchos::ObjectBuilder< ObjectType >::object_name_
private

Definition at line 165 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
std::string Teuchos::ObjectBuilder< ObjectType >::objectType_name_
private

Definition at line 166 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
Array<std::string> Teuchos::ObjectBuilder< ObjectType >::validObjectNames_
private

Definition at line 168 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
Array<object_fcty_t> Teuchos::ObjectBuilder< ObjectType >::objectArray_
private

Definition at line 169 of file Teuchos_ObjectBuilder.hpp.

template<class ObjectType >
std::string Teuchos::ObjectBuilder< ObjectType >::defaultObject_name_
private

Definition at line 170 of file Teuchos_ObjectBuilder.hpp.


The documentation for this class was generated from the following file: