VR-Forces 4.2 Class Documentation
remoteControlCommands.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: remoteControlCommands.h,v $ $Revision: 1.2 $ $State: Exp $
7 ******************************************************************************/
8 //\file remoteControlCommands.h
9 
10 #pragma once
11 
12 #include <vrvUtil/signalslib.h>
13 #include <vlpi/entityType.h>
14 
15 #include <QtCore/QStringList>
16 
17 namespace makVrv
18 {
19  class DtDe;
20 }
21 
22 class QString;
23 class DtEntityIdentifier;
24 
25 //These classes will represent commands that can be executed by using the
26 //DtVrossThreadVrfRemoteControl class.
27 
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);
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
66 {
67 public:
69 
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 DtEntityIdentifier&);
84 };
85 
86 //Loads the specified scenario into the simulation
87 
89 {
90 public:
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 
101 {
102 public:
105 
106  virtual bool execute(makVrv::DtDe&, const QString& command);
107  virtual DtRemoteControlCommand* clone() const;
108 };
109 
110 //Rewinds the current scenario
111 
113 {
114 public:
117 
118  virtual bool execute(makVrv::DtDe&, const QString& command);
119  virtual DtRemoteControlCommand* clone() const;
120 };
121 
122 //Pauses the current scenario
123 
125 {
126 public:
129 
130  virtual bool execute(makVrv::DtDe&, const QString& command);
131  virtual DtRemoteControlCommand* clone() const;
132 };
133 
134 //Plays the current scenario
135 
137 {
138 public:
141 
142  virtual bool execute(makVrv::DtDe&, const QString& command);
143  virtual DtRemoteControlCommand* clone() const;
144 };
145 
146 //Saves the current scenario
147 
149 {
150 public:
153 
154  virtual bool execute(makVrv::DtDe&, const QString& command);
155  virtual DtRemoteControlCommand* clone() const;
156 };

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)