VR-Forces 4.5 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
examples
guiThreadVrfRemoteController
remoteControlCommands.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2015 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
//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 Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)