NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
NOX::Direction::UserDefinedFactoryT< T > Class Template Reference

Concrete instantiation of a NOX::Direction::UserDefinedFactory object that uses the base objects only for constuction. More...

#include <NOX_Direction_UserDefinedFactoryT.H>

Inheritance diagram for NOX::Direction::UserDefinedFactoryT< T >:
Inheritance graph
[legend]
Collaboration diagram for NOX::Direction::UserDefinedFactoryT< T >:
Collaboration graph
[legend]

Public Member Functions

 UserDefinedFactoryT ()
 Constructor.
 
 ~UserDefinedFactoryT ()
 Destructor.
 
Teuchos::RCP
< NOX::Direction::Generic
buildDirection (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &params) const
 Builds a user defined direction object. More...
 
- Public Member Functions inherited from NOX::Direction::UserDefinedFactory
 UserDefinedFactory ()
 Constructor.
 
virtual ~UserDefinedFactory ()
 Destructor.
 

Detailed Description

template<typename T>
class NOX::Direction::UserDefinedFactoryT< T >

Concrete instantiation of a NOX::Direction::UserDefinedFactory object that uses the base objects only for constuction.

If the user writes their own direction and that object has the same constructor arguments as the nox directions (the gd and params as in the buildDirection method), then users can use this object instead of having to write their own factory.

For example, if a user writes their own direction object:

class MyDirection : public NOX::Direction::Generic {
// Ctor that takes the standard direction arguments.
MyDirection(const Teuchos::RCP<NOX::GlobalData>& gd,
.
.
.
};

They can build that object using this factory and do not have to write their own factory

ParameterList dl& = nox_params.sublist("Direction");
RCP<NOX::Direction::UserDefinedFactory> uddf =
dl.set("User Defined Direction Factory", uddf);

It is critical that the user defined factory be set in the parameter list as a base class type object: NOX::Direction::UserDefinedFactory.

Member Function Documentation

template<typename T >
Teuchos::RCP<NOX::Direction::Generic> NOX::Direction::UserDefinedFactoryT< T >::buildDirection ( const Teuchos::RCP< NOX::GlobalData > &  gd,
Teuchos::ParameterList params 
) const
inlinevirtual

Builds a user defined direction object.

Parameters
gdA global data pointer that contains the top level parameter list. Without storing this inside the direction object, there is no guarantee that the second parameter params will still exist. It can be deleted by the top level RCP.
paramsSublist with direction construction parameters.

Implements NOX::Direction::UserDefinedFactory.

References rcp().


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