VR-Forces 4.3.1 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) 2014 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
24
//These classes will represent commands that can be executed by using the
25
//DtVrossThreadVrfRemoteControl class.
26
27
class
DtRemoteControlCommand
28
{
29
public
:
30
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
) = 0;
31
virtual
DtRemoteControlCommand
*
clone
()
const
= 0;
32
33
QString
help
()
const
34
{
35
return
myHelp
;
36
}
37
38
QString
command
()
const
39
{
40
return
myCommand
;
41
}
42
43
boost::signal<void (const QString&, DtRemoteControlCommand*)>
signal_commandComplete
;
44
45
protected
:
46
//Parse out the string. All tokens are separated by spaces or enclosed in quotes or
47
//parens
48
virtual
QStringList
tokenize
(
const
QString&,
char
delim =
' '
)
const
;
49
50
//Parses a point of the form x,y,z
51
bool
parsePoint
(
const
QString&,
DtVector
&)
const
;
52
53
protected
:
54
DtRemoteControlCommand
(
const
QString& command,
const
QString&
help
);
55
DtRemoteControlCommand
(
const
DtRemoteControlCommand
&);
56
57
protected
:
58
QString
myCommand
;
59
QString
myHelp
;
60
};
61
62
//This command will create a single point object (entity, waypoint, aggregate) and will notify the user
63
//when the command has been completed
64
class
DtRemoteControlCreateCommand
:
public
DtRemoteControlCommand
65
{
66
public
:
67
DtRemoteControlCreateCommand
();
68
69
virtual
~DtRemoteControlCreateCommand
();
70
71
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
72
virtual
DtRemoteControlCommand
*
clone
()
const
;
73
74
//Convert string to entity type either by name or by actual type
75
DtEntityType
entityToCreate
(
const
QString& c,
makVrv::DtDe
& de)
const
;
76
77
//Returns the currently selected simulation address
78
DtSimulationAddress
simulationAddress
(
makVrv::DtDe
&)
const
;
79
80
protected
:
81
//Called when the object is created, will signal complete with the name and the object id
82
void
objectCreated
(
DtString
,
const
DtEntityIdentifier&,
const
DtObjectType&);
83
};
84
85
//Loads the specified scenario into the simulation
86
87
class
DtRemoteControlLoadScenarioCommand
:
public
DtRemoteControlCommand
88
{
89
public
:
90
DtRemoteControlLoadScenarioCommand
();
91
virtual
~DtRemoteControlLoadScenarioCommand
();
92
93
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
94
virtual
DtRemoteControlCommand
*
clone
()
const
;
95
};
96
97
//Loads a new scenario into the system
98
99
class
DtRemoteControlNewScenarioCommand
:
public
DtRemoteControlCommand
100
{
101
public
:
102
DtRemoteControlNewScenarioCommand
();
103
virtual
~DtRemoteControlNewScenarioCommand
();
104
105
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
106
virtual
DtRemoteControlCommand
*
clone
()
const
;
107
};
108
109
//Rewinds the current scenario
110
111
class
DtRemoteControlRewindScenarioCommand
:
public
DtRemoteControlCommand
112
{
113
public
:
114
DtRemoteControlRewindScenarioCommand
();
115
virtual
~DtRemoteControlRewindScenarioCommand
();
116
117
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
118
virtual
DtRemoteControlCommand
*
clone
()
const
;
119
};
120
121
//Pauses the current scenario
122
123
class
DtRemoteControlPauseScenarioCommand
:
public
DtRemoteControlCommand
124
{
125
public
:
126
DtRemoteControlPauseScenarioCommand
();
127
virtual
~DtRemoteControlPauseScenarioCommand
();
128
129
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
130
virtual
DtRemoteControlCommand
*
clone
()
const
;
131
};
132
133
//Plays the current scenario
134
135
class
DtRemoteControlPlayScenarioCommand
:
public
DtRemoteControlCommand
136
{
137
public
:
138
DtRemoteControlPlayScenarioCommand
();
139
virtual
~DtRemoteControlPlayScenarioCommand
();
140
141
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
142
virtual
DtRemoteControlCommand
*
clone
()
const
;
143
};
144
145
//Saves the current scenario
146
147
class
DtRemoteControlSaveScenarioCommand
:
public
DtRemoteControlCommand
148
{
149
public
:
150
DtRemoteControlSaveScenarioCommand
();
151
virtual
~DtRemoteControlSaveScenarioCommand
();
152
153
virtual
bool
execute
(
makVrv::DtDe
&,
const
QString&
command
);
154
virtual
DtRemoteControlCommand
*
clone
()
const
;
155
};
Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)