![]() |
VR-Forces Developer's Guide
|
This document describes the public API changes in the vrfVrlSharedSource library between VR-Forces 5.2 and VR-Forces 5.3.
It covers the following public headers:
vrfVrlSharedSource/vrfDriver.hvrfVrlSharedSource/vrfEmbarkationProcessor.hvrfVrlSharedSource/vrfFogOfWarHandler.hvrfVrlSharedSource/vrfVrvExtensions.hvrfVrlSharedSource/vrlinkVantageToLegionIdMapper.hChanges that are internal to an implementation or limited to comments are not listed. No headers were added, removed, or moved in this library.
DtVrfDriver no longer owns a DtVrfCloudLayerStateProcessor. The forward declaration of that type, the public accessor, and the protected member that held it were all removed:
There is no replacement accessor on the driver. Cloud layer state is handled through the driver's existing DtVrfCloudLayerProcessor (myVrfCloudLayerProcessor), which is unchanged from 5.2 and remains protected. Code that called cloudLayerDataProcessor() to reach cloud layer state data must be reworked to go through the cloud layer processor or through the state data manager returned by stateDataManager(). Classes derived from DtVrfDriver that referenced myCloudLayerDataProcessor will fail to compile.
The slot moved from the protected section to the public section of DtVrfDriver:
The signature is unchanged, so existing overrides in derived classes continue to compile. Derived classes that re-declared the override inside their own protected section should move it to the public section to keep the access level consistent with the base class.
A new public virtual queues work that must run while the driver is inside its advance-frame processing, where access to the state data manager is safe:
This complements the existing queueConnectionFunction and queuePostAdvanceFrameConnectionFunction. Use it for any operation that mutates state data manager contents from outside the network thread; queueing through the other two methods does not provide the same protection against concurrent access.
Two protected virtuals were added for derived drivers to hook or override:
runAdvancedFrameFunctions drains the queue populated by queueAdvancedFrameFunction. resetParameterDatabase performs a deferred reset of the parameter database; the deferral flag is held in the new protected member myResetParameterDatabase.
The protected data added alongside them is relevant only to classes that derive from DtVrfDriver and could collide with identically named members in a derived class:
| Member | Notes |
|---|---|
bool myResetParameterDatabase | Deferred parameter database reset flag. |
using AdvancedFrameFunctions = std::vector<boost::function<void()>> | Type of the queued function list. |
AdvancedFrameFunctions myAdvancedFrameFunctions | Functions queued by queueAdvancedFrameFunction. |
double myMinDrainInputTime | HLA builds only (DtHLA). |
double myMaxDrainInputTime | HLA builds only (DtHLA). |
The mapper now overrides clear from its base class:
Derived mappers that maintain their own identifier tables should override clear and call the base implementation so that the mapper's tables are emptied along with theirs.
Two protected virtuals were added:
slot_visualizerCreationEnabled re-evaluates fog of war state when a visualizer becomes available for a model set and visual type. advancedFrame performs per-frame fog of war processing and is driven by the new protected member myAdvancedFrameConnection. Derived handlers that override either method must call the base implementation to preserve filtering behavior.
A protected virtual was added so the listener can detach from state data before it is destroyed:
The connection is stored in the new protected member myStateDataDeletedConnection. Derived listeners that cache the DtStateData pointer should override this method to release the cached pointer, and must call the base implementation.
The processor now tracks per-element signal connections in a new protected type and member:
This is state only; no methods were added or changed. It is listed because the names are visible to derived classes. The header now includes <boost/signals2.hpp> directly.
| Header | Breaking | Additions |
|---|---|---|
vrfDriver.h | cloudLayerDataProcessor accessor, DtVrfCloudLayerStateProcessor forward declaration, and myCloudLayerDataProcessor removed; slot_parameterDatabaseInitialized moved to public | queueAdvancedFrameFunction; resetParameterDatabase; runAdvancedFrameFunctions; protected state members |
vrfEmbarkationProcessor.h | None | SignalConnectionMap typedef and mySignalConnectionMap member |
vrfFogOfWarHandler.h | None | slot_visualizerCreationEnabled; advancedFrame; myAdvancedFrameConnection |
vrfVrvExtensions.h | None | DtVrfVrlinkAggregateStateListener::slot_stateDataToBeDestroyed; myStateDataDeletedConnection |
vrlinkVantageToLegionIdMapper.h | None | clear override |
Return to VR-Forces 5.3 API Migration Guide.
[Home]