VR-Exchange 2.9 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
disBroker/disBroker/linearObjectTranslator.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
13 #include <vl/linearObjectPublisher.h>
14 #include <vl/reflectedLinearObjectList.h>
15 
16 class DtReflectedLinearObject;
17 class DtLinearObjectRepository;
18 
19 #define LINEAR_OBJECT_TEMPLATE_ARGS \
20  DtPortalLinearObject, DtPortalReflectedLinearObject, \
21  DtReflectedLinearObject, DtReflectedLinearObjectList, \
22  DtLinearObjectRepository, DtLinearObjectPublisher
23 
24 namespace MAKVrExchange
25 {
26 
27  class DtPortalLinearObject;
28 
29  namespace DtDisBroker
30  {
31 
32  template <>
33  DT_DLL_DISBROKER DtEntityIdentifier
35  const DtPortalReflectedLinearObject* refObj, const DtString& identifier );
36 
37  template <>
38  DT_DLL_DISBROKER DtObjectPublisher*
40  const DtPortalReflectedLinearObject* refObj, const DtEntityIdentifier& name );
41 
42 
46  : public DtDisObjectTranslator<LINEAR_OBJECT_TEMPLATE_ARGS>
47  {
48  public:
49 
51  Dt_DEF_TRANSLATOR_NAME( "Linear Object" );
52 
54  DtLinearObjectTranslator( DtBroker* disBroker );
55 
57  virtual ~DtLinearObjectTranslator();
58 
59  protected:
60 
63  virtual bool isDisPublishable( DtBrokerObject* brokerObj,
64  const DtPortalReflectedLinearObject& refObj ) const;
65 
67  virtual DtString disObjectName( const DtPortalReflectedLinearObject* refObj ) const;
68 
70  virtual void updateDisBrokerObject( DtBrokerObject* brokerObj,
71  const DtLinearObjectRepository& sr );
72 
75  virtual DtString portalObjectName( const DtReflectedLinearObject* refObj ) const;
76 
78  virtual void updatePortalBrokerObject( DtBrokerObject* brokerObj,
79  const DtPortalLinearObject& sr );
80 
81  // Translate from PDU to Portal.
82  virtual DtPortalLinearObject* translate( DtPortalLinearObject* dest,
83  const DtLinearObjectRepository& src, const DtReflectedLinearObject& refObj );
84 
85  // Translate segment data from PDU to Portal.
86  DtLinearSegmentData* translate( DtLinearSegmentData* dest,
87  const DtLinearSegmentRecord& src );
88 
89  // Translate from Portal to PDU.
90  virtual DtLinearObjectRepository* translate( DtLinearObjectRepository* dest,
91  const DtPortalLinearObject& src, const DtPortalReflectedLinearObject& refObj );
92 
93  // Translate segment data from Portal to PDU.
94  DtLinearSegmentRecord* translate( DtLinearSegmentRecord* dest,
95  const DtLinearSegmentData& src );
96 
97  };
98 
99  }
100 }
Base class for all DIS object translators.
Definition: disTranslator.h:86
Contains the DtDisObjectTranslator and DtDisInteractionTranslator base classes.
Represents Linear Segment Parameter Objects.
Definition: linearSegmentData.h:38
Provides container to hold pointers to Protocol/Portal objects.
Definition: brokerObject.h:24
virtual DtObjectPublisher * instantiateDisPublisher(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 DIS id.
Base class for all broker objects.
Definition: broker.h:58
A template to create reflected object types for each type of object message.
Definition: pReflectedObject.h:58
Portal linear object for sending linear object types.
Definition: pLinearObject.h:20
#define Dt_DEF_TRANSLATOR_NAME(strname)
Definition: translator.h:16
DtPortalReflectedObjectTemplate< DtPortalLinearObject > DtPortalReflectedLinearObject
A Linear Object template instance.
Definition: pReflectedObjectTypes.h:111
#define DT_DLL_DISBROKER
Definition: brokers/disBroker/disBroker/dllExport.h:20
Provides Linear Object translation between DIS and the Portal.
Definition: disBroker/disBroker/linearObjectTranslator.h:45

Document ID: Generated on Tue Jun 25 16:45:35 EDT 2024 from SVN revision 267383
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)