VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
examples
guiThreadVrfRemoteController
remoteControlCommands.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2012 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: remoteControlCommands.h,v $ $Revision: 1.2 $ $State: Exp $
7
******************************************************************************/
8
//\file remoteControlCommands.h
9
10
#pragma once
11
12
#include <
vrvUtil/signalslib.h
>
13
#include <vlpi/entityType.h>
14
15
#include <QtCore/QStringList>
16
17
namespace
makVrv
18
{
19
class
DtDe;
20
}
21
22
class
QString;
23
class
DtEntityIdentifier;
24
25
//These classes will represent commands that can be executed by using the
26
//DtVrossThreadVrfRemoteControl class.
27
28
class
DtRemoteControlCommand
29
{
30
public
:
31
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
) = 0;
32
virtual
DtRemoteControlCommand
*
clone
()
const
= 0;
33
34
QString
help
()
const
35
{
36
return
myHelp
;
37
}
38
39
QString
command
()
const
40
{
41
return
myCommand
;
42
}
43
44
boost::signal<void (const QString&, DtRemoteControlCommand*)>
signal_commandComplete
;
45
46
protected
:
47
//Parse out the string. All tokens are separated by spaces or enclosed in quotes or
48
//parens
49
virtual
QStringList
tokenize
(
const
QString&,
char
delim =
' '
)
const
;
50
51
//Parses a point of the form x,y,z
52
bool
parsePoint
(
const
QString&,
DtVector
&)
const
;
53
54
protected
:
55
DtRemoteControlCommand
(
const
QString& command,
const
QString&
help
);
56
DtRemoteControlCommand
(
const
DtRemoteControlCommand
&);
57
58
protected
:
59
QString
myCommand
;
60
QString
myHelp
;
61
};
62
63
//This command will create a single point object (entity, waypoint, aggregate) and will notify the user
64
//when the command has been completed
65
class
DtRemoteControlCreateCommand
:
public
DtRemoteControlCommand
66
{
67
public
:
68
DtRemoteControlCreateCommand
();
69
70
virtual
~DtRemoteControlCreateCommand
();
71
72
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
73
virtual
DtRemoteControlCommand
*
clone
()
const
;
74
75
//Convert string to entity type either by name or by actual type
76
DtEntityType
entityToCreate
(
const
QString& c,
makVrv::DtDe
& de)
const
;
77
78
//Returns the currently selected simulation address
79
DtSimulationAddress
simulationAddress
(
makVrv::DtDe
&)
const
;
80
81
protected
:
82
//Called when the object is created, will signal complete with the name and the object id
83
void
objectCreated
(
DtString
,
const
DtEntityIdentifier&);
84
};
85
86
//Loads the specified scenario into the simulation
87
88
class
DtRemoteControlLoadScenarioCommand
:
public
DtRemoteControlCommand
89
{
90
public
:
91
DtRemoteControlLoadScenarioCommand
();
92
virtual
~DtRemoteControlLoadScenarioCommand
();
93
94
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
95
virtual
DtRemoteControlCommand
*
clone
()
const
;
96
};
97
98
//Loads a new scenario into the system
99
100
class
DtRemoteControlNewScenarioCommand
:
public
DtRemoteControlCommand
101
{
102
public
:
103
DtRemoteControlNewScenarioCommand
();
104
virtual
~DtRemoteControlNewScenarioCommand
();
105
106
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
107
virtual
DtRemoteControlCommand
*
clone
()
const
;
108
};
109
110
//Rewinds the current scenario
111
112
class
DtRemoteControlRewindScenarioCommand
:
public
DtRemoteControlCommand
113
{
114
public
:
115
DtRemoteControlRewindScenarioCommand
();
116
virtual
~DtRemoteControlRewindScenarioCommand
();
117
118
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
119
virtual
DtRemoteControlCommand
*
clone
()
const
;
120
};
121
122
//Pauses the current scenario
123
124
class
DtRemoteControlPauseScenarioCommand
:
public
DtRemoteControlCommand
125
{
126
public
:
127
DtRemoteControlPauseScenarioCommand
();
128
virtual
~DtRemoteControlPauseScenarioCommand
();
129
130
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
131
virtual
DtRemoteControlCommand
*
clone
()
const
;
132
};
133
134
//Plays the current scenario
135
136
class
DtRemoteControlPlayScenarioCommand
:
public
DtRemoteControlCommand
137
{
138
public
:
139
DtRemoteControlPlayScenarioCommand
();
140
virtual
~DtRemoteControlPlayScenarioCommand
();
141
142
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
143
virtual
DtRemoteControlCommand
*
clone
()
const
;
144
};
145
146
//Saves the current scenario
147
148
class
DtRemoteControlSaveScenarioCommand
:
public
DtRemoteControlCommand
149
{
150
public
:
151
DtRemoteControlSaveScenarioCommand
();
152
virtual
~DtRemoteControlSaveScenarioCommand
();
153
154
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
155
virtual
DtRemoteControlCommand
*
clone
()
const
;
156
};
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
)