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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)