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>
◆ DtVreEventProcessor()
| makVre::DtVreEventProcessor::DtVreEventProcessor |
( |
makVrv::DtDe & | de | ) |
|
Constructor.
- Parameters
-
| de | Reference 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.
◆ 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
-
| source | Pointer 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()
Handles messages to add a channel association.
- Parameters
-
| msg | Pointer 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()
Handles messages to remove a channel association.
- Parameters
-
| msg | Pointer 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
-
| channelManager | Pointer to the channel manager (unused) |
| channel | Pointer to the channel being removed |
Handles cleanup when a channel is being removed, ensuring any associations involving that channel are also removed.
◆ 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: