VR-Exchange 2.2 API Documentation
rprBroker/libRprBroker/entityTrans.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <namespace.h>
13 #include "rprTrans.h"
14 #include "timerSlots.h"
15 #include <vl/entityPub.h>
16 #include <vl/reflEntList.h>
17 #include <QtCore/QTimer>
18 #include <map>
19 
20 class DtReflectedEntity;
21 class DtReflectedEntityList;
22 class DtEntityStateRepository;
23 
24 #define ENTITY_TEMPLATE_ARGS \
25  DtPortalEntity, DtPortalReflectedEntity, \
26  DtReflectedEntity, DtReflectedEntityList, \
27  DtEntityStateRepository, DtEntityPublisher
28 
29 namespace MAKVrExchange
30 {
31 
32  class DtPortalEntity;
33 
34  namespace DtRprBroker
35  {
36 
39  template <>
40  DT_DLL_RPRBROKER DtEntityPublisher*
42  const DtPortalReflectedEntity* refObj, const DtString& name );
43 
44 
47  class DT_DLL_RPRBROKER DtEntityTranslator
48  : public DtRprObjectTranslator<ENTITY_TEMPLATE_ARGS>
49  {
50  public:
51 
53  Dt_DEF_TRANSLATOR_NAME( "Entity State" );
54 
57 
59  virtual ~DtEntityTranslator();
60 
63  virtual void forceUpdateAll();
64 
66  virtual DtPortalEntity* translate( DtPortalEntity* destination,
67  const DtEntityStateRepository& source, const DtReflectedEntity& refObj );
68 
70  virtual DtEntityStateRepository* translate(
71  DtEntityStateRepository* destination, const DtPortalEntity& source,
72  const DtPortalReflectedEntity& refObj );
73 
74  protected:
75 
78  virtual void updateHlaBrokerObject( DtBrokerObject* brokerObj,
79  const DtEntityStateRepository& sr );
80 
83  virtual void updatePortalBrokerObject( DtBrokerObject* brokerObj,
84  const DtPortalEntity& sr );
85 
88  virtual void updateFilteredState( DtBrokerObject* brokerObj,
89  DtPortalEntityPublisher* publisher, DtReflectedEntity* refObj );
90 
94  virtual DtString hlaObjectName( const DtPortalReflectedEntity* refObj );
95 
98  virtual void fillOutgoingIds( DtEntityPublisher* publisher,
99  const DtString& name );
100 
103  virtual void createHlaPublisher( DtBrokerObject* brokerObject );
104 
108  virtual bool isDiscoverable( const DtBrokerObject* brokerObj,
109  const DtPortalReflectedEntity* refObj ) const;
110 
112  virtual void syncHlaDeadReconedValues( DtBrokerObject* brokerObject );
113 
115  virtual void syncHlaArtParts( DtBrokerObject* brokerObject );
116 
118  virtual void syncPortalDeadReconedValues( DtBrokerObject* brokerObject );
119 
120  protected:
121 
124 
125  };
126 
127  }
128 }

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)