![]() |
VR-Forces Developer's Guide
|
DtFireDetonationEventSource - Subscribes to VRF fire and detonation 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. drain methods may be called from any thread.

Public Member Functions | |
| DtFireDetonationEventSource ()=default | |
| ~DtFireDetonationEventSource () override=default | |
| void | subscribe (makVrfEvents::DtEventManager *em) override |
| void | unsubscribe () override |
| std::vector< Json::Value > | drainFireEvents () |
| std::vector< Json::Value > | drainDetonationEvents () |
Public Member Functions inherited from DtIInteractionEventSource | |
| virtual | ~DtIInteractionEventSource ()=default |
Private Member Functions | |
| void | onFireEvent (const makVrfEvents::DtEvent &event) |
| void | onDetonationEvent (const makVrfEvents::DtEvent &event) |
Private Attributes | |
| tbb::spin_mutex | myQueueMutex |
| std::vector< Json::Value > | myPendingFireEvents |
| std::vector< Json::Value > | myPendingDetonationEvents |
| boost::signals2::connection | myFireConnection |
| boost::signals2::connection | myDetonationConnection |
|
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> DtFireDetonationEventSource::drainFireEvents | ( | ) |
Atomically swap-and-return all pending fire event records.
| std::vector<Json::Value> DtFireDetonationEventSource::drainDetonationEvents | ( | ) |
Atomically swap-and-return all pending detonation event records.
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |