Go to the documentation of this file.00001
00002
00003
00004
00005
00009
00010 #ifndef hlaStateObject_H_
00011 #define hlaStateObject_H_
00012
00013 #include "lgrSim.h"
00014
00015 #include "stateObject.h"
00016 #include "absoluteTime.h"
00017 #include "hlaMessageFactory.h"
00018 #include "hlaTimeStampedAttr.h"
00019
00020 #include <list>
00021 #include <map>
00022
00023 #include <vl/rtiCompatibility.h>
00024
00025 namespace MAKLogger
00026 {
00027 class DtLgrHlaMessage;
00028 class DtLgrHlaMessageState;
00029 class DtLgrHlaSimulationManager;
00030
00033 class DT_DLL_LGRSIM DtHlaTimeStampledStateRep
00034 {
00035 public:
00036
00037 DtHlaTimeStampledStateRep();
00038 ~DtHlaTimeStampledStateRep();
00039
00040 void update(DtAbsoluteTime time,DtLgrHandleValueReferenceMap* attributes);
00041
00042
00043 void generate(DtTimedHandleValueMapList& outputList);
00044
00045 typedef std::map<DtLgrHlaHandle,DtHlaTimeStampedAttribute*> HandleTimedAttributeMap;
00046 const HandleTimedAttributeMap& attributes() const;
00047
00048 protected:
00049
00050 HandleTimedAttributeMap myAttributes;
00051 };
00052
00055 class DT_DLL_LGRSIM DtHlaStateObject : public DtStateObject
00056 {
00057
00058 public:
00059
00061 DT_VIRTUAL_CTR(DtHlaStateObject,(DtLgrHlaMessageState&,DtPacket&))
00062
00063
00064 DT_VIRTUAL_BASE_CTR(DtStateObject,(DtMessageState&,DtPacket&))
00065
00066
00067 virtual ~DtHlaStateObject();
00068
00070 virtual bool isEntity() const;
00071
00073 virtual bool isAggregate() const;
00074
00076 virtual DtU64 uniqueId() const;
00077
00079 virtual DtU64 uniqueId(const DtHlaObject* object) const;
00080
00082 DtU64 packetId(DtPacket& packet) const;
00083
00086 void setPacketId(DtU64,DtPacket&) const;
00087
00089 virtual DtPacket* createUpdate(const DtAbsoluteTime& currentTime) const;
00090
00092 virtual DtPacket* createUpdates(const DtAbsoluteTime& currentTime) const;
00093
00095 virtual DtPacket* createRemoval(const DtAbsoluteTime& currentTime) const;
00096
00098 virtual bool packetForMe(DtPacket&) const;
00099
00101 virtual void updateViaPacket(DtPacket&);
00102
00104 virtual DtHlaTimeStampledStateRep* attributes();
00105
00107 virtual const DtRegionDescSet& regionSet() const;
00108
00109 inline DtLgrHlaHandle objectHandle() const{ return myObjectHandle;}
00110 inline DtLgrHlaHandle classHandle() const{ return myClassHandle;}
00111 inline const DtString& name() const {return myName;}
00112 inline const DtString& tag() const { return myTag;}
00113
00114 protected:
00115
00116 DtLgrHlaHandle myObjectHandle;
00117 DtLgrHlaHandle myClassHandle;
00118 DtString myName;
00119 DtString myTag;
00120
00121 DtLgrHlaMessageState* myState;
00122 DtHlaTimeStampledStateRep* myAttributes;
00123 DtRegionDescSet myRegions;
00124
00125 mutable const DtBaseObjClassDesc* myClassDesc;
00126
00127 };
00128
00129 }
00130
00131 #endif