![]() |
VR-Forces 5.0.1 Developer's Guide
|
This template is similar to DtFactoryTemplate, but allows one argument to be passed to the creator function of the objects being created.

Classes | |
| struct | DtSingleArgFactoryTemplateEntry |
Public Types | |
| typedef T_CreationObject *(* | DtCreatorFcn )(T_Arg) |
| typedef std::map< T_Key, DtSingleArgFactoryTemplateEntry > | DtCreatorMapType |
Public Member Functions | |
| DtSingleArgFactoryTemplate () | |
| virtual | ~DtSingleArgFactoryTemplate () |
| virtual void | addCreatorFcn (const T_Key &key, DtCreatorFcn fcn) |
| virtual bool | removeCreatorFcn (const T_Key &key) |
| virtual bool | isKeyRegistered (const T_Key &key) const |
| virtual DtString | creationObjectName () const |
| virtual const DtCreatorMapType & | creatorMap () const |
| virtual void | setAlwaysWarnOnlyOnce (bool) |
| bool | alwaysWarnOnlyOnce () const |
| virtual T_CreationObject * | createNew (const T_Key &key, T_Arg arg) const |
Static Public Member Functions | |
| static DtSingleArgFactoryTemplate < T_CreationObject, T_Key, T_Arg > * | create () |
Protected Attributes | |
| DtCreatorMapType | myCreatorMap |
| bool | myAlwaysWarnOnlyOnce |
| std::map< T_Key, bool > | myMessageWarningFilters |
Private Member Functions | |
| DtSingleArgFactoryTemplate (const DtSingleArgFactoryTemplate &orig) | |
| const DtSingleArgFactoryTemplate & | operator= (const DtSingleArgFactoryTemplate &orig) |
| typedef T_CreationObject*(* DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::DtCreatorFcn)(T_Arg) |
| typedef std::map<T_Key, DtSingleArgFactoryTemplateEntry> DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::DtCreatorMapType |
| DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::DtSingleArgFactoryTemplate | ( | ) |
constructor
|
private |
Not implemented.
|
virtual |
Destructor: deletes factory and any entries on the factory.
|
private |
Not implemented.
|
virtual |
Add a creator function to the factory.
|
virtual |
Remove a creator function with the given key. Return true if the key is found.
|
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().
|
virtual |
|
static |
|
virtual |
|
virtual |
|
virtual |
Whether or not to always warn only once, even if not registered. Default is true.
| bool DtSingleArgFactoryTemplate< T_CreationObject, T_Key, T_Arg >::alwaysWarnOnlyOnce | ( | ) | const |
|
protected |
|
protected |
|
mutableprotected |