VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
stateData.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
10 //
15 //
16 #pragma once
17 
19 
25 #include <vrfutil/rwUUID.h>
26 #include <legionDataStore/simulationDatabase.h>
27 #include <legionDataStore/writeStateInstance.h>
28 #include <legionDataStore/readStateInstance.h>
29 #include "legionDataStore/view.h"
30 
31 #include <vlutil/vlString.h>
32 #include <vlpi/disEnums.h>
33 #include <tbb/spin_rw_mutex.h>
34 #include <tbb/spin_mutex.h>
35 #include <tbb/mutex.h>
36 #include <set>
37 #include <boost/signals2.hpp>
38 
39 namespace LOM
40 {
41  class WriteEntityRepository;
42  class ReadEntityRepository;
43 }
44 
45 namespace Legion
46 {
47  class SimulationDatabase;
48  class WriteStateInstance;
49 }
50 
51 class DtAppearance;
53 
54 namespace makVrf
55 {
56  class DtStateDataManager;
57  class DtLaserDesignatorStateComponent;
58  class DtIffStateComponent;
59  class DtActiveSonarStateComponent;
60  class DtTaskVisualizationStateComponent;
61  class DtRadioTransmitterStateComponent;
62  class DtNavAidRadioTransmitterStateComponent;
63  class DtUnderwaterAcousticsStateComponent;
64  class DtEmitterSystemStateComponent;
65  class DtRadioReceiverStateComponent;
66  class DtSimulatedObjectStateComponent;
67  class DtLocationStateComponent;
68  class DtAisDataStateComponent;
69  class DtAircraftLightingStateComponent;
70  class DtGroundVehicleLightingStateComponent;
71  class DtSimpleSimulatedObjectStateComponent;
72 
77  {
78  private:
82 
83  public:
88 
92  template <typename T_Component>
93  bool hasStateComponent() const
94  {
95  if (hasStateComponentType(T_Component::ComponentType()))
96  {
97  return (dynamic_cast<const T_Component*>(getStateComponent(T_Component::ComponentType())) != nullptr);
98  }
99 
100  return false;
101  }
102 
106  template <typename T_Component>
107  const T_Component* getStateComponent() const
108  {
109  return dynamic_cast<const T_Component*>(getStateComponent(T_Component::ComponentType()));
110  }
111 
114  virtual int numComponents(DtStateComponent::StateComponentType) const = 0;
115 
119  template <typename T_Component>
120  std::vector<const T_Component*> getStateComponentList() const
121  {
122  DtStateComponent::StateComponentType scType = T_Component::ComponentType();
123  std::vector<const T_Component*> results;
124  int iLimit = numComponents(scType);
125  int i;
126  for (i = 0; i < iLimit; i++)
127  {
128  const T_Component* component = dynamic_cast<const T_Component*>(getStateComponent(scType, i));
129 
130  if (!component->markedForRemoval())
131  {
132  results.push_back(dynamic_cast<const T_Component*>(component));
133  }
134  }
135 
136  return results;
137  }
138 
141  virtual bool hasStateComponentType(DtStateComponent::StateComponentType) const = 0;
146  virtual const DtFrameStateInterface* getStateComponent(DtStateComponent::StateComponentType, int index = 0) const = 0;
148  virtual void aboutToBeDeleted();
149 
151  unsigned long long legionGlobalId() const;
153  mutable boost::signals2::signal<void (const DtExternalFrameStateInterface*)> signal_externalFrameStateToBeDestroyed;
154 
155  protected:
157 
160  virtual void removeStateComponent(const DtFrameStateInterface* fc = nullptr) = 0;
163  virtual void addStateComponent(const DtFrameStateInterface* comp) = 0;
166  virtual void addStateComponent(DtFrameStateInterface*) { throw DtUnimplementedMethod("The addStateComponent() method is not implemented for this class."); };
167 
169  virtual const DtString& markingText() const { throw DtUnimplementedMethod("The const DtString markingText() const is unimplmented for this class."); };
170 
171  protected:
173  DtStateData* myStateData;
175  bool myCleared;
176  };
177 
181  {
182  public:
187  {
188  }
189 
190  virtual ~DtExternalNextFrameState() override;
191 
194  virtual void addStateComponent(DtFrameStateInterface*) override;
195 
200  DtFrameStateInterface* addStateComponent(DtStateComponent::StateComponentType type, const DtVrfObjectParameters* = nullptr);
201 
203  template <typename T_Component>
204  T_Component* addStateComponent(bool checkWritable = false, bool isRemote = false);
205 
207  std::set<int> modifiedStateComponentTypes() const;
209  bool isModified() const;
210 
212  void nextFrameRemoveStateComponent(const DtFrameStateInterface* component);
213 
216  template <typename T_Component>
217  void removeStateComponents();
218 
219  virtual int numComponents(DtStateComponent::StateComponentType scType) const override
220  {
221  if (scType < myFrameState.size())
222  {
223  return myFrameState[scType].size();
224  }
225 
226  return 0;
227  }
228 
234  template <typename T_Component>
235  const T_Component* getStateComponent(int index = 0) const
236  {
237  DtStateComponent::StateComponentType scType = T_Component::ComponentType();
238 
239  const T_Component* comp = dynamic_cast<const T_Component*>(getStateComponent(scType, index));
240 
241  if (!comp)
242  {
243  throw DtUnknownStateComponent(T_Component::StringType());
244  }
245 
246  return comp;
247  }
248 
252  template <typename T_Component>
253  std::vector<T_Component*> getStateComponentList() const
254  {
255  DtStateComponent::StateComponentType scType = T_Component::ComponentType();
256  std::vector<T_Component*> results;
257 
258  if (scType < myFrameState.size())
259  {
260  std::vector<DtFrameStateInterface*>::const_iterator iter = myFrameState[scType].begin();
261  std::vector<DtFrameStateInterface*>::const_iterator end = myFrameState[scType].end();
262  while (iter != end)
263  {
264  T_Component* component = dynamic_cast<T_Component*>(*iter);
265 
266  if (!component->markedForRemoval())
267  {
268  results.push_back(dynamic_cast<T_Component*>(component));
269  }
270  ++iter;
271  }
272  }
273 
274  return results;
275  }
276 
281  virtual const DtFrameStateInterface* getStateComponent(DtStateComponent::StateComponentType scType, int index = 0) const override
282  {
283  if (scType < myFrameState.size())
284  {
285  if (index < myFrameState[scType].size())
286  {
287  return myFrameState[scType][index];
288  }
289  }
290 
291  return nullptr;
292  }
293 
299  {
300  if (scType < myFrameState.size())
301  {
302  if (index < myFrameState[scType].size())
303  {
304  return myFrameState[scType][index];
305  }
306  }
307 
308  return nullptr;
309  }
310 
311  virtual bool hasStateComponentType(DtStateComponent::StateComponentType scType) const override;
314  virtual void addStateComponent(const DtFrameStateInterface* comp) override;
315 
318  template <typename T_Component>
319  bool isWritable()
320  {
321  T_Component* comp = getStateComponent<T_Component>(0, false);
322 
323  return (comp && comp->isWritable());
324  }
325 
333  template <typename T_Component>
334  T_Component* getStateComponent(int index = 0, bool checkWritable = true)
335  {
336  DtStateComponent::StateComponentType scType = T_Component::ComponentType();
337 
338  if (scType < myFrameState.size())
339  {
340  if (index < myFrameState[scType].size())
341  {
342  DtFrameStateInterface* sc = myFrameState[scType][index];
343 
344  if (sc)
345  {
346  T_Component* comp = dynamic_cast<T_Component*>(sc);
347 
348  if (comp && (!checkWritable || comp->isWritable()))
349  {
350  return comp;
351  }
352  else
353  {
354  throw DtUnknownStateComponent("This object cannot have state written to it.");
355  }
356  }
357  }
358  }
359 
360  throw DtUnknownStateComponent(T_Component::StringType());
361  }
362 
365  void takeControlOfComponent(DtStateComponent*);
366 
368  virtual const DtString& markingText() const override;
369 
372  {
373  return myFrameState.size();
374  }
375 
376  protected:
377  friend class DtStateData;
378 
382  virtual void removeStateComponent(const DtFrameStateInterface* component) override;
383 
384  protected:
386  std::vector<std::vector<DtFrameStateInterface*> > myFrameState{};
387  };
388 
392  {
393  public:
398  {
399  }
400 
401  virtual ~DtExternalCurrentFrameState() override;
402 
404  bool isValid() const;
406  bool isModified() const;
407 
412  template <typename T_Component>
413  const T_Component* getStateComponent(int index = 0) const;
414 
416  std::set<int> modifiedStateComponentTypes() const;
417 
422  virtual const DtFrameStateInterface* getStateComponent(
423  DtStateComponent::StateComponentType, int index = 0) const override;
424 
427  virtual int numComponents(DtStateComponent::StateComponentType scType) const override
428  {
429  if (scType < myFrameState.size())
430  {
431  return myFrameState[scType].size();
432  }
433 
434  return 0;
435  }
436 
440  template <typename T_Component>
441  std::vector<const T_Component*> getStateComponentList() const
442  {
443  DtStateComponent::StateComponentType scType = T_Component::ComponentType();
444  std::vector<const T_Component*> results;
445 
446  if (scType < myFrameState.size())
447  {
448  std::vector<const DtFrameStateInterface*>::const_iterator iter = myFrameState[scType].begin();
449  std::vector<const DtFrameStateInterface*>::const_iterator end = myFrameState[scType].end();
450  while (iter != end)
451  {
452  results.push_back(dynamic_cast<const T_Component*>(*iter));
453  ++iter;
454  }
455  }
456 
457  return results;
458  }
461  virtual void addStateComponent(const DtFrameStateInterface* comp) override;
462 
465  virtual bool hasStateComponentType(DtStateComponent::StateComponentType scType) const override;
466 
468  virtual const DtString& markingText() const override;
469 
472  {
473  return myFrameState.size();
474  }
475 
478  const std::vector<std::vector<const DtFrameStateInterface*> >& frameStates() const
479  {
480  return myFrameState;
481  }
482 
484  bool advancedFrame() const;
485 
486  protected:
487  friend class DtStateData;
488 
492  virtual void removeStateComponent(const DtFrameStateInterface* component) override;
493 
494  protected:
496  std::vector<std::vector<const DtFrameStateInterface*> > myFrameState{};
497  };
498 
514  {
515  public:
517  using SimStateID = unsigned long long;
520  {
523  PublishComponentsOnly
524  };
525 
526  public:
527 
529 
533  DtStateData();
534 
539  DtStateData(SimStateID id, Legion::SimulationDatabase* db, DtStateDataManager* mgr);
540 
546  DtStateData(SimStateID id, makVrf::UInt64 legionHandle, Legion::SimulationDatabase* db, DtStateDataManager* mgr);
547 
550  virtual ~DtStateData();
551 
553  virtual void invalidate();
554 
557  virtual bool checkValidity() const;
558 
559 #if defined(WIN32) || defined(_WIN32)
560  __declspec(deprecated("Method is deprecated. If this is a DtSimObjectReference use the ref.isValid() check instead or if this is a DtStateData reference is checkValidity().")) virtual bool isValid() const { return checkValidity(); };
561 #endif
562 
564  virtual bool isWritable() const;
566  virtual void clearStateDataManager();
567 
570  virtual void setAddToSimObjectManager(bool b);
573  {
574  return myAddToSimObjectManager;
575  }
576 
581  template <typename T_Component>
583  {
584  if (myWriteStateInstance.isValid())
585  {
586  return myWriteStateInstance.typeExtensionCount<T_Component>();
587  }
588  else
589  {
590  return getCurrentFrameNumberOfLegionComponents<T_Component>();
591  }
592  }
593 
597  template <typename T_Component>
599  {
600  if (myReadStateInstance && myReadStateInstance->isValid())
601  {
602  return myReadStateInstance->typeExtensionCount<T_Component>();
603  }
604  else
605  {
606  return 0;
607  }
608  }
609 
610  bool ownsComponents() const
611  {
612  return myOwnsComponents;
613  }
614 
619  template <typename T_Component>
620  unsigned int componentCount() const
621  {
622  if (myWriteStateInstance.isValid())
623  {
624  return myWriteStateInstance.typeExtensionCount<T_Component>();
625  }
626  else if (myReadStateInstance && myReadStateInstance->isValid())
627  {
628  return myReadStateInstance->typeExtensionCount<T_Component>();
629  }
630 
631  return 0;
632  }
633 
639  template <typename T_Component>
640  T_Component findNextFrameLegionComponent(int index = 0)
641  {
642  if (myWriteStateInstance.isValid())
643  {
644  return myWriteStateInstance.findTypeExtension<T_Component>(std::max(0, index));
645  }
646  else
647  {
648  return findCurrentFrameLegionComponent<T_Component>(index);
649  }
650  }
651 
656  template <typename T_Component>
657  T_Component findCurrentFrameLegionComponent(int index = 0) const
658  {
659  if (myReadStateInstance && myReadStateInstance->isValid())
660  {
661  if (T_Component::isType(myReadStateInstance->instanceHandle()))
662  {
663  return T_Component(myReadStateInstance->instanceHandle());
664  }
665 
666  return myReadStateInstance->findTypeExtension<T_Component>(std::max(0, index));
667  }
668  else
669  {
670  return T_Component();
671  }
672  }
673 
675  virtual void markModified();
677  virtual void clearModified();
678 
681  virtual void removeNextFrameStateComponent(const DtFrameStateInterface* f);
684  virtual void removeCurrentFrameStateComponent(const DtFrameStateInterface* f);
685 
687  bool isModified() const;
688 
690  bool advancedFrame() const
691  {
692  return myAdvancedFrame;
693  }
694 
696  bool advancingFrame() const
697  {
698  return myAdvancingFrame;
699  }
700 
703  {
704  return &myNextFrameState;
705  }
706 
709  {
710  return &myCurrentFrameState;
711  }
712 
717 
719  template <typename T_Component>
720  T_Component* addStateComponent(bool checkWritable = false, bool isRemote = false)
721  {
722  return myNextFrameState.addStateComponent<T_Component>(checkWritable, isRemote);
723  }
724 
727  template <typename T_Component>
728  bool isWritable()
729  {
730  return myNextFrameState.isWritable<T_Component>();
731  }
732 
735  {
736  if (myDatabase && myWriteStateInstance.isValid())
737  {
738  destroyInstance(myWriteStateInstance);
739  myWriteStateInstance = Legion::WriteStateInstance();
740  delete myReadStateInstance;
741  myReadStateInstance = nullptr;
742  }
743  }
744 
747  void destroyInstance(const Legion::WriteStateInstance& wsi)
748  {
749  tbb::mutex::scoped_lock lock(theCreateInstanceMutex);
750  database()->destroyInstance(wsi);
751  }
752 
754  virtual void createAndInitializeMainInstance();
755 
759  template <typename T_Component>
760  T_Component createMainInstance()
761  {
762  tbb::mutex::scoped_lock lock(theCreateInstanceMutex);
763  myWriteStateInstance = myDatabase->createInstance<T_Component>();
764  lock.release();
765 
766  return T_Component(myWriteStateInstance.instanceHandle());
767  }
768 
773  template <typename T_Component>
775  {
776  if (!myWriteStateInstance.isValid())
777  {
778  throw DtUnknownStateComponent("Cannot create a write Legion component on this object.");
779  }
780  else if (myDatabase)
781  {
782  tbb::mutex::scoped_lock lock(theCreateInstanceMutex);
783  T_Component comp = myDatabase->createInstance<T_Component>();
784  lock.release();
785 
786  return comp;
787  }
788 
789  return T_Component();
790  }
791 
800  template <typename T_Component>
801  T_Component createInstance()
802  {
803  if (!myWriteStateInstance.isValid())
804  {
805  throw DtUnknownStateComponent("Cannot create a write Legion component on this object.");
806  }
807  else if (myDatabase)
808  {
809  tbb::mutex::scoped_lock lock(theCreateInstanceMutex);
810  T_Component comp = myDatabase->createInstance<T_Component>();
811  lock.release();
812 
813  myWriteStateInstance.addExtension(comp);
814 
815  return comp;
816  }
817 
818  return T_Component();
819  }
820 
825  template <typename T_Component>
827  {
828  if (T_Component::ComponentType() < myStateComponents.size())
829  {
830  if (index < myStateComponents[T_Component::ComponentType()].size())
831  {
832  return myStateComponents[T_Component::ComponentType()][index];
833  }
834  }
835 
836  return nullptr;
837  }
838 
843  template <typename T_Component>
844  const DtStateComponent* getStateComponent(int index = 0) const
845  {
846  if (T_Component::ComponentType() < myStateComponents.size())
847  {
848  if (index < myStateComponents[T_Component::ComponentType()].size())
849  {
850  return myStateComponents[T_Component::ComponentType()][index];
851  }
852  }
853 
854  return nullptr;
855  }
856 
859  template <typename T_Component>
860  std::vector<T_Component*> getNextFrameStateComponentList() const
861  {
862  return myNextFrameState.getStateComponentList<T_Component>();
863  }
864 
867  template <typename T_Component>
868  std::vector<const T_Component*> getCurrentFrameStateComponentList() const
869  {
870  return myCurrentFrameState.getStateComponentList<T_Component>();
871  }
872 
878  template <typename T_Component>
879  bool hasStateComponent(bool checkWritable = false)
880  {
881  try
882  {
883  if (nextFrameState()->hasStateComponent<T_Component>())
884  {
885  if (checkWritable)
886  {
887  return (nextFrameStateComponent<T_Component>()->isWritable());
888  }
889 
890  return true;
891  }
892  else
893  {
894  return currentFrameState()->hasStateComponent<T_Component>();
895  }
896  }
897  catch(...)
898  {
899  return false;
900  }
901 
902  return false;
903  }
904 
908  template <typename T_Component>
909  const bool hasStateComponent() const
910  {
911  if (currentFrameState()->hasStateComponent<T_Component>())
912  {
913  return (dynamic_cast<const T_Component*>(currentFrameState()->getStateComponent<T_Component>()) != nullptr);
914  }
915 
916  return false;
917  }
918 
923  template <typename T_Component>
924  T_Component* nextFrameStateComponent()
925  {
926  T_Component* comp = nextFrameState()->getStateComponent<T_Component>(0);
927  if (comp && comp->isWritable())
928  {
929  return comp;
930  }
931  else
932  {
933  throw DtUnknownStateComponent("This object cannot have state written to it.");
934  }
935  }
936 
940  template <typename T_Component>
941  const T_Component* currentFrameStateComponent() const
942  {
943  return currentFrameState()->getStateComponent<T_Component>(0);
944  }
945 
948  virtual const DtFrameStateInterface* currentFrameStateFor(const DtFrameStateInterface*) const;
949 
952  void removeComponent(Legion::WriteStateInstance& set);
953 
955  bool cleared() const
956  {
957  return myCleared;
958  }
959 
961  bool frozen() const;
962 
965  void setUserData(unsigned long long value);
967  unsigned long long userData() const;
968 
970  const DtUUID& uuid() const;
973  void setUUID(const DtUUID& u);
974 
977  void setCheckForNameReservation(bool);
979  bool checkForNameReservation() const;
980 
983  void setGlobalId(const DtString& s);
985  const DtString& globalId() const;
986 
989  void setMarkingText(const DtString& name);
991  const DtString& markingText() const;
992 
994  void setSidc(const DtString&);
995  const DtString& sidc() const;
996 
999  void setAppearance(const DtAppearance& a);
1001  DtAppearance appearance() const;
1002 
1005  void setForceType(DtForceType force);
1007  DtForceType forceType() const;
1008 
1010  const DtString parentGlobalId() const;
1012  DtString parentGlobalId();
1013 
1016  const DtString& extendedData(const DtString& key) const;
1019  const DtString& nextFrameExtendedData(const DtString& key) const;
1023  void setExtendedData(const DtString& key, const DtString& value);
1024 
1026  const DtUUID& nextFrameHostId() const;
1028  const DtUUID& currentFrameHostId() const;
1029 
1031  bool isClutterEntity() const;
1032 
1035  void setEntityType(const DtEntityType& type);
1037  void setObjectType(const DtEntityType& type) { setEntityType(type); };
1038 
1040  DtEntityType entityType() const;
1042  DtEntityType objectType() const { return entityType(); };
1043 
1046  void setEntityId(const DtEntityIdentifier& s);
1048  const DtEntityIdentifier& entityId() const;
1049 
1051  virtual void setAwaitingTransfer(bool b);
1053  bool awaitingTransfer() const
1054  {
1055  return myAwaitingTransfer;
1056  }
1057 
1060  virtual void initializeParameterData(const DtVrfObjectParameters* params);
1061 
1067  virtual bool createPublicData(const DtVrfObjectParameters* params, bool isReflectedObject, const DtEntityType& et);
1068 
1072  {
1073  return mySimStateID;
1074  }
1075 
1080  template <typename T_Class>
1081  void removeInstanceUpdatedCallback(Legion::InstanceHandle instanceHandle, unsigned int callbackHandle);
1088  template <typename T_Class>
1089  unsigned int addInstanceUpdatedCallback(DtInstanceUpdatedCallback callback, Legion::InstanceHandle instanceHandle,
1090  const std::vector<Legion::AttributeIndex>& attributeIndexFilter = std::vector<Legion::AttributeIndex>());
1091 
1095  virtual void advanceFrame();
1096 
1098  virtual void takeControlOfComponent(DtStateComponent*);
1099 
1102  virtual void setCoordinateSystem(const Coordinate_System* cs);
1103 
1107  void setIsLocal(bool b);
1109  bool isLocal() const;
1110 
1113  {
1114  return myPublishFlag;
1115  }
1116 
1119  {
1120  return ((myPublishFlag == PublishAll) || (myPublishFlag == PublishComponentsOnly));
1121  }
1122 
1125  {
1126  return myStateDataManager;
1127  }
1128 
1131  {
1132  return myStateDataManager;
1133  }
1134 
1136  double absRealTime() const;
1137 
1140  {
1141  return myCoordinateSystem;
1142  }
1143 
1145  Legion::WriteStateInstance writeStateInstance()
1146  {
1147  return myWriteStateInstance;
1148  }
1149 
1151  Legion::ReadStateInstance* readStateInstance() const
1152  {
1153  return myReadStateInstance;
1154  }
1155 
1157  bool convertedToLocal() const
1158  {
1159  return myConvertedToLocal;
1160  }
1161 
1163  UInt64 legionGlobalId() const;
1164 
1166  virtual void clearComponents();
1167 
1173  virtual DtLaserDesignatorStateComponent* addLaserDesignator(bool isRemote = false);
1176  virtual void removeLaserDesignator(DtLaserDesignatorStateComponent* comp);
1177 
1182  virtual DtTaskVisualizationStateComponent* lineTaskVisualization(const DtString& visualName, const DtString& component);
1186  virtual DtTaskVisualizationStateComponent* pointTaskVisualization(const DtString& visualName, const DtString& component);
1190  virtual DtTaskVisualizationStateComponent* areaTaskVisualization(const DtString& visualName, const DtString& component);
1194  virtual DtTaskVisualizationStateComponent* textTaskVisualization(const DtString& visualName, const DtString& component);
1197  virtual void removeTaskVisualization(DtTaskVisualizationStateComponent* comp);
1198 
1201  virtual DtEmitterSystemStateComponent* addEmitterSystem(bool isRemote = false);
1203  virtual void removeEmitterSystem(DtEmitterSystemStateComponent* comp);
1204 
1207  virtual DtActiveSonarStateComponent* addActiveSonarSystem(bool isRemote = false);
1209  virtual void removeActiveSonarSystem(DtActiveSonarStateComponent* comp);
1210 
1213  virtual DtRadioTransmitterStateComponent* addRadioTransmitter(bool isRemote = false);
1215  virtual void removeRadioTransmitter(DtRadioTransmitterStateComponent* comp);
1216 
1219  virtual DtNavAidRadioTransmitterStateComponent* addNavAidRadioTransmitter(bool isRemote = false);
1221  virtual void removeNavAidRadioTransmitter(DtNavAidRadioTransmitterStateComponent* comp);
1222 
1225  virtual DtRadioReceiverStateComponent* addRadioReceiver(bool isRemote = false);
1227  virtual void removeRadioReceiver(DtRadioReceiverStateComponent* comp);
1228 
1230  virtual DtIffStateComponent* getOrCreateIffSystem(bool isRemote = false);
1232  virtual void removeIffSystem();
1233 
1235  virtual DtUnderwaterAcousticsStateComponent* getOrCreateUnderwaterAcousticsSystem(bool isRemote = false);
1237  virtual void removeUnderwaterAcousticsSystem();
1238 
1241  virtual void removeStateComponent(DtFrameStateInterface* comp);
1243 
1245  Legion::SimulationDatabase* database()
1246  {
1247  return myDatabase;
1248  }
1249 
1252  virtual void convertToRemote(bool onAdvanceFrame = true);
1253 
1255  virtual void convertToLocal();
1256 
1259  virtual int indexOfComponent(const DtFrameStateInterface*) const;
1260 
1262  virtual UInt64 instanceHandle(const DtFrameStateInterface*) const;
1263 
1265  virtual void shuttingDown();
1266 
1269  virtual void deletingComponent(DtStateComponent*);
1270 
1273  {
1274  return myParameters;
1275  }
1276 
1285  static void addDefaultPublicDataFor(const std::string& type, const std::string& componentCreator);
1289  static void removeDefaultPublicDataFor(const std::string& type, const std::string& componentCreator);
1295  static std::set<std::string> defaultPublicDataFor(DtEntityType defaultEntityType, const std::string& dislpayName, const std::string& parameterType);
1297 
1302  static void addPublicDataFor(const std::string& type, const std::string& componentCreator);
1306  static void removePublicDataFor(const std::string& type, const std::string& componentCreator);
1312  static std::set<std::string> additionalPublicDataFor(DtEntityType defaultEntityType, const std::string& dislpayName, const std::string& parameterType);
1314 
1315 
1321  static void setDefaultMainComponentFor(const std::string& type, const std::string& defaultPublicData);
1327  static std::string defaultMainComponentFor(DtEntityType defaultEntityType, const std::string& dislpayName, const std::string& type);
1329 
1332  virtual void aboutToBeDeleted();
1333 
1337  virtual void setPublishingOnLegionNetwork(bool b);
1340  {
1341  return myPublishingOnLegionNetwork;
1342  }
1343 
1345  virtual const DtSimulatedObjectStateComponent* currentFrameSimulatedObjectStateComponent() const;
1347  virtual const DtLocationStateComponent* currentFrameLocationStateComponent() const;
1348 
1349  protected:
1351  virtual DtSimulatedObjectStateComponent* nextFrameSimulatedObjectStateComponent();
1352 
1355  virtual DtStateData* currentFrameHostStateData() const;
1356 
1358  virtual bool createMainData(const DtVrfObjectParameters* params, const DtEntityType& et);
1359 
1363  virtual void hostChanged(const DtUUID& oldUUID, const DtUUID& newUUID);
1367  virtual void setupStateComponent(DtStateComponent* comp, const DtVrfObjectParameters* params = nullptr);
1371  virtual void subordinatesChanged(const std::vector<DtUUID>& oldSubordinates, const std::vector<DtUUID>& newSubordinates);
1372 
1373  friend class DtStateDataManager;
1374 
1377  {
1378  myPublishFlag = b;
1379  }
1380 
1385  virtual std::string defaultParameterTypeForEntityType(const DtEntityType& et) const;
1386 
1389  virtual void completeRemoteConversion();
1390 
1392  virtual void hostWasDeleted();
1393 
1394  protected:
1396 
1399  virtual void removeStateComponent(DtStateComponent::StateComponentType t);
1403  virtual void uuidChanged(const DtUUID& oldUUID, const DtUUID& newUUID);
1407  virtual void markingTextChanged(const DtString& oldText, const DtString& newText);
1408 
1409  public:
1411  mutable boost::signals2::signal<void (const DtStateData*)> signal_firstFrameAdvance;
1412 
1415  mutable boost::signals2::signal<void(const DtUUID&, const DtUUID&, SimStateID)> signal_uuidChanged;
1418  boost::signals2::signal<void(const DtString&, const DtString&, const DtUUID&, SimStateID)> signal_markingTextChanged;
1419 
1421  boost::signals2::signal<void (const DtStateData*, const DtUUID& oldUUID, const DtUUID& newUUID)> signal_hostChanged;
1422 
1425  mutable boost::signals2::signal<void (const DtStateData*)> signal_stateDataToBeDestroyed;
1428  boost::signals2::signal<void (SimStateID)> signal_preFrameAdvanced;
1429 
1431  mutable boost::signals2::signal<void (const DtStateData*)> signal_frameAdvanced;
1432 
1434  boost::signals2::signal<void (const DtStateData*)> signal_modified;
1435 
1438  boost::signals2::signal<void (DtStateData*)> signal_convertingToRemote;
1441  boost::signals2::signal<void (DtStateData*)> signal_convertedToRemote;
1442 
1445  boost::signals2::signal<void (DtStateData*)> signal_convertingToLocal;
1448  boost::signals2::signal<void (DtStateData*)> signal_convertedToLocal;
1451  mutable boost::signals2::signal<void (DtStateComponent*)> signal_stateComponentAdded;
1454  mutable boost::signals2::signal<void (DtStateComponent*)> signal_stateComponentRemoved;
1455 
1458  boost::signals2::signal<void (const DtStateData*, const std::vector<DtUUID>& added, const std::vector<DtUUID>& removed)> signal_subordinatesChanged;
1459 
1460  protected:
1465 
1469  Legion::SimulationDatabase* myDatabase;
1470 
1472  Legion::WriteStateInstance myWriteStateInstance;
1474  Legion::ReadStateInstance* myReadStateInstance;
1475 
1478 
1480  bool myIsModified = true;
1483 
1486 
1489 
1491  std::vector<std::vector<DtStateComponent*> > myStateComponents;
1493  std::vector<std::vector<DtStateComponent*> > myCreatedStateComponents;
1495  std::set<DtFrameStateInterface*> myRemoveStateComponents;
1496 
1503 
1507  std::atomic<unsigned int> myComponentNumber;
1508 
1510  boost::signals2::scoped_connection mySubordinatesChangedConnection;
1512  boost::signals2::scoped_connection myHostChangedConnection;
1514  boost::signals2::scoped_connection myUUIDChangedConnection;
1516  boost::signals2::scoped_connection myMarkingTextChangedConnection;
1518  mutable boost::signals2::scoped_connection myHostWasDeletedConnection;
1519 
1523  typedef std::map<std::string, std::set<std::string> > PublicData;
1528 
1530  typedef std::map<std::string, std::string> DefaultMainComponentMap;
1535 
1542 
1548  const DtLocationStateComponent* myNextFrameLocationStateComponent = nullptr;
1554  mutable tbb::spin_rw_mutex myCurrentFrameHostStateDataMutex;
1556  static tbb::mutex theCreateInstanceMutex;
1557 
1559  bool myAdvancingFrame = false;
1561  bool myConvertedToLocal = false;
1563  bool myAddToSimObjectManager = true;
1565  bool myOwnsComponents = false;
1566 
1570  DtEntityType myEntityType;
1571  };
1572 }
1573 
1574 #include <vrfStateData/stateData.inl>
unsigned int StateComponentType
Definition: stateComponent.h:56
bool isWritable()
Definition: stateData.h:319
DtEntityType myEntityType
The entity type of this entity, used to select default parameter types.
Definition: stateData.h:1570
UUID is a unique ID wrapper class.
Definition: uuid.h:59
bool myAdvancedFrame
True after the first call to advanceFrame().
Definition: stateData.h:1498
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:64
boost::signals2::scoped_connection myMarkingTextChangedConnection
Connection tracking marking text changes on this entity.
Definition: stateData.h:1516
T_Component * nextFrameStateComponent()
Returns a writable pointer to the next-frame state component of the given type. Throws DtUnknownState...
Definition: stateData.h:924
std::vector< T_Component * > getNextFrameStateComponentList() const
Definition: stateData.h:860
const DtSimulatedObjectStateComponent * myCurrentFrameSimulatedObjectStateComponent
Cached pointer to the current-frame simulated object state component for fast access.
Definition: stateData.h:1544
const T_Component * getStateComponent() const
Returns a const pointer to the state component of the requested type.
Definition: stateData.h:107
bool advancingFrame() const
Definition: stateData.h:696
DtExternalCurrentFrameState(DtStateData *sd)
Constructs the current-frame state view for the given state data.
Definition: stateData.h:396
Exception thrown when a required method has not been implemented.
Definition: stateDataTypes.h:30
unsigned long long SimStateID
Unique identifier for a simulation state instance.
Definition: stateDataTypes.h:17
std::vector< const T_Component * > getStateComponentList() const
Returns a vector of const pointers to all current-frame components of the given type.
Definition: stateData.h:441
SimStateID stateId() const
Definition: stateData.h:1071
const bool hasStateComponent() const
Returns true if the current-frame contains a state component of the given type that can be cast to it...
Definition: stateData.h:909
boost::signals2::scoped_connection mySubordinatesChangedConnection
Connection tracking changes to the subordinate entity list.
Definition: stateData.h:1510
boost::signals2::signal< void(SimStateID)> signal_preFrameAdvanced
Signal emitted at the beginning of frame advance, before component data is swapped. Listeners receive the state ID.
Definition: stateData.h:1428
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: radioTransmitterStateComponent.h:160
T_Component * getStateComponent(int index=0, bool checkWritable=true)
Returns a writable pointer to the next-frame state component of the given type. Throws DtUnknownState...
Definition: stateData.h:334
int mySessionId
Session identifier for the current simulation session.
Definition: stateData.h:1488
The DtLocationStateComponent interface contains the interface that all DtLocationStateComponents can ...
Definition: locationStateComponent.h:25
int getCurrentFrameNumberOfLegionComponents() const
Returns the count of Legion extension components of the given type for the current frame...
Definition: stateData.h:598
bool convertedToLocal() const
Definition: stateData.h:1157
const Coordinate_System * myCoordinateSystem
The coordinate system used when converting position data for this entity.
Definition: stateData.h:1485
std::vector< std::vector< DtStateComponent * > > myStateComponents
Two-dimensional array of state components indexed by StateComponentType and component index...
Definition: stateData.h:1491
bool cleared() const
Definition: stateData.h:955
int numberOfFrameStates() const
Definition: stateData.h:471
boost::signals2::signal< void(const DtStateData *)> signal_modified
Signal sent if this state had modified components.
Definition: stateData.h:1434
PublishFlag myPublishFlag
Simulated locally vs. remote representation.
Definition: stateData.h:1482
The DtSimulatedObjectStateComponent is an interface that all main components (those that are consider...
Definition: simulatedObjectStateComponent.h:21
T_Component createUnattachedInstance()
Creates a new Legion instance of the given type without attaching it as an extension to the main inst...
Definition: stateData.h:774
boost::signals2::signal< void(const DtString &, const DtString &, const DtUUID &, SimStateID)> signal_markingTextChanged
Signal emitted when this state data&#39;s marking text changes. Listeners receive the old text...
Definition: stateData.h:1418
static tbb::mutex theCreateInstanceMutex
Mutex used to serialize concurrent calls to createInstance() across all state data instances...
Definition: stateData.h:1556
static PublicData theDefaultPublicData
Default public data keyed by parameter type, shared across all instances.
Definition: stateData.h:1525
State is not published.
Definition: stateData.h:521
DtEntityType objectType() const
Definition: stateData.h:1042
Legion::SimulationDatabase * database()
Definition: stateData.h:1245
PublishFlag publishFlag() const
Definition: stateData.h:1112
static DefaultMainComponentMap theDefaultMainComponentMap
Shared map of default main component assignments, keyed by type string.
Definition: stateData.h:1532
voidpf void uLong size
Definition: ioapi.h:39
const DtStateDataManager * stateDataManager() const
Definition: stateData.h:1130
DtFrameStateInterface * getStateComponent(DtStateComponent::StateComponentType scType, int index=0)
Returns a writable pointer to the next-frame state component of the given type at the specified index...
Definition: stateData.h:298
void setPublishFlag(PublishFlag b)
Only called during construction.
Definition: stateData.h:1376
Legion::SimulationDatabase * myDatabase
Pointer to the Legion simulation database used to publish and receive updates.
Definition: stateData.h:1469
bool addToSimObjectManager() const
Definition: stateData.h:572
bool hasStateComponent(bool checkWritable=false)
Returns true if a state component of the given type exists on this object. First checks the next fram...
Definition: stateData.h:879
Write-access view of the next-frame state components within a DtStateData. Only the simulation (contr...
Definition: stateData.h:180
boost::signals2::signal< void(const DtStateData *)> signal_frameAdvanced
Signal sent regardless of whether or not this state had any modified components.
Definition: stateData.h:1431
virtual int numComponents(DtStateComponent::StateComponentType scType) const override
Definition: stateData.h:427
Contains the DtUUID class declaration.
unsigned long long UInt64
64-bit unsigned integer type.
Definition: stateDataTypes.h:19
DT_DLL_vrfmodel makVrf::DtDynamicTerrainStateComponent * createStateComponent(DtLocalObject *localObject)
Creates a new state component on the localObject and returns a pointer to it. Note that the state com...
boost::signals2::signal< void(const DtUUID &, const DtUUID &, SimStateID)> signal_uuidChanged
Signal emitted when this state data&#39;s UUID changes. Listeners receive the old UUID, the new UUID, and the state ID.
Definition: stateData.h:1415
PublishFlag
Controls whether and how this object&#39;s state is published on the Legion network.
Definition: stateData.h:519
Legion::ReadStateInstance * myReadStateInstance
Pointer to the Legion read-state instance for receiving remote updates; may be nullptr for local enti...
Definition: stateData.h:1474
boost::signals2::signal< void(DtStateData *)> signal_convertedToLocal
Signal emitted when conversion to a locally simulated representation is complete. Listeners receive t...
Definition: stateData.h:1448
unsigned int componentCount() const
Returns the total count of Legion extension components of the given type across next and current fram...
Definition: stateData.h:620
std::vector< std::vector< DtStateComponent * > > myCreatedStateComponents
Two-dimensional array tracking components created (owned) by this state data.
Definition: stateData.h:1493
T_Component findNextFrameLegionComponent(int index=0)
Finds and returns a writable Legion extension component of the given type for the next frame...
Definition: stateData.h:640
const DtVrfObjectParameters * myParameters
Object parameters used during initialization; not owned by this class.
Definition: stateData.h:1537
T_Component createInstance()
Creates a new Legion extension component of the given type and attaches it to the main write instance...
Definition: stateData.h:801
unsigned long long SimStateID
Opaque integer type used to identify and index state data objects.
Definition: stateData.h:517
All state is published.
Definition: stateData.h:522
virtual int numComponents(DtStateComponent::StateComponentType scType) const override
Definition: stateData.h:219
T_Component findCurrentFrameLegionComponent(int index=0) const
Finds and returns a read-only Legion extension component of the given type for the current frame...
Definition: stateData.h:657
void destroyInstance(const Legion::WriteStateInstance &wsi)
Destroys a Legion instance and removes it from the simulation database.
Definition: stateData.h:747
const DtStateComponent * getStateComponent(int index=0) const
Returns a const pointer to the internal DtStateComponent of the given type at the specified index...
Definition: stateData.h:844
int getNextFrameNumberOfLegionComponents()
Returns the count of Legion extension components of the given type for the next frame. Falls back to the current frame count if no writable instance exists.
Definition: stateData.h:582
std::vector< const T_Component * > getCurrentFrameStateComponentList() const
Definition: stateData.h:868
static PublicData theAdditionalPublicData
Additional public data (beyond the default) keyed by parameter type, shared across all instances...
Definition: stateData.h:1527
boost::signals2::scoped_connection myHostChangedConnection
Connection tracking host UUID changes.
Definition: stateData.h:1512
std::vector< T_Component * > getStateComponentList() const
Returns a vector of writable pointers to all next-frame components of the given type.
Definition: stateData.h:253
boost::signals2::signal< void(const DtExternalFrameStateInterface *)> signal_externalFrameStateToBeDestroyed
Signal emitted immediately before this interface is destroyed.
Definition: stateData.h:153
DtStateComponent * getStateComponent(int index=0)
Returns a writable pointer to the internal DtStateComponent of the given type at the specified index...
Definition: stateData.h:826
DtStateData * myCurrentFrameHostStateData
Mutable cache of the current-frame host state data pointer; updated lazily.
Definition: stateData.h:1552
Definition: coordSystem.h:54
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: laserDesignatorStateComponent.h:64
bool ownsComponents() const
Definition: stateData.h:610
bool myPublishingOnLegionNetwork
True if state for this entity is being published on the Legion network.
Definition: stateData.h:1539
Abstract interface class for the active sonar state component, representing either the next or curren...
Definition: activeSonarStateComponent.h:396
boost::signals2::signal< void(DtStateData *)> signal_convertedToRemote
Signal emitted when conversion to a remote representation is complete. Listeners receive the state da...
Definition: stateData.h:1441
DtExternalNextFrameState * nextFrameState()
Definition: stateData.h:702
Legion::WriteStateInstance myWriteStateInstance
The basic data. This is what all components are hung off of if they are STE compliant.
Definition: stateData.h:1472
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
std::atomic< unsigned int > myComponentNumber
Monotonically increasing counter used to assign unique indices to newly created components.
Definition: stateData.h:1507
boost::signals2::signal< void(const DtStateData *, const DtUUID &oldUUID, const DtUUID &newUUID)> signal_hostChanged
Signal sent when the host has changed.
Definition: stateData.h:1421
std::map< std::string, std::string > DefaultMainComponentMap
Maps parameter / entity type strings to the name of their default main component creator.
Definition: stateData.h:1530
const Coordinate_System * coordinateSystem() const
Definition: stateData.h:1139
DtExternalCurrentFrameState myCurrentFrameState
Read-only view of state components from the last completed frame.
Definition: stateData.h:1464
void setObjectType(const DtEntityType &type)
Definition: stateData.h:1037
bool isWritable()
Definition: stateData.h:728
std::map< std::string, std::set< std::string > > PublicData
This is added for systems that might not have updated the ope files to the new format to get public d...
Definition: stateData.h:1523
void destroyMainInstance()
Destroys the main Legion write instance and frees the associated read instance.
Definition: stateData.h:734
Legion::ReadStateInstance * readStateInstance() const
Definition: stateData.h:1151
DtStateDataManager * myStateDataManager
The state data manager that owns and manages this state data, or nullptr.
Definition: stateData.h:1467
bool myMainComponentOnLegion
True if the main (primary) component for this entity resides on the Legion network.
Definition: stateData.h:1541
std::vector< const T_Component * > getStateComponentList() const
Returns a vector of const pointers to all components of the given type.
Definition: stateData.h:120
Read-only view of the current (committed) frame state components within a DtStateData. Safe to access from any thread once the frame has been advanced.
Definition: stateData.h:391
UInt64 myLegionGlobalId
The Legion global identifier for this entity.
Definition: stateData.h:1505
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentRemoved
Signal emitted whenever a state component is removed from this state data. Listeners receive a pointe...
Definition: stateData.h:1454
DtExternalNextFrameState(DtStateData *sd)
Constructs the next-frame state view for the given state data.
Definition: stateData.h:185
Legion::WriteStateInstance writeStateInstance()
Definition: stateData.h:1145
virtual const DtFrameStateInterface * getStateComponent(DtStateComponent::StateComponentType scType, int index=0) const override
Returns a const pointer to the next-frame state component of the given type at the specified index...
Definition: stateData.h:281
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: emitterSystemStateComponent.h:498
bool advancedFrame() const
Definition: stateData.h:690
Exception-like value type thrown when an unrecognized state component is encountered.
Definition: stateDataTypes.h:38
DtString myMarkingText
The current marking text (callsign / label) for this entity.
Definition: stateData.h:1568
Definition: stateComponent.h:52
boost::function< void(const std::vector< UInt32 > &)> DtInstanceUpdatedCallback
Callback invoked when one or more state component instances are updated.
Definition: stateDataTypes.h:27
boost::signals2::scoped_connection myUUIDChangedConnection
Connection tracking UUID changes on this entity.
Definition: stateData.h:1514
Abstract interface for the radio receiver state component, representing common accessors for both the...
Definition: radioReceiverStateComponent.h:83
const DtLocationStateComponent * myCurrentFrameLocationStateComponent
Cached pointer to the current-frame location state component for fast access.
Definition: stateData.h:1546
const DtExternalCurrentFrameState * currentFrameState() const
Definition: stateData.h:708
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentAdded
Signal emitted whenever a state component is added to this state data. Listeners receive a pointer to...
Definition: stateData.h:1451
std::set< DtFrameStateInterface * > myRemoveStateComponents
Set of frame state interfaces queued for removal on the next frame advance.
Definition: stateData.h:1495
boost::signals2::scoped_connection myHostWasDeletedConnection
Connection tracking host entity deletion.
Definition: stateData.h:1518
Interface class representing the nav aid radio transmitter state component. Concrete subclasses provi...
Definition: navAidRadioTransmitterStateComponent.h:21
bool myCleared
True after aboutToBeDeleted() has been called.
Definition: stateData.h:175
Abstract base class that provides access to a set of state components within a DtStateData, representing either the next frame (read/write) or the current frame (read-only) view. Both DtExternalNextFrameState and DtExternalCurrentFrameState derive from this class.
Definition: stateData.h:76
boost::signals2::signal< void(const DtStateData *)> signal_stateDataToBeDestroyed
Signal emitted just before this state data object is destroyed. Listeners receive the state data poin...
Definition: stateData.h:1425
boost::signals2::signal< void(DtStateData *)> signal_convertingToRemote
Signal emitted when conversion from local to remote is about to begin. Listeners receive the state da...
Definition: stateData.h:1438
bool myConvertToRemote
True if this state data is pending conversion to a remote representation.
Definition: stateData.h:1500
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: underwaterAcousticsStateComponent.h:114
bool publishingOnLegionNetwork() const
Definition: stateData.h:1339
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29
bool awaitingTransfer() const
Definition: stateData.h:1053
bool myAwaitingTransfer
True if this entity is awaiting an ownership transfer.
Definition: stateData.h:1502
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: iffStateComponent.h:102
DtStateDataManager * stateDataManager()
Definition: stateData.h:1124
const T_Component * getStateComponent(int index=0) const
Returns a const pointer to the next-frame state component of the given type. Throws DtUnknownStateCom...
Definition: stateData.h:235
bool myCleared
True if this state data has been cleared (all components invalidated and removed).
Definition: stateData.h:1534
tbb::spin_rw_mutex myCurrentFrameHostStateDataMutex
Reader-writer mutex protecting myCurrentFrameHostStateData during concurrent access.
Definition: stateData.h:1554
const DtVrfObjectParameters * parameters()
Definition: stateData.h:1272
DtExternalNextFrameState myNextFrameState
Write-access view of state components for the upcoming frame.
Definition: stateData.h:1462
1) Define the interface class that will be used to represent the next and current frames...
Definition: taskVisualizationStateComponent.h:300
Contains the DtStateComponent class declaration.
virtual void addStateComponent(DtFrameStateInterface *)
Adds a writable state component to this frame-state view. Throws DtUnimplementedMethod by default...
Definition: stateData.h:166
DtSimulatedObjectStateComponent * myNextFrameSimulatedObjectStateComponent
Cached pointer to the next-frame writable simulated object state component.
Definition: stateData.h:1550
T_Component createMainInstance()
Creates a new main Legion write instance of the given type and stores it as the primary instance...
Definition: stateData.h:760
boost::signals2::signal< void(DtStateData *)> signal_convertingToLocal
Signal emitted when conversion from remote to local is about to begin. Listeners receive the state da...
Definition: stateData.h:1445
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
T_Component * addStateComponent(bool checkWritable=false, bool isRemote=false)
Using the global state component factory, creates and adds a new state of the given type...
Definition: stateData.h:720
bool hasStateComponent() const
Returns true if a state component of the given type is present and can be cast to T_Component...
Definition: stateData.h:93
bool isPublishedOnNetwork() const
Definition: stateData.h:1118
SimStateID mySimStateID
Unique simulation state identifier assigned to this state data.
Definition: stateData.h:1477
const std::vector< std::vector< const DtFrameStateInterface * > > & frameStates() const
Definition: stateData.h:478
const T_Component * currentFrameStateComponent() const
Returns a const pointer to the current-frame state component of the given type.
Definition: stateData.h:941
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:76
int numberOfFrameStates() const
Definition: stateData.h:371
boost::signals2::signal< void(const DtStateData *)> signal_firstFrameAdvance
Signal sent on the first frame advance.
Definition: stateData.h:1411

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)