VR-Link API Documentation for HLA 1.3
tGridDataInterface.h
Go to the documentation of this file.
1 //********************************************************************
4 //********************************************************************
5 //********************************************************************
7 //********************************************************************
8 
9 #ifndef tGridDataInterface_H_
10 #define tGridDataInterface_H_
11 
12 #if DtTENA
13 
14 #include "makLromMapExport.h"
15 #include <vlutil/vlMachineTypes.h>
16 #include <vl/tObjectInterface.h>
17 #include <vl/gridDataSR.h>
18 #include <vl/globalObjDes.h>
19 
20 #include <MAK/GriddedData/ServantPtr.h>
21 #include <MAK/GriddedData/ProxyPtr.h>
22 #include <MAK/GriddedData/ImmutablePublicationStatePtr.h>
23 #include <MAK/GriddedData/SubscriptionInfoPtr.h>
24 #include <TENA/GeocentricSpatialReferenceFrame/Pointer.h>
25 
26 #include <map>
27 #include <list>
28 
32 
34 //
41 class DT_DLL_MAKLROM DtGriddedDataInterface: public DtObjectInterface
42 {
43 protected:
46  class DtGriddedDataServantObject : public DtTenaServantObject
47  {
48  public:
50  DtGriddedDataServantObject( MAK::GriddedData::ServantPtr sp):myServantPtr(sp){}
51 
53  virtual ~DtGriddedDataServantObject() {}
54 
56  virtual const MAK::GriddedData::ServantPtr servant() const { return myServantPtr;}
57 
59  virtual MAK::GriddedData::ServantPtr servant() { return myServantPtr;}
60 
61  protected:
62  MAK::GriddedData::ServantPtr myServantPtr;
63  };
64 
65 public:
67  DtGriddedDataInterface(DtExerciseConn* exConn);
68 
70  virtual ~DtGriddedDataInterface();
71 
72 private:
74  DtGriddedDataInterface(const DtGriddedDataInterface &other);
75 
77  DtGriddedDataInterface& operator=(const DtGriddedDataInterface &other);
78 
79 public:
82  virtual DtTenaServantObject* createServantObject(DtExerciseConn* exConn);
83 
85  virtual void processServantCleanup(DtTenaServantObject* servantObject);
86 
88  virtual void subscribe();
89 
91  virtual bool needUpdate(const DtStateRepository& stateRep,
92  const DtStateRepository& asSeenByRemote,
93  bool useThresholding = true);
94 
96  virtual void decode(const DtTenaServantObject* servant,
97  DtStateRepository* stateRep)const;
98 
100  virtual void encode(DtTenaServantObject* servant,
101  const DtStateRepository* stateRep,
102  TENA::Time::Pointer timeForStamping,
103  bool forceUpdate = false);
104 
106  virtual DtReflectedObject *createReflectedObject()const;
107 
109  virtual void processAddition(MAK::GriddedData::ProxyPtr const &proxy);
110 
112  virtual void processUpdate(MAK::GriddedData::ProxyPtr const &proxy);
113 
115  virtual void processRemoval(MAK::GriddedData::ProxyPtr const &proxy);
116 
117 
118 protected:
120  virtual void decode(const MAK::GriddedData::ImmutablePublicationStatePtr pubStatePtr,
121  DtStateRepository* stateRep)const;
122 
124  virtual bool needGridAxisInfo(const DtGriddedDataRepository& stateRep,
125  const DtGriddedDataRepository& asSeenByRemote, int index) const;
126 
128  virtual bool needGridDataInfo(const DtGriddedDataRepository& stateRep,
129  const DtGriddedDataRepository& asSeenByRemote, int index) const;
130 protected:
131 
133  MAK::GriddedData::SubscriptionInfoPtr mySubscriptionInfoPtr;
134  typedef std::map<MAK::GriddedData::ProxyPtr, DtReflectedObject *> ProxyToRefObjMap;
135  ProxyToRefObjMap myRefGriddedDataMap;
136  ProxyToRefObjMap myGriddedDataWaitList;
137  TENA::GeocentricSpatialReferenceFrame::Pointer myGeocSrf;
138 };
139 
140 
141 #endif
142 #endif
143 
144 
145 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)