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 | List of all members
Teuchos::AbstractFactory< T > Class Template Referenceabstract

Simple, universal "Abstract Factory" interface for the dynamic creation of objects. More...

#include <Teuchos_AbstractFactory.hpp>

Inheritance diagram for Teuchos::AbstractFactory< T >:
Inheritance graph
[legend]

Public Member Functions

virtual ~AbstractFactory ()
 
virtual obj_ptr_t create () const =0
 Create an object of type T returned as a smart reference counting pointer object. More...
 

Detailed Description

template<class T>
class Teuchos::AbstractFactory< T >

Simple, universal "Abstract Factory" interface for the dynamic creation of objects.

While RCP provides for specialized deallocation policies it does not abstract, in any way, how an object is first allocated. The most general way to abstract how an object is allocated is to use an "Abstract Factory". This base class defines the most basic "Abstract Factory" interface and defines only one virtual function, create() that returns a RCP-wrapped object.

Definition at line 29 of file Teuchos_AbstractFactory.hpp.

Constructor & Destructor Documentation

template<class T>
virtual Teuchos::AbstractFactory< T >::~AbstractFactory ( )
inlinevirtual

Definition at line 38 of file Teuchos_AbstractFactory.hpp.

Member Function Documentation

template<class T>
virtual obj_ptr_t Teuchos::AbstractFactory< T >::create ( ) const
pure virtual

Create an object of type T returned as a smart reference counting pointer object.

Implemented in Teuchos::AbstractFactoryStd< T_itfc, T_impl, T_PostMod, T_Allocator >.


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