Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
Teuchos::Foo Class Reference
Inheritance diagram for Teuchos::Foo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Foo ()
virtual ~Foo ()
virtual std::string getString () const =0
virtual void setDefaults ()=0
void setParameterList (const RCP< ParameterList > &paramList)
 Set parameters from a parameter list and return with default values.
RCP< ParameterListgetNonconstParameterList ()
 Get a nonconst version of the parameter list that was set using setParameterList().
RCP< ParameterListunsetParameterList ()
 Unset the parameter list that was set using setParameterList().
RCP< const ParameterListgetParameterList () const
 Get const version of the parameter list that was set using setParameterList().

Private Attributes

RCP< ParameterListparamList_

Detailed Description

Definition at line 52 of file ObjectBuilder_UnitTests.cpp.


Constructor & Destructor Documentation

Teuchos::Foo::Foo ( ) [inline]

Definition at line 54 of file ObjectBuilder_UnitTests.cpp.

virtual Teuchos::Foo::~Foo ( ) [inline, virtual]

Definition at line 55 of file ObjectBuilder_UnitTests.cpp.


Member Function Documentation

virtual std::string Teuchos::Foo::getString ( ) const [pure virtual]

Implemented in Teuchos::FooC, Teuchos::FooB, and Teuchos::FooA.

virtual void Teuchos::Foo::setDefaults ( ) [pure virtual]

Implemented in Teuchos::FooC, Teuchos::FooB, and Teuchos::FooA.

void Teuchos::Foo::setParameterList ( const RCP< ParameterList > &  paramList) [inline, virtual]

Set parameters from a parameter list and return with default values.

Parameters:
paramList[in/out] On input: contains the parameters set by the client. On output: the same list, possibly filled with default values, depending on the implementation.

Implementations of this method generally read parameters out of paramList, and use them to modify the state or behavior of this object. Implementations may validate input parameters, and throw an exception or set an error state if any of them are invalid. "Validation

Precondition:
! paramList.is_null ()
Postcondition:
this->getParameterList().get() == paramList.get()

This object "remembers" paramList until it is "unset" using unsetParameterList(). When the input ParameterList is passed in, we assume that the client has finished setting parameters in the ParameterList. If the client changes paramList after calling this method, this object's behavior is undefined. This is because the object may read the options from paramList at any time. It may either do so in this method, or it may wait to read them at some later time. Users should not expect that if they change a parameter, that this object will automatically recognize the change. To change even one parameter, this method must be called again.

Implements Teuchos::ParameterListAcceptor.

Definition at line 58 of file ObjectBuilder_UnitTests.cpp.

Get a nonconst version of the parameter list that was set using setParameterList().

The returned ParameterList should be the same object (pointer equality) as the object given to setParameterList(). If setParameterList() has not yet been called on this object, the returned RCP may be null, but need not necessarily be. If unsetParameterList()

Implements Teuchos::ParameterListAcceptor.

Definition at line 65 of file ObjectBuilder_UnitTests.cpp.

Unset the parameter list that was set using setParameterList().

This does not undo the effect of setting the parameters via a call to setParameterList(). It merely "forgets" the RCP, so that getParameterList() and getNonconstParameterList() both return null.

Postcondition:
this->getParameter().is_null ()
this->getNonconstParameter().is_null ()

Implements Teuchos::ParameterListAcceptor.

Definition at line 68 of file ObjectBuilder_UnitTests.cpp.

RCP<const ParameterList> Teuchos::Foo::getParameterList ( ) const [inline, virtual]

Get const version of the parameter list that was set using setParameterList().

The default implementation returns:

   return const_cast<ParameterListAcceptor*>(this)->getParameterList();

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 73 of file ObjectBuilder_UnitTests.cpp.


Member Data Documentation

Definition at line 77 of file ObjectBuilder_UnitTests.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines