![]() |
VR-Forces Developer's Guide
|
DtInteractionProcessor - Generic registry of DtIInteractionEventSource instances for one WebSocket connection.
Owns a list of event sources and calls subscribe() / unsubscribe() on them during initialize() / shutdown(). Has no knowledge of specific interaction types.
To add a new interaction type: implement DtIInteractionEventSource and register an instance via addEventSource() before the processor is initialized. No code in this class changes.

Public Member Functions | |
| DtInteractionProcessor ()=default | |
| ~DtInteractionProcessor () override=default | |
| void | initialize (const DtVrfContext &context) override |
| void | poll () override |
| void | dispatchPendingEvents () override |
| void | shutdown () override |
| int | count () const override |
| void | addEventSource (std::shared_ptr< DtIInteractionEventSource > source) |
Public Member Functions inherited from DtProcessor | |
| virtual | ~DtProcessor ()=default |
Private Attributes | |
| std::vector< std::shared_ptr < DtIInteractionEventSource > > | myEventSources |
|
default |
|
overridedefault |
|
overridevirtual |
Called once before the first tick.
| context | VRF runtime objects owned by DtVrfManager. All pointers remain valid for the processor's lifetime. See DtVrfContext for the thread-safety contract. |
Implements DtProcessor.
|
inlineoverridevirtual |
Called each tick while the VRF API mutex is held. Collect state changes and queue them internally.
Implements DtProcessor.
|
inlineoverridevirtual |
Called each tick AFTER the VRF API mutex is released. Deliver any queued change notifications.
Implements DtProcessor.
|
overridevirtual |
Called on teardown. Release any resources.
Implements DtProcessor.
|
inlineoverridevirtual |
Number of objects currently known to this processor.
Implements DtProcessor.
| void DtInteractionProcessor::addEventSource | ( | std::shared_ptr< DtIInteractionEventSource > | source | ) |
Register an event source. Must be called before initialize().
|
private |