VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateMoveAlongPSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
11 
12 #pragma once
13 
15 #include "vrfobjcore/simObject.h"
17 #include <readerWriter/rwString.h>
18 #include <readerWriter/rwReal.h>
20 #include "vrfutil/rwStringList.h"
21 #include <readerWriter/rwBoolean.h>
22 #include <vrfutil/rwUUID.h>
25 
26 #include <set>
27 
34 {
36  {
37  DtSubordinateMoveAlongInfo() : promotionId(-1), taskTrackingNum(-1) {};
38  DtSubordinateMoveAlongInfo(int promId, int ttNum) : promotionId(promId), taskTrackingNum(ttNum) {};
39  int promotionId;
41  };
42 
43  typedef std::map<DtUUID, DtSubordinateMoveAlongInfo> DtUuidSubordinateInfoMap;
44  //typedef std::map<DtUUID, int> DtUUIDPromotionIdMap;
45  typedef std::map<int, DtUUID> DtPromotionIdUUIDMap;
46 
47 public:
48 
51  const DtString& rwName = DtString::nullString(),
52  DtReaderWriterRegistry* parentRegistry = 0);
53 
56  const DtString& rwName = DtString::nullString(),
57  DtReaderWriterRegistry* parentRegistry = 0);
58 
60  virtual ~DtAggregateMoveAlongPSR();
61 
64 
67  const DtString& rwName = DtString::nullString(),
68  DtReaderWriterRegistry* parentRegistry = 0) const override;
69 
73  virtual DtString type() const override;
74 
78  virtual void setRoute(const DtUUID& route);
79 
81  virtual DtSimObjectReference route() const;
83 
88  virtual void setTimeToNextMaintainFormationTick(DtTime simTime);
89  virtual DtTime timeToNextMaintainFormationTick() const;
91 
93  virtual DtUUID lookupRoute(int promotionId) const;
94 
96  virtual DtUUID lookupRoute(const DtUUID& subordinate) const;
97 
99  virtual void clearPromotionIdRouteList();
100 
102  virtual void addPromotionIdRouteEntry(int promotionId,
103  const DtUUID& route);
104 
106  virtual const DtPromotionIdUUIDMap& promotionIdRouteMap() const;
107 
109  virtual void addTaskedSubordinatePromotionIdEntry(
110  const DtUUID& subordinate, int promotionId, int taskTrackingNum);
111 
113  virtual void changeSubordinatePromotionId(
114  const DtUUID& subordinate, int newPromotionId);
115 
117  virtual void removeTaskedSubordinate(const DtUUID& subordiante);
118 
121  virtual bool isATaskedSubordinate(const DtUUID& subordinate);
122 
125  virtual bool isATaskedSubordinateWithTrackingNumber(const DtUUID& subordinate, int trackingNum) const;
126 
128  virtual void removeRoute(const DtUUID& route);
129 
131  virtual void clearTaskSubordinates();
132 
134  virtual bool taskedSubordinatesEmpty() const;
135 
138  virtual void setMovingToRoute(bool trueOrFalse);
139  virtual bool movingToRoute() const;
141 
143  virtual const DtUuidSubordinateInfoMap& taskedSubordinates() const;
144 
147  virtual void setRouteIsDiscovered(bool value);
148  virtual bool routeIsDiscovered() const;
150 
153  virtual void setIsGeneratingFormationRoutes(bool value);
154  virtual bool isGeneratingFormationRoutes() const;
156 
159  virtual void setIsReevaluatingFormationRoutes(bool value);
160  virtual bool isReevaluatingFormationRoutes() const;
162 
165  virtual void setSpeed(double aSpeed);
166  virtual double speed() const;
168 
172  virtual void setFormationName(const DtString& name);
173  virtual DtString formationName()const;
174 
176  virtual void setFormationLeader(const DtUUID& leader);
177  virtual DtUUID formationLeader() const;
178 
181  virtual void putSelf(std::string& fp, int indentLevel = 0,
182  bool writeUnspecified = false,
183  const DtFilename& path = DtReaderWriter::appPath()) override;
184 
187  virtual void getSelf(DtlObjPtr args, const SearchPaths& searchPaths,
188  const DtVariableBindingsList& variableBindings) override;
189 
191  static DtVrfProcessStateRepository* creator (const DtString& rwName,
192  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
193 
194 protected:
195 
198 
201 
204 
207 
213 
219 
223 
226 
230 
233 
236 
239 
242 
245 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
std::map< int, DtUUID > DtPromotionIdUUIDMap
Definition: aggregateMoveAlongPSR.h:45
Definition: aggregateMoveAlongPSR.h:35
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
DtPromotionIdUUIDList myPromotionIdRouteList
Readable writeable list of promotion Id/route. Valid only immediately after getSelf() has been called...
Definition: aggregateMoveAlongPSR.h:212
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
DtRwBoolean myIsGeneratingFormationRoutes
Flag indicating whether we are currently generating formation routes.
Definition: aggregateMoveAlongPSR.h:235
DtRwString myFormationName
The current formation name.
Definition: aggregateMoveAlongPSR.h:244
std::map< DtUUID, DtSubordinateMoveAlongInfo > DtUuidSubordinateInfoMap
Definition: aggregateMoveAlongPSR.h:43
DtSubordinateMoveAlongInfo()
Definition: aggregateMoveAlongPSR.h:37
DtUuidSubordinateInfoMap myCurrentlyTaskedSubordinates
Map of currently tasked subordinate object uuids to promotion Id.
Definition: aggregateMoveAlongPSR.h:200
uuid class
Definition: rwUUID.h:26
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
DtRwSimObjectReference myRoute
Route the aggregate is currently moving along.
Definition: aggregateMoveAlongPSR.h:206
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwBoolean myRouteIsDiscovered
Flag indicating whether has been discovered or not.
Definition: aggregateMoveAlongPSR.h:232
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
int taskTrackingNum
Definition: aggregateMoveAlongPSR.h:40
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DtRwBoolean myMovingToRoute
Flag indicating whether we&#39;re in the moving to route phase of the task.
Definition: aggregateMoveAlongPSR.h:229
DtSubordinateMoveAlongInfo(int promId, int ttNum)
Definition: aggregateMoveAlongPSR.h:38
DtPromotionIdUUIDMap myPromotionIndexRouteMap
Map of promotion Ids (formation positions) to route uuids.
Definition: aggregateMoveAlongPSR.h:197
virtual void putSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Top level call to write itself to file. If write unspecified is true, will write entries that are uns...
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwReal mySpeed
Speed from task or ordered speed.
Definition: aggregateMoveAlongPSR.h:241
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
DtPromotionIdUUIDList myPromotionIdEntityList
Readable writeable list of promotion Id/entity. Valid only immediately after getSelf() has been calle...
Definition: aggregateMoveAlongPSR.h:218
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwSubordinateMoveAlongInfoList mySubordinateInfoList
List of information on subordinates that are currently tasked to move along. This replaces myPromotio...
Definition: aggregateMoveAlongPSR.h:222
file aggregateMoveAlongPSR.h
Definition: aggregateMoveAlongPSR.h:33
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.h.
DtRwReal myTimeToNextMaintainFormationTick
Time in seconds until next tick in which to perform formation monitoring.
Definition: aggregateMoveAlongPSR.h:225
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
const DtVrfProcessStateRepository & operator=(const DtVrfProcessStateRepository &orig)
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
DtRwUUID myFormationLeader
The leader of the formation (for leadFollowInFormation)
Definition: aggregateMoveAlongPSR.h:203
DtRwBoolean myIsReevaluatingFormationRoutes
Flag indicating whether we are currently reevaluating formation routes.
Definition: aggregateMoveAlongPSR.h:238

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)