VR-Link API Documentation for HLA 1.3
tAggInterface.h
Go to the documentation of this file.
1 //********************************************************************
4 //********************************************************************
5 //********************************************************************
7 //********************************************************************
8 
9 #ifndef tAggInterface_H_
10 #define tAggInterface_H_
11 
12 #if DtTENA
13 
14 #include "makLromMapExport.h"
15 #include <vlutil/vlMachineTypes.h>
16 #include <vl/tObjectInterface.h>
17 #include <vl/aggregateSR.h>
18 #include <vl/globalObjDes.h>
19 
21 #include <MAK/Aggregate/ServantPtr.h>
22 #include <MAK/Aggregate/ProxyPtr.h>
23 #include <MAK/Aggregate/ImmutablePublicationStatePtr.h>
24 #include <MAK/Aggregate/SubscriptionInfoPtr.h>
25 #include <TENA/GeocentricSpatialReferenceFrame/Pointer.h>
26 
27 #include <map>
28 #include <list>
29 
33 
34 
36 //
42 class DT_DLL_MAKLROM DtAggregateInterface: public DtObjectInterface
43 {
44 protected:
45 
48  class DtAggregateServantObject : public DtTenaServantObject
49  {
50  public:
52  DtAggregateServantObject( MAK::Aggregate::ServantPtr sp):myServantPtr(sp){}
53 
55  virtual ~DtAggregateServantObject() {}
56 
58  virtual const MAK::Aggregate::ServantPtr servant() const { return myServantPtr;}
59 
61  virtual MAK::Aggregate::ServantPtr servant() { return myServantPtr;}
62 
63  protected:
64  MAK::Aggregate::ServantPtr myServantPtr;
65  };
66 
67 public:
68 
70  DtAggregateInterface(DtExerciseConn* exConn);
71 
73  virtual ~DtAggregateInterface();
74 
75 private:
76 
78  DtAggregateInterface(const DtAggregateInterface &other);
79 
81  DtAggregateInterface& operator=(const DtAggregateInterface &other);
82 
83 public:
86  virtual DtTenaServantObject* createServantObject(DtExerciseConn* exConn);
87 
89  virtual void processServantCleanup(DtTenaServantObject* servantObject);
90 
92  virtual void subscribe();
93 
95  virtual bool needUpdate(const DtStateRepository& stateRep,
96  const DtStateRepository& asSeenByRemote,
97  bool useThresholding = true);
98 
100  virtual void decode(const DtTenaServantObject* servant,
101  DtStateRepository* stateRep)const;
102 
104  virtual void encode(DtTenaServantObject* servant,
105  const DtStateRepository* stateRep,
106  TENA::Time::Pointer timeForStamping,
107  bool forceUpdate = false);
108 
110  virtual DtReflectedObject *createReflectedObject()const;
111 
113  virtual void processAddition(MAK::Aggregate::ProxyPtr const &proxy);
114 
116  virtual void processUpdate(MAK::Aggregate::ProxyPtr const &proxy);
117 
119  virtual void processRemoval(MAK::Aggregate::ProxyPtr const &proxy);
120 
121 
122 protected:
123 
125  virtual void decode(const MAK::Aggregate::ImmutablePublicationStatePtr pubStatePtr,
126  DtStateRepository* stateRep)const;
127 protected:
128 
130  MAK::Aggregate::SubscriptionInfoPtr mySubscriptionInfoPtr;
131  typedef std::map<MAK::Aggregate::ProxyPtr, DtReflectedObject *> ProxyToRefObjMap;
132  ProxyToRefObjMap myRefAggregateMap;
133  ProxyToRefObjMap myAggregateWaitList;
134  TENA::GeocentricSpatialReferenceFrame::Pointer myGeocSrf;
135 };
136 
137 
138 #endif
139 #endif
140 
141 
142 

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)