VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
DtInteractionSender Class Reference

DtInteractionSender - Orchestrates all interaction-type sub-senders for one WebSocket connection.

Owns a list of DtIInteractionTypeSender instances (one per interaction category, e.g. fire/detonation). Each sub-sender also owns a DtIInteractionEventSource. Before the interaction processor is added to DtVrfManager, call registerEventSourcesWith() to transfer those sources into the processor.

On each timer tick, sendPendingInteractions() collects filtered records from every sub-sender and, if any are present, emits a single InteractionMultiple JSON message to the client.

To add a new interaction type: construct and push_back a new sub-sender in the constructor. No other code in this class changes.

Public Member Functions

 DtInteractionSender ()
 
 ~DtInteractionSender ()=default
 
void registerEventSourcesWith (DtInteractionProcessor &proc)
 
void sendPendingInteractions (const oatpp::websocket::WebSocket &conn, DtWebLvcClientSession &session)
 

Private Attributes

std::vector< std::unique_ptr
< DtIInteractionTypeSender > > 
myTypeSenders
 

Constructor & Destructor Documentation

DtInteractionSender::DtInteractionSender ( )
DtInteractionSender::~DtInteractionSender ( )
default

Member Function Documentation

void DtInteractionSender::registerEventSourcesWith ( DtInteractionProcessor &  proc)

Register each sub-sender's event source with proc. Must be called before DtVrfManager::addProcessor(proc).

void DtInteractionSender::sendPendingInteractions ( const oatpp::websocket::WebSocket &  conn,
DtWebLvcClientSession &  session 
)

Collect filtered interactions from all sub-senders and send one InteractionMultiple message if any interactions are pending.

Parameters
connActive WebSocket connection — must not be locked.
sessionPer-connection session. Caller must NOT hold session.mutex.

Member Data Documentation

std::vector<std::unique_ptr<DtIInteractionTypeSender> > DtInteractionSender::myTypeSenders
private

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)