VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
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);
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
65 {
66 public:
68 
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 
88 {
89 public:
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 
100 {
101 public:
104 
105  virtual bool execute(makVrv::DtDe&, const QString& command);
106  virtual DtRemoteControlCommand* clone() const;
107 };
108 
109 //Rewinds the current scenario
110 
112 {
113 public:
116 
117  virtual bool execute(makVrv::DtDe&, const QString& command);
118  virtual DtRemoteControlCommand* clone() const;
119 };
120 
121 //Pauses the current scenario
122 
124 {
125 public:
128 
129  virtual bool execute(makVrv::DtDe&, const QString& command);
130  virtual DtRemoteControlCommand* clone() const;
131 };
132 
133 //Plays the current scenario
134 
136 {
137 public:
140 
141  virtual bool execute(makVrv::DtDe&, const QString& command);
142  virtual DtRemoteControlCommand* clone() const;
143 };
144 
145 //Saves the current scenario
146 
148 {
149 public:
152 
153  virtual bool execute(makVrv::DtDe&, const QString& command);
154  virtual DtRemoteControlCommand* clone() const;
155 };

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)