![]() |
VR-Forces Developer's Guide
|
DtObjectConsoleEventSource - Subscribes to VRF comment (Object Console) signals, serializes events to JSON, and queues them for delivery.
Thread safety: Signal callbacks fire on the VRF tick thread. Queue access is protected by myQueueMutex. drainEvents may be called from any thread.

Public Member Functions | |
| DtObjectConsoleEventSource ()=default | |
| ~DtObjectConsoleEventSource () override=default | |
| void | subscribe (makVrfEvents::DtEventManager *em) override |
| void | unsubscribe () override |
| std::vector< Json::Value > | drainEvents () |
Public Member Functions inherited from DtIInteractionEventSource | |
| virtual | ~DtIInteractionEventSource ()=default |
Private Member Functions | |
| void | onCommentEvent (const makVrfEvents::DtEvent &event) |
Private Attributes | |
| tbb::spin_mutex | myQueueMutex |
| std::vector< Json::Value > | myPendingEvents |
| boost::signals2::connection | myCommentConnection |
|
default |
|
overridedefault |
|
overridevirtual |
Subscribe to relevant signals on em. Called once by DtInteractionProcessor::initialize().
Implements DtIInteractionEventSource.
|
overridevirtual |
Disconnect all signal subscriptions. Called once by DtInteractionProcessor::shutdown().
Implements DtIInteractionEventSource.
| std::vector<Json::Value> DtObjectConsoleEventSource::drainEvents | ( | ) |
Atomically swap-and-return all pending Object Console event records.
|
private |
|
mutableprivate |
|
private |
|
private |