Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ObjectFactory< ObjectType > Class Template Reference

#include <DLTools.H>

Public Member Functions

 ObjectFactory ()
 
virtual ObjectType * Create ()
 
virtual void Destroy (ObjectType *objptr)
 
virtual void SetCreate (ObjectType *(*increate)())
 
virtual void SetDestroy (void(*indestroy)(ObjectType *))
 
virtual ~ObjectFactory ()
 

Public Attributes

virtual ObjectType *(*)() CreatePtr ()
 
virtual void(*)(ObjectType *) DestroyPtr ()
 

Protected Attributes

ObjectType *(* _create )()
 
void(* _destroy )(ObjectType *)
 

Detailed Description

template<typename ObjectType>
class Sys::ObjectFactory< ObjectType >

Definition at line 17 of file DLTools.H.

Constructor & Destructor Documentation

ObjectFactory ( )
inline

Definition at line 22 of file DLTools.H.

22  : _create(NULL), _destroy(NULL)
23  {};
void(* _destroy)(ObjectType *)
Definition: DLTools.H:20
ObjectType *(* _create)()
Definition: DLTools.H:19
virtual ~ObjectFactory ( )
inlinevirtual

Definition at line 30 of file DLTools.H.

30 {};

Member Function Documentation

virtual ObjectType* Create ( )
inlinevirtual

Definition at line 24 of file DLTools.H.

References ObjectFactory< ObjectType >::_create.

24 {return((*_create)()); };
ObjectType *(* _create)()
Definition: DLTools.H:19
virtual void Destroy ( ObjectType *  objptr)
inlinevirtual

Definition at line 27 of file DLTools.H.

27 {(*_destroy)(objptr); };
virtual void SetCreate ( ObjectType *(*)()  increate)
inlinevirtual

Definition at line 28 of file DLTools.H.

References ObjectFactory< ObjectType >::_create.

28 {_create = increate;};
ObjectType *(* _create)()
Definition: DLTools.H:19
virtual void SetDestroy ( void(*)(ObjectType *)  indestroy)
inlinevirtual

Definition at line 29 of file DLTools.H.

References ObjectFactory< ObjectType >::_destroy.

29 {_destroy = indestroy; };
void(* _destroy)(ObjectType *)
Definition: DLTools.H:20

Member Data Documentation

ObjectType*(* _create)()
protected
void(* _destroy)(ObjectType *)
protected

Definition at line 20 of file DLTools.H.

Referenced by ObjectFactory< ObjectType >::SetDestroy().

virtual ObjectType*(*)() CreatePtr()
inline

Definition at line 25 of file DLTools.H.

25 {return(_create); };
ObjectType *(* _create)()
Definition: DLTools.H:19
virtual void(*)(ObjectType*) DestroyPtr()
inline

Definition at line 26 of file DLTools.H.

26 {return(_destroy); };
void(* _destroy)(ObjectType *)
Definition: DLTools.H:20

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