VR-Link API Documentation for DIS
tAmoInterface.h
Go to the documentation of this file.
1 //********************************************************************
4 //********************************************************************
5 //********************************************************************
7 //********************************************************************
8 #ifndef tAmoInterface_H_
9 #define tAmoInterface_H_
10 
14 
15 #if DtTENA
16 
17 #include "coLromMapExport.h"
18 #include <vlutil/vlMachineTypes.h>
19 #include <vl/tObjectInterface.h>
20 #include <vl/amoSR.h>
21 #include <vl/globalObjDes.h>
22 
23 #include <TENA/AMO/ServantPtr.h>
24 #include <TENA/AMO/ProxyPtr.h>
25 #include <TENA/AMO/ImmutablePublicationStatePtr.h>
26 #include <TENA/AMO/SubscriptionInfoPtr.h>
27 #include <TENA/UniqueID/Includes.h>
28 
29 #include <map>
30 #include <list>
31 
37 class DT_DLL_COMMONLROM DtAmoInterface: public DtObjectInterface
38 {
39 protected:
40 
43  class DtAmoServantObject : public DtTenaServantObject
44  {
45  public:
47  DtAmoServantObject( TENA::AMO::ServantPtr sp):myServantPtr(sp){}
48 
50  virtual ~DtAmoServantObject() {}
51 
53  virtual const TENA::AMO::ServantPtr servant() const { return myServantPtr;}
54 
56  virtual TENA::AMO::ServantPtr servant() { return myServantPtr;}
57 
58  protected:
59  TENA::AMO::ServantPtr myServantPtr;
60  };
61 
62 public:
64  DtAmoInterface(DtExerciseConn* exConn);
65 
67  virtual ~DtAmoInterface();
68 
69 private:
71  DtAmoInterface(const DtAmoInterface &other);
72 
74  DtAmoInterface& operator=(const DtAmoInterface &other);
75 
76 public:
77 
80  virtual DtTenaServantObject* createServantObject(DtExerciseConn* exConn);
81 
83  virtual void processServantCleanup(DtTenaServantObject* servantObject);
84 
86  virtual void subscribe();
87 
89  virtual bool needUpdate(const DtStateRepository& stateRep,
90  const DtStateRepository& asSeenByRemote,
91  bool useThresholding = true);
92 
94  virtual void decode(const DtTenaServantObject* servant,
95  DtStateRepository* stateRep)const;
96 
98  virtual void encode(DtTenaServantObject* servant,
99  const DtStateRepository* stateRep,
100  TENA::Time::Pointer timeForStamping,
101  bool forceUpdate = false);
102 
104  virtual DtReflectedObject *createReflectedObject()const;
105 
107  virtual void processAddition(TENA::AMO::ProxyPtr const &proxy);
108 
110  virtual void processUpdate(TENA::AMO::ProxyPtr const &proxy);
111 
113  virtual void processRemoval(TENA::AMO::ProxyPtr const &proxy);
114 
115 
116 protected:
118  virtual void decode(const TENA::AMO::ImmutablePublicationStatePtr pubStatePtr,
119  DtStateRepository* stateRep)const;
120 
121 protected:
122 
124  TENA::AMO::SubscriptionInfoPtr mySubscriptionInfoPtr;
125  typedef std::map<TENA::AMO::ProxyPtr, DtReflectedObject *> ProxyToRefObjMap;
126  ProxyToRefObjMap myRefAmoMap;
127  ProxyToRefObjMap myAmoWaitList;
128 };
129 
130 
131 #endif
132 #endif
133 
134 
135 

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)