VR-Exchange 2.7 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tenaBroker/tenaBroker/entityTranslator.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 #include <vlTena/entityPublisher.h>
16 
17 #include <vl/entityStateRepository.h>
18 
19 class DtReflectedEntity;
20 
21 #define ENTITY_TEMPLATE_ARGS \
22  DtPortalEntity, DtPortalReflectedEntity, \
23  DtReflectedEntity, DtReflectedEntityList, \
24  DtEntityStateRepository, DtEntityPublisher
25 
26 namespace MAKVrExchange
27 {
28 
29  namespace DtTenaBroker
30  {
31 
34  template <>
35  DT_DLL_TENABROKER DtEntityIdentifier
37  const DtPortalReflectedEntity* refObj, const DtString& identifier );
38 
41  template <>
42  DT_DLL_TENABROKER DtObjectPublisher*
44  const DtPortalReflectedEntity* refObj, const DtEntityIdentifier& name );
45 
46 
50  : public DtBaseEntityTranslator<ENTITY_TEMPLATE_ARGS>
51  {
52  public:
53 
55  Dt_DEF_TRANSLATOR_NAME( "Entity State" );
56 
58  DtEntityTranslator( DtBroker* broker );
59 
61  virtual ~DtEntityTranslator();
62 
63  protected:
64 
66  virtual bool isThrottlingRateOk( DtEntityPublisher* publisher,
67  DtBrokerObject* brokerObj );
68 
71  virtual bool isTenaPublishable( DtBrokerObject* brokerObj,
72  const DtPortalReflectedEntity* refObj );
73 
75  virtual DtString tenaObjectName( const DtPortalReflectedEntity* refObj ) const;
76 
79  virtual void createTenaPublisher( DtBrokerObject* brokerObj );
80 
82  virtual void updateTenaBrokerObject( DtBrokerObject* brokerObj,
83  const DtEntityStateRepository& sr );
84 
86  virtual void updatePortalBrokerObject( DtBrokerObject* brokerObj,
87  const DtPortalEntity& sr );
88 
90  virtual void updateFilteredState( DtBrokerObject* brokerObj,
91  DtPortalEntityPublisher* publisher, DtReflectedEntity* refObj );
92 
94  virtual DtPortalEntity* translate( DtPortalEntity* destination,
95  const DtEntityStateRepository& source, const DtReflectedEntity& refObj );
96 
98  virtual void syncPortalDeadReckonedValues( DtPortalEntity& destination,
99  const DtEntityStateRepository& source );
100 
102  virtual DtEntityStateRepository* translate( DtEntityStateRepository* destination,
103  const DtPortalEntity& source, const DtPortalReflectedEntity& refObj );
104 
106  virtual void syncTenaDeadReckonedValues( DtEntityStateRepository& destination,
107  const DtPortalEntity& source );
108 
109  };
110 
111  }
112 }
#define DT_DLL_TENABROKER
Definition: brokers/tenaBroker/tenaBroker/dllExport.h:26
Provides Entity State object translation between TENA and the VR-Exchange Portal. ...
Definition: tenaBroker/tenaBroker/entityTranslator.h:49
Provides container to hold pointers to Protocol/Portal objects.
Definition: brokerObject.h:24
Contains the DtReflectedEntityList class declaration.
A simple template class to hold different types of State Repositories.
Definition: pObjectPublisher.h:68
Base class for all broker objects.
Definition: broker.h:53
A template to create reflected object types for each type of object message.
Definition: pReflectedObject.h:58
DtPortalReflectedObjectTemplate< DtPortalEntity > DtPortalReflectedEntity
An Entity Reflected Object template instance.
Definition: pReflectedObjectTypes.h:84
#define Dt_DEF_TRANSLATOR_NAME(strname)
Definition: translator.h:16
virtual DtObjectPublisher * instantiateTenaPublisher(const T_PortalReflectedObject *refObj, const DtEntityIdentifier &name)
Instantiates the publisher for the given reflected object.
virtual DtEntityIdentifier mapIdentifier(const T_PortalReflectedObject *refObj, const DtString &identifier)
Maps the reflected object&#39;s global or entity identifier to a TENA id.
Base class for entity translators.
Definition: baseEntityTranslator.h:44
Messages which represent Entities with state.
Definition: pEntity.h:26

Document ID: Generated on Mon Apr 19 15:55:22 EDT 2021 from SVN revision 227909
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)