VR-Exchange 2.10 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
amoInterface.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2014 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #if DtTENA
11 
12 #pragma once
13 
15 #include <vl/globalObjectDesignator.h>
17 #include <vlTena/objectInterface.h>
18 
19 #include <TENA/AMO/ImmutablePublicationStatePtr.h>
20 #include <TENA/AMO/SubscriptionInfoPtr.h>
21 #include <TENA/UniqueID/Includes.h>
22 #include <TENA/AMO/ServantPtr.h>
23 #include <TENA/AMO/ProxyPtr.h>
24 
25 #include <vlutil/vlMachineTypes.h>
26 
27 #include <list>
28 #include <map>
29 
30 namespace MAKVrExchange
31 {
32 
33  namespace DtTenaBroker
34  {
35 
41  class DT_DLL_COMMONLROM DtAmoInterface: public DtObjectInterface
42  {
43  protected:
44 
47  class DtAmoServantObject : public DtTenaServantObject
48  {
49  public:
51  DtAmoServantObject( TENA::AMO::ServantPtr sp):myServantPtr(sp){}
52 
54  virtual ~DtAmoServantObject() {}
55 
57  virtual const TENA::AMO::ServantPtr servant() const { return myServantPtr;}
58 
60  virtual TENA::AMO::ServantPtr servant() { return myServantPtr;}
61 
62  protected:
63  TENA::AMO::ServantPtr myServantPtr;
64  };
65 
66  public:
67 
69  DtAmoInterface(DtExerciseConn* exConn);
70 
72  virtual ~DtAmoInterface();
73 
76  virtual DtTenaServantObject* createServantObject(DtExerciseConn* exConn);
77 
79  virtual void processServantCleanup(DtTenaServantObject* servantObject);
80 
82  virtual void subscribe();
83 
85  virtual bool needUpdate(const DtStateRepository& stateRep,
86  const DtStateRepository& asSeenByRemote,
87  bool useThresholding = true);
88 
90  virtual void decode(const DtTenaServantObject* servant,
91  DtStateRepository* stateRep)const;
92 
94  virtual void encode(DtTenaServantObject* servant,
95  const DtStateRepository* stateRep,
96  TENA::Time::Pointer timeForStamping,
97  bool forceUpdate = false);
98 
100  virtual DtReflectedObject *createReflectedObject()const;
101 
103  virtual void processAddition(TENA::AMO::ProxyPtr const &proxy);
104 
106  virtual void processUpdate(TENA::AMO::ProxyPtr const &proxy);
107 
109  virtual void processRemoval(TENA::AMO::ProxyPtr const &proxy);
110 
111  protected:
112 
114  virtual void decode( const TENA::AMO::ImmutablePublicationStatePtr pubStatePtr,
115  DtStateRepository* stateRep ) const;
116 
117  private:
118 
120  DtAmoInterface(const DtAmoInterface &other);
121 
123  DtAmoInterface& operator=(const DtAmoInterface &other);
124 
125  protected:
126 
128  TENA::AMO::SubscriptionInfoPtr mySubscriptionInfoPtr;
129  typedef std::map<TENA::AMO::ProxyPtr,DtReflectedObject*> ProxyToRefObjMap;
130  ProxyToRefObjMap myRefAmoMap;
131  ProxyToRefObjMap myAmoWaitList;
132 
133  };
134 
135  }
136 }
137 
138 #endif // DtTENA
#define DT_DLL_COMMONLROM
Definition: coLromMapExport.h:26
Contains the DtTenaServantObject and DtObjectInterface class declarations.
Contains the TENA DtAmoStateRepository class declaration.
Contains the DLL export macro.

Document ID: Generated on Mon May 25 18:45:12 EDT 2026 from SVN revision 289111
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)