VR-Forces 5.0.2 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>
23 
24 #include <set>
25 
32 {
33  typedef std::map<DtUUID, int> DtUUIDPromotionIdMap;
34  typedef std::map<int, DtUUID> DtPromotionIdUUIDMap;
35 
36 public:
37 
40  const DtString& rwName = DtString::nullString(),
41  DtReaderWriterRegistry* parentRegistry = 0);
42 
45  const DtString& rwName = DtString::nullString(),
46  DtReaderWriterRegistry* parentRegistry = 0);
47 
49  virtual ~DtAggregateMoveAlongPSR();
50 
53 
56  const DtString& rwName = DtString::nullString(),
57  DtReaderWriterRegistry* parentRegistry = 0) const;
58 
62  virtual DtString type() const;
63 
67  virtual void setRoute(const DtUUID& route);
68 
70  virtual DtSimObjectReference route() const;
72 
77  virtual void setTimeToNextMaintainFormationTick(DtTime simTime);
78  virtual DtTime timeToNextMaintainFormationTick() const;
80 
82  virtual DtUUID lookupRoute(int promotionId) const;
83 
85  virtual DtUUID lookupRoute(const DtUUID& subordinate) const;
86 
88  virtual void clearPromotionIdRouteList();
89 
91  virtual void addPromotionIdRouteEntry(int promotionId,
92  const DtUUID& route);
93 
95  virtual const DtPromotionIdUUIDMap& promotionIdRouteMap() const;
96 
98  virtual void addTaskedSubordinatePromotionIdEntry(
99  const DtUUID& subordinate, int promotionId);
100 
102  virtual void removeTaskedSubordinate(const DtUUID& subordiante);
103 
106  virtual bool isATaskedSubordinate(const DtUUID& subordinate);
107 
109  virtual void removeRoute(const DtUUID& route);
110 
112  virtual void clearTaskSubordinates();
113 
115  virtual bool taskedSubordinatesEmpty() const;
116 
119  virtual void setMovingToRoute(bool trueOrFalse);
120  virtual bool movingToRoute() const;
122 
124  virtual const DtUUIDPromotionIdMap& taskedSubordinates() const;
125 
128  virtual void setRouteIsDiscovered(bool value);
129  virtual bool routeIsDiscovered() const;
131 
134  virtual void setIsGeneratingFormationRoutes(bool value);
135  virtual bool isGeneratingFormationRoutes() const;
137 
140  virtual void setIsReevaluatingFormationRoutes(bool value);
141  virtual bool isReevaluatingFormationRoutes() const;
143 
146  virtual void setSpeed(double aSpeed);
147  virtual double speed() const;
149 
153  virtual void setFormationName(const DtString& name);
154  virtual DtString formationName()const;
155 
157  virtual void setFormationLeader(const DtUUID& leader);
158  virtual DtUUID formationLeader() const;
159 
162  virtual void putSelf(std::string& fp, int indentLevel = 0,
163  bool writeUnspecified = false,
164  const DtFilename& path = DtReaderWriter::appPath());
165 
168  virtual void getSelf(DtlObjPtr args, const SearchPaths& searchPaths,
169  const DtVariableBindingsList& variableBindings);
170 
172  static DtVrfProcessStateRepository* creator (const DtString& rwName,
173  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
174 
175 protected:
176 
179 
182 
185 
188 
194 
200 
203 
207 
210 
213 
216 
219 
222 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
std::map< int, DtUUID > DtPromotionIdUUIDMap
Definition: aggregateMoveAlongPSR.h:34
DtPromotionIdUUIDList myPromotionIdRouteList
Readable writeable list of promotion Id/route. Valid only immediately after getSelf() has been called...
Definition: aggregateMoveAlongPSR.h:193
std::map< DtUUID, int > DtUUIDPromotionIdMap
Definition: aggregateMoveAlongPSR.h:33
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:212
DtRwString myFormationName
The current formation name.
Definition: aggregateMoveAlongPSR.h:221
DtUUIDPromotionIdMap myCurrentlyTaskedSubordinates
Map of currently tasked subordinate object uuids to promotion Id.
Definition: aggregateMoveAlongPSR.h:181
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:431
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: simObjectReference.h:74
DtRwSimObjectReference myRoute
Route the aggregate is currently moving along.
Definition: aggregateMoveAlongPSR.h:187
#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:209
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
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:206
DtPromotionIdUUIDMap myPromotionIndexRouteMap
Map of promotion Ids (formation positions) to route uuids.
Definition: aggregateMoveAlongPSR.h:178
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:218
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:199
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
file aggregateMoveAlongPSR.h
Definition: aggregateMoveAlongPSR.h:31
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:202
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:184
DtRwBoolean myIsReevaluatingFormationRoutes
Flag indicating whether we are currently reevaluating formation routes.
Definition: aggregateMoveAlongPSR.h:215

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)