VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvCore
DtVrvCommand.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2012 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvCore/vrvCore.h
>
13
#include <
vrvControl/vrvControlToolkitDataTypes.h
>
14
15
#include <
vrvCore/DtUniqueID.h
>
16
#include <boost/function.hpp>
17
18
namespace
makVrv
19
{
20
class
DtDe;
21
24
class
DT_DLL_VRVCORE
DtVrvCommand
25
{
26
public
:
27
DtVrvCommand
();
28
virtual
~
DtVrvCommand
();
29
30
virtual
vrvControlToolkit::DtVrvControlTypeEnum
commandType();
31
32
virtual
void
execute(
DtDe
& de)=0;
33
34
protected
:
35
vrvControlToolkit::DtVrvControlTypeEnum
myCommandType
;
36
};
37
40
typedef
boost::function<DtUniqueID (const std::string&)>
GlobalIdConvertFunc
;
41
44
class
DT_DLL_VRVCORE
DtVrvCommandCreator
45
{
46
public
:
47
DtVrvCommandCreator
(
GlobalIdConvertFunc
func);
48
virtual
~DtVrvCommandCreator
() {}
49
50
virtual
DtVrvCommand
* create(
vrvControlToolkit::DtVrvControl_v1
* control)=0;
51
52
protected
:
53
GlobalIdConvertFunc
myConvertGlobablIdFunc
;
54
};
55
58
class
DT_DLL_VRVCORE
DtVrvBaseCommandCreatorSeed
59
{
60
public
:
61
DtVrvBaseCommandCreatorSeed
() {}
62
virtual
~DtVrvBaseCommandCreatorSeed
() {}
63
64
virtual
DtVrvCommandCreator
* create(
GlobalIdConvertFunc
func)=0;
65
};
66
69
template
<
class
CommandCreatorType>
70
class
DtVrvCommandCreatorSeed
:
public
DtVrvBaseCommandCreatorSeed
71
{
72
public
:
73
DtVrvCommandCreatorSeed
() {}
74
virtual
~DtVrvCommandCreatorSeed
() {}
75
76
virtual
DtVrvCommandCreator
*
create
(
GlobalIdConvertFunc
func);
77
};
78
79
template
<
class
CommandCreatorType>
80
DtVrvCommandCreator
*
DtVrvCommandCreatorSeed<CommandCreatorType>::create
(
GlobalIdConvertFunc
func)
81
{
82
return
new
CommandCreatorType(func);
83
}
84
85
}
//makVrv::
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)