VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreEventProcessor Class Reference

Detailed Description

DtVreEventProcessor extends the base event processor interface to provide the ability to redirect events from one display channel to another. This is useful in scenarios where multiple channels need coordinated behavior or when events need to be processed by a different channel than the one they were originally targeted for. The processor maintains a mapping of channel associations and routes events accordingly.

#include <vreEventProcessor.h>

Inheritance diagram for makVre::DtVreEventProcessor:
[legend]

Public Member Functions

 DtVreEventProcessor (makVrv::DtDe &de)
 
virtual ~DtVreEventProcessor () override
 
virtual bool init ()
 
virtual void shutdown ()
 
virtual makVrv::DtChannel * targetChannel (makVrv::DtChannel *source)
 

Protected Member Functions

virtual DtVreMessageResult handleAddChannelEventProcessorAssociation (DtVreMessage *msg)
 
virtual DtVreMessageResult handleRemoveChannelEventProcessorAssociation (DtVreMessage *msg)
 
virtual void slot_channelToBeRemoved (makVrv::DtChannelManager *, makVrv::DtChannel *channel)
 

Protected Attributes

makVrv::DtDe & myDe
 
std::map< makVrv::DtChannel *, makVrv::DtChannel * > myChannelAssociations
 

Constructor & Destructor Documentation

◆ DtVreEventProcessor()

makVre::DtVreEventProcessor::DtVreEventProcessor ( makVrv::DtDe & de)

Constructor.

Parameters
deReference to the display engine

Creates a new event processor associated with the given display engine.

References de().

◆ ~DtVreEventProcessor()

virtual makVre::DtVreEventProcessor::~DtVreEventProcessor ( )
overridevirtual

Virtual destructor.

Ensures proper cleanup of the event processor resources.

Member Function Documentation

◆ init()

virtual bool makVre::DtVreEventProcessor::init ( )
virtual

Initializes the event processor.

Returns
True if initialization succeeded, false otherwise

Sets up the event processor, including registering message handlers and connecting to signals for channel management.

◆ shutdown()

virtual void makVre::DtVreEventProcessor::shutdown ( )
virtual

Shuts down the event processor.

Cleans up resources and disconnects from signals and message handlers. This should be called when the event processor is no longer needed.

◆ targetChannel()

virtual makVrv::DtChannel * makVre::DtVreEventProcessor::targetChannel ( makVrv::DtChannel * source)
virtual

Gets the target channel for a given source channel.

Parameters
sourcePointer to the source channel
Returns
Pointer to the target channel, or the source channel if no association exists

Looks up the target channel associated with the given source channel. If no association exists, returns the source channel unchanged.

◆ handleAddChannelEventProcessorAssociation()

virtual DtVreMessageResult makVre::DtVreEventProcessor::handleAddChannelEventProcessorAssociation ( DtVreMessage * msg)
protectedvirtual

Handles messages to add a channel association.

Parameters
msgPointer to the association message
Returns
Message handling result

Processes messages requesting to add an association between two channels, updating the channel association map accordingly.

◆ handleRemoveChannelEventProcessorAssociation()

virtual DtVreMessageResult makVre::DtVreEventProcessor::handleRemoveChannelEventProcessorAssociation ( DtVreMessage * msg)
protectedvirtual

Handles messages to remove a channel association.

Parameters
msgPointer to the disassociation message
Returns
Message handling result

Processes messages requesting to remove an association between two channels, removing the entry from the channel association map.

◆ slot_channelToBeRemoved()

virtual void makVre::DtVreEventProcessor::slot_channelToBeRemoved ( makVrv::DtChannelManager * ,
makVrv::DtChannel * channel )
protectedvirtual

Slot called when a channel is about to be removed.

Parameters
channelManagerPointer to the channel manager (unused)
channelPointer to the channel being removed

Handles cleanup when a channel is being removed, ensuring any associations involving that channel are also removed.

Member Data Documentation

◆ myDe

makVrv::DtDe& makVre::DtVreEventProcessor::myDe
protected

Reference to the display engine.

Provides access to display channels and other visualization resources.

◆ myChannelAssociations

std::map<makVrv::DtChannel*, makVrv::DtChannel*> makVre::DtVreEventProcessor::myChannelAssociations
protected

Map of source channels to destination channels.

Maintains the associations between source and target channels. When an event targets a source channel, it can be redirected to the associated target channel.


The documentation for this class was generated from the following file: