VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
makVrf::DtEntityStateComponentImplementation Class Reference

Double-buffered entity state component implementation.

Owns the Legion WriteEntityRepository instance and exposes the next-frame (myNextFrameState) and current-frame (myCurrentFrameState) wrappers. On construction, if no read instance exists, convertToLocal() is called immediately to create a writable Legion instance.

Additional state components (DtEntityLocationStateComponent and DtVrfGeometryStateComponent) are added automatically via addAdditionalStateComponents().

Inheritance diagram for makVrf::DtEntityStateComponentImplementation:
Inheritance graph
[legend]

Public Member Functions

 DtEntityStateComponentImplementation (DtStateData *sd)
 
virtual ~DtEntityStateComponentImplementation () override
 
bool isDoubleBuffered ()
 
virtual const
DtFrameStateInterface * 
currentFrameState () const override
 
virtual DtFrameStateInterface * nextFrameState () override
 
virtual const
DtFrameStateInterface * 
nextFrameState () const override
 
virtual void updateDataStorage () override
 
virtual void updateStateData (DtStateData *sd) override
 
virtual void initializeFromParameters (const DtVrfObjectParameters *params) override
 
virtual Legion::WriteStateInstance writeStateInstance () override
 
virtual void convertToRemote () override
 
virtual void convertToLocal () override
 
virtual void addAdditionalStateComponents () override
 
virtual void aboutToBeDeleted () override
 
- Public Member Functions inherited from makVrf::DtDoubleBufferedStateComponent< DtEntityStateComponent >
 DtDoubleBufferedStateComponent (DtStateData *sd)
 
virtual void setId (UInt64 id) override
 
virtual void setStateData (DtStateData *sd) override
 
virtual bool isDoubleBuffered () const override
 
virtual bool forceAdvance () override
 
virtual void advanceFrame () override
 
- Public Member Functions inherited from makVrf::DtStateComponent
 DtStateComponent (DtStateData *)
 
virtual ~DtStateComponent ()
 
virtual void setCoordinateSystem (const Coordinate_System *)
 
virtual StateComponentType typeWithCreator () const =0
 
virtual StateComponentType componentType () const =0
 
virtual void setPublishingOnLegionNetwork (bool)
 
bool publishingOnLegionNetwork () const
 
virtual void setIsRemoteComponent (bool b)
 
bool isRemoteComponent () const
 
virtual void completeSetup ()
 
virtual UInt64 id () const
 
bool advancedFrame () const
 
virtual void firstFrameAdvance ()
 
UInt64 stateId () const
 
UInt64 legionGlobalId () const
 
const DtStateData * stateData () const
 
bool cleared () const
 
DtStateData * stateData ()
 
const Coordinate_System * coordinateSystem () const
 
virtual void removeAdditionalStateComponents ()
 
virtual const char * stringType () const =0
 

Static Public Member Functions

static void addAdditionalTableColumns (Legion::SimulationDatabase *)
 
- Static Public Member Functions inherited from makVrf::DtDoubleBufferedStateComponent< DtEntityStateComponent >
static void registerLegionComponent (Legion::SimulationDatabase *)
 
static void addAdditionalTableColumns (Legion::SimulationDatabase *)
 

Protected Attributes

DtEntityStateComponentCurrentFrame myCurrentFrameState
 
DtEntityStateComponentNextFrame myNextFrameState
 
LOM::WriteEntityRepository myWriteEntityStateRepository
 
- Protected Attributes inherited from makVrf::DtStateComponent
UInt64 myId
 
DtStateData * myStateData
 
const Coordinate_System * myCoordinateSystem
 
bool myIsRemoteComponent
 
bool myCleared
 
bool myPublishingOnLegionNetwork
 
bool myAdvancedFrame
 

Additional Inherited Members

- Public Types inherited from makVrf::DtStateComponent
enum  StateComponentTypeEnum {
  Undefined = -1, SimulatedObjectStateComponent = 0, EntityStateComponent = SimulatedObjectStateComponent, EnvironmentalStateComponent = SimulatedObjectStateComponent,
  AggregateStateComponent = SimulatedObjectStateComponent, MetocServiceStateComponent = SimulatedObjectStateComponent, AerodromeStateComponent = SimulatedObjectStateComponent, SpotReportStateComponent = SimulatedObjectStateComponent,
  OrbatStateComponent = SimulatedObjectStateComponent, LocationStateComponent = 1, EntityLocationStateComponent = LocationStateComponent, EnvironmentalLocationStateComponent = LocationStateComponent,
  StaticLocationStateComponent = LocationStateComponent, HumanStateComponent = 2, ArticulatedPartStateComponent = 3, VrfStateComponent = 4,
  StatePropertiesStateComponent = 5, VrfGeometryStateComponent = 6, SubordinateManagerStateComponent = 7, RangeItemsStateComponent = 8,
  CloudLayerStateComponent = 9, TimeAndDateStateComponent = 10, WeatherStateComponent = 11, LaserDesignatorStateComponent = 12,
  EmitterSystemStateComponent = 13, IffStateComponent = 14, ActiveSonarStateComponent = 15, UnderwaterAcousticsStateComponent = 16,
  SensorFieldOfViewStateComponent = 17, RadioTransmitterStateComponent = 18, TaskVisualizationStateComponent = 19, TacticalSmokeStateComponent = 20,
  DynamicTerrainStateComponent = 21, RadioReceiverStateComponent = 22, WindCorridorStateComponent = 23, AirTurbulenceStateComponent = 24,
  NavAidRadioTransmitterStateComponent = 25, AisDataStateComponent = 26, AircraftLightingStateComponent = 27, LandSurfaceStateComponent = 28,
  WaterSurfaceStateComponent = 29, TroposphereStateComponent = 30, SubsurfaceStateComponent = 31, GroundVehicleLightingStateComponent = 32,
  LaserLightStateComponent = 33, SearchLightStateComponent = 34, UserStateComponent = 64
}
 
using StateComponentType = unsigned int
 
- Public Attributes inherited from makVrf::DtStateComponent
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentAboutToBeDeleted
 
boost::signals2::signal< void(DtStateComponent *)> signal_componentModified
 

Constructor & Destructor Documentation

makVrf::DtEntityStateComponentImplementation::DtEntityStateComponentImplementation ( DtStateData *  sd)

Constructs the implementation and binds it to sd.

If sd has no read state instance yet, convertToLocal() is called immediately to create the underlying Legion write instance.

Parameters
sdThe owning DtStateData instance.
virtual makVrf::DtEntityStateComponentImplementation::~DtEntityStateComponentImplementation ( )
overridevirtual

Destroys the implementation and, if it owns the write instance, releases it.

Member Function Documentation

bool makVrf::DtEntityStateComponentImplementation::isDoubleBuffered ( )
inline

Returns true; this component uses double-buffered state.

virtual const DtFrameStateInterface* makVrf::DtEntityStateComponentImplementation::currentFrameState ( ) const
inlineoverridevirtual

Returns the current-frame state interface (read-only).

Reimplemented from makVrf::DtStateComponent.

virtual DtFrameStateInterface* makVrf::DtEntityStateComponentImplementation::nextFrameState ( )
inlineoverridevirtual

Returns the next-frame state interface (read-write).

Reimplemented from makVrf::DtStateComponent.

virtual const DtFrameStateInterface* makVrf::DtEntityStateComponentImplementation::nextFrameState ( ) const
inlineoverridevirtual

Returns the next-frame state interface (read-only overload).

Reimplemented from makVrf::DtStateComponent.

virtual void makVrf::DtEntityStateComponentImplementation::updateDataStorage ( )
overridevirtual

Promotes next-frame data to the current frame.

For locally owned objects, checkForUpdatedItems() is called first to detect and signal any Legion-side attribute changes. Then the next-frame data block is copied into the current-frame cache via advanceFrame(), and emitComponentUpdated() is called.

Implements makVrf::DtDoubleBufferedStateComponent< DtEntityStateComponent >.

virtual void makVrf::DtEntityStateComponentImplementation::updateStateData ( DtStateData *  sd)
inlineoverridevirtual

Propagates a new DtStateData pointer into both frame states.

Parameters
sdThe new owning DtStateData instance.

Implements makVrf::DtDoubleBufferedStateComponent< DtEntityStateComponent >.

static void makVrf::DtEntityStateComponentImplementation::addAdditionalTableColumns ( Legion::SimulationDatabase *  )
static

Registers the UUID and ClutterEntity attribute columns in the Legion database.

UUID is stored as a fixed-size UInt8 array (size equal to a null UUID's data size) and reflected on the network. ClutterEntity is a single Bool that is also reflected on the network.

Parameters
dbThe Legion simulation database to extend.
virtual void makVrf::DtEntityStateComponentImplementation::initializeFromParameters ( const DtVrfObjectParameters *  params)
overridevirtual

Applies initial appearance bits from object parameters if specified.

Parameters
paramsObject parameters potentially containing an initial appearance value.

Reimplemented from makVrf::DtStateComponent.

virtual Legion::WriteStateInstance makVrf::DtEntityStateComponentImplementation::writeStateInstance ( )
inlineoverridevirtual

Returns the Legion write state instance handle for this entity.

Reimplemented from makVrf::DtStateComponent.

virtual void makVrf::DtEntityStateComponentImplementation::convertToRemote ( )
overridevirtual

Transitions this entity from local to remote (non-writable) ownership.

Releases the WriteEntityRepository if it is valid and the state data is currently publishing on the Legion network.

Reimplemented from makVrf::DtStateComponent.

virtual void makVrf::DtEntityStateComponentImplementation::convertToLocal ( )
overridevirtual

Transitions this entity from remote to local (writable) ownership.

Creates a new main Legion write instance, makes the next-frame state writable, and synchronises the Legion global ID into both frame states.

Reimplemented from makVrf::DtStateComponent.

virtual void makVrf::DtEntityStateComponentImplementation::addAdditionalStateComponents ( )
overridevirtual

Adds DtEntityLocationStateComponent and DtVrfGeometryStateComponent to the owning state data.

Reimplemented from makVrf::DtStateComponent.

virtual void makVrf::DtEntityStateComponentImplementation::aboutToBeDeleted ( )
inlineoverridevirtual

Notifies both frame states that the component is about to be destroyed.

Reimplemented from makVrf::DtStateComponent.

References makVrf::DtStateComponent::aboutToBeDeleted().

Member Data Documentation

DtEntityStateComponentCurrentFrame makVrf::DtEntityStateComponentImplementation::myCurrentFrameState
protected

Current-frame (read-only) entity state.

DtEntityStateComponentNextFrame makVrf::DtEntityStateComponentImplementation::myNextFrameState
protected

Next-frame (write-access) entity state.

LOM::WriteEntityRepository makVrf::DtEntityStateComponentImplementation::myWriteEntityStateRepository
protected

Legion write repository owned by this implementation instance.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)