VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvVrl
DtVrvControlFactory_v0.h
Go to the documentation of this file.
1
2
/*******************************************************************************
3
** Copyright (c) 2010 MAK Technologies, Inc.
4
** All rights reserved.
5
*******************************************************************************/
6
9
10
#pragma once
11
12
#include <
vrvVrl/vrvControlToolkitDataTypes_v0.h
>
13
14
#include <map>
15
16
namespace
vrvControlToolkit
17
{
18
19
class
DtVctBaseControlCreator_v0
20
{
21
public
:
22
DtVctBaseControlCreator_v0
() {}
23
virtual
~DtVctBaseControlCreator_v0
() {}
24
25
virtual
DtVrvControl_v0
*
create
()=0;
26
};
27
28
template
<
class
ControlType>
29
class
DtVctControlCreator_v0
:
public
DtVctBaseControlCreator_v0
30
{
31
public
:
32
DtVctControlCreator_v0
() {}
33
virtual
~DtVctControlCreator_v0
() {}
34
35
virtual
DtVrvControl_v0
*
create
();
36
};
37
38
template
<
class
ControlType>
39
DtVrvControl_v0
*
DtVctControlCreator_v0<ControlType>::create
()
40
{
41
return
new
ControlType();
42
}
43
44
class
DtVrvControlFactory_v0
45
{
46
public
:
47
static
DtVrvControlFactory_v0
&
instance
();
48
49
DtVrvControl_v0
*
create
(
const
char
* buffer,
int
size
);
50
51
typedef
std::pair<DtVrvControlTypeEnum_v0, int>
TypeVersionPair
;
52
virtual
void
addCreator
(
const
TypeVersionPair
& type,
DtVctBaseControlCreator_v0
* creator);
53
54
protected
:
55
virtual
void
initialize
();
56
57
DtVrvControlFactory_v0
();
58
virtual
~DtVrvControlFactory_v0
();
59
60
static
DtVrvControlFactory_v0
*
theControlFactory
;
61
62
typedef
std::map<TypeVersionPair, DtVctBaseControlCreator_v0*>
ControlCreatorMap
;
63
ControlCreatorMap
myCreatorMap
;
64
};
65
66
}
//vrvControlToolkit::
67
68
#include <vrvVrl/DtVrvControlFactory_v0.inl>
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)