VR-Exchange 2.6 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aggregateInterface.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #if DtTENA
11 
12 #pragma once
13 
14 #include <vlutil/vlMachineTypes.h>
16 #include <vlTena/objectInterface.h>
17 #include <vl/globalObjectDesignator.h>
18 #include <vl/aggregateStateRepository.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 
30 namespace MAKVrExchange
31 {
32 
33  namespace DtTenaBroker
34  {
35 
42  class DT_DLL_MAKLROM DtAggregateInterface: public DtObjectInterface
43  {
44  protected:
45 
48  class DtAggregateServantObject : public DtTenaServantObject
49  {
50  public:
51 
53  DtAggregateServantObject( MAK::Aggregate::ServantPtr sp):myServantPtr(sp){}
54 
56  virtual ~DtAggregateServantObject() {}
57 
59  virtual const MAK::Aggregate::ServantPtr servant() const { return myServantPtr;}
60 
62  virtual MAK::Aggregate::ServantPtr servant() { return myServantPtr;}
63 
64  protected:
65 
66  MAK::Aggregate::ServantPtr myServantPtr;
67 
68  };
69 
70  public:
71 
73  DtAggregateInterface(DtExerciseConn* exConn);
74 
76  virtual ~DtAggregateInterface();
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(MAK::Aggregate::ProxyPtr const &proxy);
108 
110  virtual void processUpdate(MAK::Aggregate::ProxyPtr const &proxy);
111 
113  virtual void processRemoval(MAK::Aggregate::ProxyPtr const &proxy);
114 
115  protected:
116 
118  virtual void decode( const MAK::Aggregate::ImmutablePublicationStatePtr pubStatePtr,
119  DtStateRepository* stateRep ) const;
120 
121  private:
122 
124  DtAggregateInterface(const DtAggregateInterface &other);
125 
127  DtAggregateInterface& operator=(const DtAggregateInterface &other);
128 
129  protected:
130 
132  MAK::Aggregate::SubscriptionInfoPtr mySubscriptionInfoPtr;
133  typedef std::map<MAK::Aggregate::ProxyPtr,DtReflectedObject*> ProxyToRefObjMap;
134  ProxyToRefObjMap myRefAggregateMap;
135  ProxyToRefObjMap myAggregateWaitList;
136  TENA::GeocentricSpatialReferenceFrame::Pointer myGeocSrf;
137 
138  };
139 
140  }
141 }
142 
143 #endif // DtTENA

Document ID: Generated on Wed Jan 30 18:15:18 EST 2019 from SVN revision 195534
Copyright © 2005-2019 VT MÄK. All Rights Reserved (www.mak.com)