VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #include <boost/signals2.hpp>
15 
16 namespace makVrv
17 {
18  class DtDe;
19 }
20 
21 class QString;
22 class DtEntityIdentifier;
23 class DtObjectType;
24 class DtUUID;
25 
26 //These classes will represent commands that can be executed by using the
27 //DtVrossThreadVrfRemoteControl class.
28 
30 {
31 public:
32  virtual bool execute(makVrv::DtDe&, const QString& command) = 0;
33  virtual DtRemoteControlCommand* clone() const = 0;
34 
35  QString help() const
36  {
37  return myHelp;
38  }
39 
40  QString command() const
41  {
42  return myCommand;
43  }
44 
45  boost::signals2::signal<void (const QString&, DtRemoteControlCommand*)> signal_commandComplete;
46 
47 protected:
48  //Parse out the string. All tokens are separated by spaces or enclosed in quotes or
49  //parens
50  virtual QStringList tokenize(const QString&, char delim = ' ') const;
51 
52  //Parses a point of the form x,y,z
53  bool parsePoint(const QString&, DtVector&) const;
54 
55 protected:
56  DtRemoteControlCommand(const QString& command, const QString& help);
58 
59 protected:
60  QString myCommand;
61  QString myHelp;
62 };
63 
64 //This command will create a single point object (entity, waypoint, aggregate) and will notify the user
65 //when the command has been completed
67 {
68 public:
70 
72 
73  virtual bool execute(makVrv::DtDe&, const QString& command);
74  virtual DtRemoteControlCommand* clone() const;
75 
76  //Convert string to entity type either by name or by actual type
77  DtEntityType entityToCreate(const QString& c, makVrv::DtDe& de) const;
78 
79  //Returns the currently selected simulation address
80  DtSimulationAddress simulationAddress(makVrv::DtDe&) const;
81 
82 protected:
83  //Called when the object is created, will signal complete with the name and the object id
84  void objectCreated(DtString, const DtUUID&, const DtEntityIdentifier&, const DtObjectType&);
85 };
86 
87 //Closes the current scenario
88 
90 {
91 public:
94 
95  virtual bool execute(makVrv::DtDe&, const QString& command);
96  virtual DtRemoteControlCommand* clone() const;
97 };
98 
99 //Loads the specified scenario into the simulation
100 
102 {
103 public:
106 
107  virtual bool execute(makVrv::DtDe&, const QString& command);
108  virtual DtRemoteControlCommand* clone() const;
109 };
110 
111 //Loads a new scenario into the system
112 
114 {
115 public:
118 
119  virtual bool execute(makVrv::DtDe&, const QString& command);
120  virtual DtRemoteControlCommand* clone() const;
121 };
122 
123 //Rewinds the current scenario
124 
126 {
127 public:
130 
131  virtual bool execute(makVrv::DtDe&, const QString& command);
132  virtual DtRemoteControlCommand* clone() const;
133 };
134 
135 //Pauses the current scenario
136 
138 {
139 public:
142 
143  virtual bool execute(makVrv::DtDe&, const QString& command);
144  virtual DtRemoteControlCommand* clone() const;
145 };
146 
147 //Plays the current scenario
148 
150 {
151 public:
154 
155  virtual bool execute(makVrv::DtDe&, const QString& command);
156  virtual DtRemoteControlCommand* clone() const;
157 };
158 
159 //Saves the current scenario
160 
162 {
163 public:
166 
167  virtual bool execute(makVrv::DtDe&, const QString& command);
168  virtual DtRemoteControlCommand* clone() const;
169 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
boost::signals2::signal< void(const QString &, DtRemoteControlCommand *)> signal_commandComplete
Definition: remoteControlCommands.h:45
DtRemoteControlCommand(const QString &command, const QString &help)
Definition: remoteControlCommands.h:149
QString myHelp
Definition: remoteControlCommands.h:61
virtual bool execute(makVrv::DtDe &, const QString &command)
Definition: remoteControlCommands.h:29
bool parsePoint(const QString &, DtVector &) const
virtual bool execute(makVrv::DtDe &, const QString &command)
QString myCommand
Definition: remoteControlCommands.h:60
DtSimulationAddress simulationAddress(makVrv::DtDe &) const
virtual bool execute(makVrv::DtDe &, const QString &command)=0
virtual DtRemoteControlCommand * clone() const
virtual DtRemoteControlCommand * clone() const
Definition: remoteControlCommands.h:101
Definition: objectType.h:27
virtual bool execute(makVrv::DtDe &, const QString &command)
virtual DtRemoteControlCommand * clone() const
virtual bool execute(makVrv::DtDe &, const QString &command)
virtual bool execute(makVrv::DtDe &, const QString &command)
virtual DtRemoteControlCommand * clone() const
virtual DtRemoteControlCommand * clone() const
virtual DtRemoteControlCommand * clone() const
virtual DtRemoteControlCommand * clone() const
virtual bool execute(makVrv::DtDe &, const QString &command)
virtual DtRemoteControlCommand * clone() const =0
virtual QStringList tokenize(const QString &, char delim= ' ') const
void objectCreated(DtString, const DtUUID &, const DtEntityIdentifier &, const DtObjectType &)
virtual DtRemoteControlCommand * clone() const
QString help() const
Definition: remoteControlCommands.h:35
QString command() const
Definition: remoteControlCommands.h:40
virtual bool execute(makVrv::DtDe &, const QString &command)
Definition: remoteControlCommands.h:66
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
Definition: remoteControlCommands.h:89
Definition: remoteControlCommands.h:113
Definition: remoteControlCommands.h:137
Definition: remoteControlCommands.h:161
Definition: remoteControlCommands.h:125
DtEntityType entityToCreate(const QString &c, makVrv::DtDe &de) const
virtual bool execute(makVrv::DtDe &, const QString &command)

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)