VR-Forces 4.7 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
examples
guiThreadVrfRemoteController
remoteControlCommands.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2018 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
6
//\file remoteControlCommands.h
7
8
#pragma once
9
10
#include <
vrvUtil/signalslib.h
>
11
#include <vlpi/entityType.h>
12
13
#include <QtCore/QStringList>
14
15
namespace
makVrv
16
{
17
class
DtDe;
18
}
19
20
class
QString;
21
class
DtEntityIdentifier;
22
class
DtObjectType
;
23
class
DtUUID
;
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
DtUUID
&,
const
DtEntityIdentifier&,
const
DtObjectType
&);
84
};
85
86
//Closes the current scenario
87
88
class
DtRemoteControlCloseScenarioCommand
:
public
DtRemoteControlCommand
89
{
90
public
:
91
DtRemoteControlCloseScenarioCommand
();
92
virtual
~DtRemoteControlCloseScenarioCommand
();
93
94
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
95
virtual
DtRemoteControlCommand
*
clone
()
const
;
96
};
97
98
//Loads the specified scenario into the simulation
99
100
class
DtRemoteControlLoadScenarioCommand
:
public
DtRemoteControlCommand
101
{
102
public
:
103
DtRemoteControlLoadScenarioCommand
();
104
virtual
~DtRemoteControlLoadScenarioCommand
();
105
106
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
107
virtual
DtRemoteControlCommand
*
clone
()
const
;
108
};
109
110
//Loads a new scenario into the system
111
112
class
DtRemoteControlNewScenarioCommand
:
public
DtRemoteControlCommand
113
{
114
public
:
115
DtRemoteControlNewScenarioCommand
();
116
virtual
~DtRemoteControlNewScenarioCommand
();
117
118
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
119
virtual
DtRemoteControlCommand
*
clone
()
const
;
120
};
121
122
//Rewinds the current scenario
123
124
class
DtRemoteControlRewindScenarioCommand
:
public
DtRemoteControlCommand
125
{
126
public
:
127
DtRemoteControlRewindScenarioCommand
();
128
virtual
~DtRemoteControlRewindScenarioCommand
();
129
130
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
131
virtual
DtRemoteControlCommand
*
clone
()
const
;
132
};
133
134
//Pauses the current scenario
135
136
class
DtRemoteControlPauseScenarioCommand
:
public
DtRemoteControlCommand
137
{
138
public
:
139
DtRemoteControlPauseScenarioCommand
();
140
virtual
~DtRemoteControlPauseScenarioCommand
();
141
142
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
143
virtual
DtRemoteControlCommand
*
clone
()
const
;
144
};
145
146
//Plays the current scenario
147
148
class
DtRemoteControlPlayScenarioCommand
:
public
DtRemoteControlCommand
149
{
150
public
:
151
DtRemoteControlPlayScenarioCommand
();
152
virtual
~DtRemoteControlPlayScenarioCommand
();
153
154
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
155
virtual
DtRemoteControlCommand
*
clone
()
const
;
156
};
157
158
//Saves the current scenario
159
160
class
DtRemoteControlSaveScenarioCommand
:
public
DtRemoteControlCommand
161
{
162
public
:
163
DtRemoteControlSaveScenarioCommand
();
164
virtual
~DtRemoteControlSaveScenarioCommand
();
165
166
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
167
virtual
DtRemoteControlCommand
*
clone
()
const
;
168
};
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)