15 #pragma warning( disable : 4661 )
34 #define DIS_TEMPLATE_LIST \
36 < class T_PortalObject \
37 , class T_PortalReflectedObject \
38 , class T_DisReflectedObject \
39 , class T_DisReflectedObjectList \
40 , class T_DisObjectStateRepository \
41 , class T_DisObjectPublisher>
43 #define DIS_TEMPLATE_FUNCTION \
44 T_PortalObject, T_PortalReflectedObject, \
45 T_DisReflectedObject, T_DisReflectedObjectList, \
46 T_DisObjectStateRepository, T_DisObjectPublisher
49 class DtObjectPublisher;
50 class DtStateRepository;
51 class DtReflectedObject;
53 namespace MAKVrExchange
56 class DtRequestTranslationDiagnosticMessage;
189 const T_PortalReflectedObject* refObj );
244 virtual DtEntityIdentifier
mapIdentifier(
const T_PortalReflectedObject* refObj,
248 virtual DtEntityIdentifier
mapObjectId(
const DtEntityIdentifier& identifier );
259 const T_PortalReflectedObject* refObj,
const DtEntityIdentifier&
name );
266 const T_PortalReflectedObject& refObj,
286 const T_DisReflectedObject& refObj,
317 const T_DisObjectStateRepository& sr );
319 const T_PortalObject& sr );
333 T_DisReflectedObject* refObj );
339 const T_PortalReflectedObject* refObj );
346 const DtVector& location );
350 const DtVector& location );
379 const DtPortalObject& incoming,
const DtStateRepository& outgoing )
const;
383 const DtStateRepository& incoming,
const DtPortalObject& outgoing )
const;
392 const DtStateRepository& outgoing );
412 virtual T_PortalObject*
translate( T_PortalObject* destination,
413 const T_DisObjectStateRepository& source,
414 const T_DisReflectedObject& refObj ) = 0;
418 virtual T_DisObjectStateRepository*
translate(
419 T_DisObjectStateRepository* destination,
const T_PortalObject& source,
420 const T_PortalReflectedObject& refObj ) = 0;
472 template <
class PortalInterType,
class DisInterType>
537 virtual PortalInterType*
translate( PortalInterType* destination,
538 const DisInterType& source ) = 0;
542 virtual DisInterType*
translate( DisInterType* destination,
543 const PortalInterType& source ) = 0;
547 const DtInteraction& outgoing )
const;
585 #define _disTranslator_INL_
586 #include <disBroker/disTranslator.inl>
587 #undef _disTranslator_INL_
virtual void performPortalDebugging(const DtString &objectName)
Build and send debugging message for GUI debugging.
virtual bool performPortalGlobalIdMapping(const DtPortalObjectPublisherTemplate< T_PortalObject > *publisher, const T_DisReflectedObject &refObj, DtGlobalIdMapper::ObjectType type=DtGlobalIdMapper::EntityType, int systemId=DtGlobalIdMapper::NoSystemId, int beamId=DtGlobalIdMapper::NoBeamId)
Maps the publisher's global ID to the reflected object's identifier.
ObjectType
Definition: disBroker/disBroker/globalIdMapper.h:65
TransDebugObjectNamesSet myTransDebugNames
Definition: disTranslator.h:451
Contains the templated DtPortalReflectedObjectManager types.
Base class for all DIS object translators.
Definition: disTranslator.h:86
virtual void callObjectRemoveCallbacks(const DtBrokerObject *obj)
virtual void tick()
Checks the waitlist for postponed interaction discoveries.
virtual T_PortalObject * translate(T_PortalObject *destination, const T_DisObjectStateRepository &source, const T_DisReflectedObject &refObj)=0
Translates the given DIS object to a Portal object (abstract).
Implements a DtBroker for the DIS Protocol.
Definition: disBroker.h:38
static void requestTransDiagCb(const DtRequestTranslationDiagnosticMessage &msg, void *usr)
Static translation diagnostic request callback.
virtual void enableReflectTranslator(bool enabled)
Enables or disables the translator reflecting objects from DIS.
virtual void callObjectUpdateCallbacks(const DtBrokerObject *obj)
DtDisObjectTranslator(DtBroker *broker, const DtString &name, DtPortalMessageKind kind)
CTOR.
virtual void deletePortalPublisher(DtBrokerObject *brokerObj)
Used to request that brokers send translation diagnostic reports.
Definition: requestTransDiagnosticMessage.h:21
#define DIS_TEMPLATE_LIST
Definition: disTranslator.h:34
virtual void tick()
Ticks the publishers for the translated DIS and Portal objects.
Definition: disBroker/disBroker/globalIdMapper.h:67
Definition: disBroker/disBroker/globalIdMapper.h:63
This callback is regarding an object Discovery.
Definition: disTranslator.h:96
virtual DtDisBroker * disBroker()
virtual void printIncomingOutgoingInteractions(const DtPortalInteraction &incoming, const DtInteraction &outgoing) const
Prints incoming and outgoing interactions (before and after translation) to DtInfo.
static void disObjectAddedCb(T_DisReflectedObject *refObj, void *usr)
Callback called when an object is added to the reflected list.
static void receiveDisInteraction(DisInterType *inter, void *usr)
Provides container to hold pointers to Protocol/Portal objects.
Definition: brokerObject.h:24
UpdateType
Enums used with the ObjectAction callback.
Definition: disTranslator.h:92
bool operator!=(const DtDisInteractionTranslator &rightOperand) const
Private Comparison Operator (Not implemented – Do Not Compare).
virtual void discoverDisObject(T_DisReflectedObject &obj)
virtual bool isPortalDiscoverable(const DtPortalReflectedObject *refObj)
Creates broker object for reflected Portal object.
virtual DtObjectPublisher * instantiateDisPublisher(const T_PortalReflectedObject *refObj, const DtEntityIdentifier &name)
Instantiates the publisher for the given reflected object.
virtual void enableReflectTranslator(bool enabled)
Enables or disables the translator reflecting from DIS.
std::map< const DtPortalReflectedObject *, DtBrokerObject * > PortalToDisReflectedMap
Definition: disTranslator.h:445
static void disObjectUpdatedCb(T_DisReflectedObject *refObj, void *usr)
Callback called when an object in the reflected list is updated.
virtual void shutdown()
Performs any virtual shutdown logic prior to deletion.
virtual void forceUpdateAll()
Tells all publishers to send an update next tick.
DtPortalObject are messages which also serve as state repositories for simulated objects.
Definition: pObject.h:23
Definition: disBroker/disBroker/globalIdMapper.h:62
virtual ~DtDisObjectTranslator()
Virtual DTOR.
T_DisReflectedObjectList * myDisReflectedList
Definition: disTranslator.h:438
A simple template class to hold different types of State Repositories.
Definition: pObjectPublisher.h:68
virtual DtEntityIdentifier mapIdentifier(const T_PortalReflectedObject *refObj, const DtString &identifier)
Maps the reflected object's global or entity identifier to a DIS id.
DtBaseInteractionTranslator are responsible for translating messages for things that do not have stat...
Definition: baseInteractionTranslator.h:60
std::pair< DtTime, bool > LocationFilteringInfo
Definition: disTranslator.h:440
PortalToDisReflectedMap myDisPublisherMap
Definition: disTranslator.h:448
Definition: disTranslator.h:95
An abstract interface for reflected objects.
Definition: pReflectedObject.h:31
virtual DtEntityIdentifier mapObjectId(const DtEntityIdentifier &identifier)
Maps the entity IDs with respect to the remapDisIds setting.
DtBroker * broker() const
Broker Accessor.
Definition: translator.h:80
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
virtual void createPortalPublisher(DtBrokerObject *brokerObj)
Determines the name to use for the given reflected object.
Definition: disTranslator.h:94
bool operator==(const DtDisObjectTranslator &rightOperand) const
Private Comparison Operator (Not implemented – Do Not Compare).
bool operator!=(const DtDisObjectTranslator &rightOperand) const
Private Comparison Operator (Not implemented – Do Not Compare).
Contains the DtInteractionTranslator and DtBaseInteractionTranslator class declarations.
virtual void deleteDisPublisher(DtBrokerObject *brokerObj)
DtDisObjectTranslator< DIS_TEMPLATE_FUNCTION > ParentClass
Typedef for the templated class type.
Definition: disTranslator.h:101
virtual bool testGlobalIdMapping(const DtString &idName, const DtString &id)
Checks whether a valid global id mapping exists for the given ID.
virtual DtString disObjectName(const T_PortalReflectedObject *refObj) const
Determines the name to use for the given reflected object.
static bool disDiscoveryCriteria(DtReflectedObject *refObj, void *usr)
The DIS reflected list's discovery condition callback.
virtual ~DtDisInteractionTranslator()
Virtual DTOR.
virtual void discoverPortalObject(const T_PortalReflectedObject &obj)
virtual DtDisBroker * disBroker()
virtual void updateFilteredState(DtBrokerObject *brokerObj, DtPortalObjectPublisherTemplate< T_PortalObject > *publisher, T_DisReflectedObject *refObj)
Ensures the given object is properly filtered.
std::map< const DtReflectedObject *, DtBrokerObject * > DisToPortalReflectedMap
Definition: disTranslator.h:444
virtual bool isDisDiscoverable(const DtReflectedObject *refObj)
Creates broker object for reflected DIS object.
virtual bool isDisPublishable(DtBrokerObject *brokerObj, const T_PortalReflectedObject *refObj)
Tests whether the object is publishable as a DIS object.
std::set< DtString > TransDebugObjectNamesSet
Definition: disTranslator.h:450
Base class for all broker objects.
Definition: broker.h:58
DtBaseObjectTranslators provide common logic for translating objects.
Definition: baseObjectTranslator.h:106
virtual void shutdown()
Performs any virtual shutdown logic prior to deletion.
virtual DtBrokerObject * findBrokerObject(const DtReflectedObject *refObj)
Find the broker object for the given reflected object.
Contains the DtObjectTranslator and DtBaseObjectTranslator class declarations.
virtual void printIncomingOutgoingStateReps(const DtPortalObject &incoming, const DtStateRepository &outgoing) const
Print debug info for the given state reps.
virtual bool performDisGlobalIdMapping(const DtObjectPublisher *publisher, const T_PortalReflectedObject &refObj, DtGlobalIdMapper::ObjectType type=DtGlobalIdMapper::EntityType, int systemId=DtGlobalIdMapper::NoSystemId, int beamId=DtGlobalIdMapper::NoBeamId)
Maps the publisher's global ID to the reflected object's identifier.
virtual PortalInterType * translate(PortalInterType *destination, const DisInterType &source)=0
Translates the given DIS interaction to a Portal interaction (abstract).
virtual unsigned int numObjects() const
Returns the current number of objects.
virtual bool filterLocation(const DtReflectedObject &refObj, const DtVector &location)
Checks location filtering and returns the filtered state.
virtual void initializeDisCallbacks()
virtual void receiveDisUpdate(T_DisReflectedObject &obj)
virtual void createInteraction(const PortalInterType &inter)
This function is required for a translator to correctly publish objects from the portal to your proto...
DtDisInteractionTranslator(DtBroker *broker, const DtString &name, DtPortalMessageKind kind)
CTOR.
Template Instances of DtPortalObjectPublisherTemplate.
InteractionWaitList myInteractionWaitList
Definition: disTranslator.h:578
DisToPortalReflectedMap myPortalPublisherMap
Definition: disTranslator.h:447
virtual void createDisPublisher(DtBrokerObject *brokerObj)
Determines the name to use for the given reflected object.
virtual void createPortalInteraction(const DisInterType &inter)
DtDisObjectTranslator & operator=(const DtDisObjectTranslator &other)
Private Assignment Operator (Not implemented – Do Not Copy).
DtDisInteractionTranslator & operator=(const DtDisInteractionTranslator &other)
Private Assignment Operator (Not implemented – Do Not Copy).
virtual void receivePortalUpdate(const T_PortalReflectedObject &obj)
virtual DtBrokerObject * createBrokerObject(const DtReflectedObject *refObj)
Creates a broker object for the given reflected object.
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23
virtual void removeDisObject(const DtReflectedObject &refObj)
virtual void callObjectDiscoverCallbacks(const DtBrokerObject *obj)
virtual void printDumpGuiToText(const DtBrokerObject &brokerObj, UpdateType ut) const
virtual DtString portalObjectName(const T_DisReflectedObject *refObj) const
Determines the name to use for the given reflected object.
static void disObjectDeletedCb(T_DisReflectedObject *refObj, void *usr)
Callback called when an object in the reflected list is deleted.
virtual void removePortalObject(const T_PortalReflectedObject &refObj)
LocationFilteringMap myLocationFilteringMap
Definition: disTranslator.h:442
Base class for all DIS interaction translators.
Definition: disTranslator.h:473
virtual void updateDisBrokerObject(DtBrokerObject *brokerObj, const T_DisObjectStateRepository &sr)
virtual void initializeDisCallbacks()
DtBaseObjectTranslator< T_PortalObject, T_PortalReflectedObject > BaseTranslatorClass
Typedef for the templated base class type.
Definition: disTranslator.h:104
std::vector< PortalInterType > InteractionWaitList
Definition: disTranslator.h:577
virtual void removeDisCallbacks()
bool operator==(const DtDisInteractionTranslator &rightOperand) const
Private Comparison Operator (Not implemented – Do Not Compare).
virtual void updatePortalBrokerObject(DtBrokerObject *brokerObj, const T_PortalObject &sr)
virtual void receivePortalInteraction(const PortalInterType &inter)
Portal interaction processing callback.
virtual DtBrokerObject * releaseBrokerObject(const DtReflectedObject *refObj)
Find the broker object for the given reflected object.
std::map< const DtReflectedObject *, LocationFilteringInfo > LocationFilteringMap
Definition: disTranslator.h:441
virtual DtString name() const
Accessor for the translator's name.
virtual void removeDisCallbacks()
DtDisInteractionTranslator< PortalInterType, DisInterType > ParentClass
Typedef for the templated class type.
Definition: disTranslator.h:479