VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
moveAlongTasks.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 
10 #pragma once
11 
12 #include "vrftasks/simTask.h"
13 #include <readerWriter/rwString.h>
14 #include <readerWriter/rwInt.h>
15 #include <readerWriter/rwBoolean.h>
16 #include <vlutil/vlNetTypes.h>
17 #include "vrfutil/iteratorBase.h"
18 #include "vrfutil/rwUUID.h"
20 
47 {
48 
49 public:
50 
53 
56  DtMoveAlongTask(const DtString & writeName,
57  DtReaderWriterRegistry * parentRegistry = 0);
58 
60  DtMoveAlongTask(const DtString & writeName, const DtMoveAlongTask & orig,
61  DtReaderWriterRegistry * parentRegistry = 0);
62 
64  const DtMoveAlongTask & operator=(const DtMoveAlongTask & orig);
65 
66  virtual ~DtMoveAlongTask();
67 
69  virtual const DtSimTaskMessageType& type() const;
70 
72  virtual DtSimTask * clone(const DtString & name, DtReaderWriterRegistry *
73  parentRegistry = 0) const;
74 
76  virtual DtString stringRep() const;
77 
80  virtual const DtUUID& route() const;
81 
83  virtual void setRoute(const DtUUID&);
84 
87 
88  virtual void setTraversalDirection(DtIteratorDirection traversalDirection);
89  virtual DtIteratorDirection traversalDirection() const;
91 
96 
97  virtual void setStartAtClosestPoint(bool startAtClosestPoint);
98  virtual bool startAtClosestPoint() const;
100 
104 
105  virtual void setSpeed(double v);
106  virtual double speed() const;
107  virtual bool isSpeedSpecified() const;
109 
112  virtual int netRepSize() const;
113 
115  virtual bool setFromNet(const char* contentBuffer,
116  unsigned contentSize);
117 
120  virtual bool setToNet();
121 
122  static DtSimTask * creator();
123 
124 protected:
125 
130 };
131 
136 {
137 
138 public:
139 
142 
145  DtMoveAlongRetrogradeTask(const DtString & writeName,
146  DtReaderWriterRegistry * parentRegistry = 0);
147 
149  DtMoveAlongRetrogradeTask(const DtString & writeName, const DtMoveAlongRetrogradeTask & orig,
150  DtReaderWriterRegistry * parentRegistry = 0);
151 
152  virtual ~DtMoveAlongRetrogradeTask();
153 
155  virtual const DtSimTaskMessageType& type() const;
156 
158  virtual DtSimTask * clone(const DtString & name, DtReaderWriterRegistry *
159  parentRegistry = 0) const;
160 
162  virtual DtString stringRep() const;
163 
164  static DtSimTask * creator();
165 };
166 
167 class DtRouteAction;
170 
172 {
173 
174 public:
175 
178 
181  DtMoveAlongWithActionsTask(const DtString & writeName,
182  DtReaderWriterRegistry * parentRegistry = 0);
183 
185  DtMoveAlongWithActionsTask(const DtString & writeName, const DtMoveAlongWithActionsTask & orig,
186  DtReaderWriterRegistry * parentRegistry = 0);
187 
190 
191  virtual ~DtMoveAlongWithActionsTask();
192 
194  virtual const DtSimTaskMessageType& type() const;
195 
197  virtual DtSimTask * clone(const DtString & name, DtReaderWriterRegistry *
198  parentRegistry = 0) const;
199 
201  virtual DtString stringRep() const;
202 
203  static DtSimTask* creator();
204 
207  virtual int netRepSize() const;
208 
210  virtual bool setFromNet(const char* contentBuffer,
211  unsigned contentSize);
212 
215  virtual bool setToNet();
216 
217  virtual void setTimeOnTarget(double timeOnTarget);
218  virtual double timeOnTarget() const;
219  virtual bool isTimeOnTargetSpecified() const;
220 
221  virtual void setTimeOnTargetPosition(double timeOnTargetPosition);
222  virtual double timeOnTargetPosition() const;
223  virtual bool isTimeOnTargetPositionSpecified() const;
224 
225  virtual void setAbandonTaskIfTimeOnTargetNotAchievable(bool b);
226  virtual bool abandonTaskIfTimeOnTargetNotAchievable() const;
227 
228  virtual void setHoldPosition(double loiterPosition);
229  virtual double holdPosition() const;
230  virtual bool isHoldPositionSpecified() const;
231 
232  virtual DtRwRouteActionList& routeActions();
233  virtual const DtRwRouteActionList& routeActions() const;
234 
235 protected:
241 
242 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
DtRwBoolean myStartAtClosestPoint
Definition: moveAlongTasks.h:128
!!!!!!!!!!!!!!!!! DtMoveAlongRetrogradeTask Same as move to task but will be handled a bit differentl...
Definition: moveAlongTasks.h:135
virtual int netRepSize() const
Returns the size of the full network representation (control object name included) padded to an 8-byt...
Definition: rwRouteActionList.h:19
static DtSimTask * creator()
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
virtual DtSimTask * clone(const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const =0
Make a copy of this task. Returns a newly allocated instance of a DtSimTask. Override this member fun...
DtRwRouteActionList myActionList
Definition: moveAlongTasks.h:240
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:431
!!!!!!!!!!!!!!!!! DtMoveAlongWithActionsTask Move along task with a list of sets and tasks ...
Definition: moveAlongTasks.h:171
DtRwUUID myRoute
Definition: moveAlongTasks.h:126
DtIteratorDirection
Definition: iteratorBase.h:23
DtRwBoolean myAbandonTaskIfTimeOnTargetNotAchievable
Definition: moveAlongTasks.h:239
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubtask member from the incoming contentBuffer (cast to type DtNetSimTask). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimTask::netRepSize().
const DtMoveAlongTask & operator=(const DtMoveAlongTask &orig)
assignment operator
DtRwReal myTimeOnTargetPosition
Definition: moveAlongTasks.h:237
DtMoveAlongTask represents a Move Along Route task for an entity to perform. It inherits read/writabl...
Definition: moveAlongTasks.h:46
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Fills in the task from the network buffer.
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimTask*...
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
DtRwReal myLoiterPosition
Definition: moveAlongTasks.h:238
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwReal mySpeed
Definition: moveAlongTasks.h:129
virtual DtString stringRep() const
Get a readable string representation of this task.
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
Definition: routeAction.h:35
virtual DtString stringRep() const =0
Returns a human-readable string representation of the task. This string representation is used to dis...
const DtSimTask & operator=(const DtSimTask &orig)
assignment operator; same as copy constructor
DtRwReal myTimeOnTarget
Definition: moveAlongTasks.h:236
virtual bool setToNet()
Fills in the network buffer (created by base class simTask) with the task contents.
DtRwInt myTraversalDirection
Definition: moveAlongTasks.h:127
virtual const DtSimTaskMessageType & type() const
Returns &quot;move-along&quot;.
virtual const DtSimTaskMessageType & type() const =0
What kind of task am I? Returns a string indicating the kind of task (for example, “move-to”, “follow-entity”). Derived classes must implement this member function to return a unique string representing the type of task. The set of standard task types supplied with VR-Forces is in taskTypes.h.
virtual DtSimTask * clone(const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const
Creates a copy of this move-along task.
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)