VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg > Class Template Reference

This template is similar to DtFactoryTemplate, but allows one argument to be passed to the creator function of the objects being created. More...

Inheritance diagram for DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >:
Inheritance graph
[legend]

Classes

struct  DtSingleArgFactoryTemplateEntry

Public Types

typedef T_CreationObject *(* DtCreatorFcn )(T_Arg)
typedef std::map< T_Key,
DtSingleArgFactoryTemplateEntry
DtCreatorMapType

Public Member Functions

 DtSingleArgFactoryTemplate ()
 constructor
virtual ~DtSingleArgFactoryTemplate ()
 Destructor: deletes factory and any entries on the factory.
virtual void addCreatorFcn (const T_Key &key, DtCreatorFcn fcn)
 Add a creator function to the factory.
virtual bool removeCreatorFcn (const T_Key &key)
 Remove a creator function with the given key.
virtual bool isKeyRegistered (const T_Key &key) const
virtual DtString creationObjectName () const
virtual const DtCreatorMapTypecreatorMap () const
virtual T_CreationObject * createNew (const T_Key &key, T_Arg arg) const
 Create and return a new instance of the type based on the creator functions and the type specified.

Static Public Member Functions

static
DtSingleArgFactoryTemplate
< T_CreationObject, T_Key,
T_Arg > * 
create ()

Protected Attributes

DtCreatorMapType myCreatorMap

Private Member Functions

 DtSingleArgFactoryTemplate (const DtSingleArgFactoryTemplate &orig)
 Not implemented.
const DtSingleArgFactoryTemplateoperator= (const DtSingleArgFactoryTemplate &orig)
 Not implemented.

Detailed Description

template<typename T_CreationObject, typename T_Key, typename T_Arg>
class DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >

This template is similar to DtFactoryTemplate, but allows one argument to be passed to the creator function of the objects being created.

Member Typedef Documentation

template<typename T_CreationObject, typename T_Key, typename T_Arg>
typedef T_CreationObject*(* DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::DtCreatorFcn)(T_Arg)
template<typename T_CreationObject, typename T_Key, typename T_Arg>
typedef std::map<T_Key, DtSingleArgFactoryTemplateEntry> DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::DtCreatorMapType

Constructor & Destructor Documentation

template<typename T_CreationObject, typename T_Key, typename T_Arg>
DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::DtSingleArgFactoryTemplate ( )

constructor

template<typename T_CreationObject, typename T_Key, typename T_Arg>
DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::DtSingleArgFactoryTemplate ( const DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg > &  orig)
private

Not implemented.

template<typename T_CreationObject, typename T_Key, typename T_Arg>
virtual DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::~DtSingleArgFactoryTemplate ( )
virtual

Destructor: deletes factory and any entries on the factory.

Member Function Documentation

template<typename T_CreationObject, typename T_Key, typename T_Arg>
const DtSingleArgFactoryTemplate& DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::operator= ( const DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg > &  orig)
private

Not implemented.

template<typename T_CreationObject, typename T_Key, typename T_Arg>
virtual void DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::addCreatorFcn ( const T_Key &  key,
DtCreatorFcn  fcn 
)
virtual

Add a creator function to the factory.

template<typename T_CreationObject, typename T_Key, typename T_Arg>
virtual bool DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::removeCreatorFcn ( const T_Key &  key)
virtual

Remove a creator function with the given key.

Return true if the key is found

template<typename T_CreationObject, typename T_Key, typename T_Arg>
virtual T_CreationObject* DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::createNew ( const T_Key &  key,
T_Arg  arg 
) const
virtual

Create and return a new instance of the type based on the creator functions and the type specified.

Prints a warning if not found. See creationTypeName().

template<typename T_CreationObject, typename T_Key, typename T_Arg>
virtual bool DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::isKeyRegistered ( const T_Key &  key) const
virtual
template<typename T_CreationObject, typename T_Key, typename T_Arg>
static DtSingleArgFactoryTemplate<T_CreationObject, T_Key, T_Arg>* DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::create ( )
static

Reimplemented in DtVrfObjectNavInterfaceFactory.

template<typename T_CreationObject, typename T_Key, typename T_Arg>
virtual DtString DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::creationObjectName ( ) const
virtual
Returns
The name of the creation object that will be printed in any errors. Errors are printed when a creation call is made and no creator is found. Default implementation returns "data".
template<typename T_CreationObject, typename T_Key, typename T_Arg>
virtual const DtCreatorMapType& DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::creatorMap ( ) const
virtual

Member Data Documentation

template<typename T_CreationObject, typename T_Key, typename T_Arg>
DtCreatorMapType DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::myCreatorMap
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)