![]() |
VR-Forces Developer's Guide
|
DtTacticalGraphicProcessor - Lightweight per-client tactical graphic processor.
One instance is created per connected WebSocket client and registered with DtVrfManager so that it participates in the tick loop.
queryAll() / query() are the primary read interface used by the WebSocket layer to build initial-state and periodic-update messages.
Thread safety: poll() - caller holds vrfDataMutex exclusively; must NOT re-acquire it dispatchPendingEvents() - caller holds NO locks queryAll() / query() - acquires vrfDataMutex shared; safe from any thread

Public Member Functions | |
| DtTacticalGraphicProcessor ()=default | |
| virtual | ~DtTacticalGraphicProcessor () override=default |
| virtual void | initialize (const DtVrfContext &context) override |
| virtual void | poll () override |
| virtual void | dispatchPendingEvents () override |
| virtual void | shutdown () override |
| virtual int | count () const override |
| std::vector < DtDatasource::DtTacticalGraphicSnapshot > | queryAll () const |
| DtDatasource::DtTacticalGraphicSnapshot | query (const std::string &objectName) const |
Public Member Functions inherited from DtProcessor | |
| virtual | ~DtProcessor ()=default |
Protected Member Functions | |
| std::shared_ptr < DtDatasource::DtTacticalGraphicSnapshot > | snapshotFor (DtWebServerObjectPtr obj) const |
Private Attributes | |
| DtVrfContext | myVrfContext |
|
default |
|
overridevirtualdefault |
|
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.
|
overridevirtual |
Called each tick while the VRF API mutex is held. Collect state changes and queue them internally.
Implements DtProcessor.
|
overridevirtual |
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.
|
overridevirtual |
Number of objects currently known to this processor.
Implements DtProcessor.
| std::vector<DtDatasource::DtTacticalGraphicSnapshot> DtTacticalGraphicProcessor::queryAll | ( | ) | const |
Return snapshots for all currently known tactical graphics. TODO: implement once the shared VRF data store is wired in.
| DtDatasource::DtTacticalGraphicSnapshot DtTacticalGraphicProcessor::query | ( | const std::string & | objectName | ) | const |
Return the snapshot for a single tactical graphic by objectName. Returns a default-constructed DtTacticalGraphicSnapshot (empty objectName) when no match is found. TODO: implement once the shared VRF data store is wired in.
|
protected |
|
private |