21 : myUUID(
DtUUID::nullUUID())
67 DtEntityIdentifier myEntityId;
71 unsigned long long myUserData = 0;
73 unsigned long long myObjectId = 0;
86 : DtSimulatedObjectStateComponent(storage)
116 virtual const DtUUID& orbatUUID()
const override;
118 virtual const int orbatOrder()
const override;
119 virtual void setOrbatOrder(
const int&)
override;
121 virtual const unsigned long long& objectId()
const override;
122 virtual void setObjectId(
const unsigned long long&)
override;
127 virtual const DtUUID& parent()
const override;
128 virtual void setParent(
const DtUUID&)
override;
136 virtual const bool& isLocal()
const override;
137 virtual void setIsLocal(
const bool&)
override;
139 virtual const bool& checkForNameReservation()
const override;
140 virtual void setCheckForNameReservation(
const bool&)
override;
142 virtual const DtEntityIdentifier& entityId()
const override;
143 virtual void setEntityId(
const DtEntityIdentifier&)
override;
145 virtual const DtString& globalId()
const override;
146 virtual void setGlobalId(
const DtString&)
override;
148 virtual const UInt32 appearanceBits()
const override;
150 virtual const DtString& label()
const override;
151 virtual void setLabel(
const DtString&)
override;
153 virtual const DtUUID& uuid()
const override;
154 virtual void setUUID(
const DtUUID& u)
override;
156 virtual const DtString& markingText()
const override;
157 virtual void setMarkingText(
const DtString&)
override;
160 virtual const DtString& sidc()
const override;
161 virtual void setSidc(
const DtString&)
override;
163 virtual const DtForceType forceType()
const override;
164 virtual void setForceType(
const DtForceType&)
override;
166 virtual const DtEntityType
entityType()
const override {
return objectType(); };
167 virtual const DtEntityType objectType()
const override;
168 virtual void setEntityType(
const DtEntityType& t)
override;
169 virtual const DtSimulationAddress simEngineAddress()
const override;
171 virtual const unsigned long long userLongLongData()
const override;
172 virtual void setUserLongLongData(
const unsigned long long&)
override;
175 virtual void makeWritable()
override;
178 virtual void makeReadOnly()
override;
194 virtual const UInt32 appearanceBits()
const override;
195 virtual const unsigned long long& objectId()
const override;
196 virtual const bool& checkForNameReservation()
const override;
197 virtual const bool& isLocal()
const override;
198 virtual const DtUUID& orbatUUID()
const override;
199 virtual const int orbatOrder()
const override;
200 virtual const DtString& label()
const override;
201 virtual const DtUUID& parent()
const override;
202 virtual const DtEntityIdentifier& entityId()
const override;
203 virtual const DtString& globalId()
const override;
204 virtual const DtUUID& uuid()
const override;
205 virtual const DtString& markingText()
const override;
207 virtual const DtString& sidc()
const override;
208 virtual const DtForceType forceType()
const override;
209 virtual const DtEntityType
entityType()
const override {
return objectType(); };
210 virtual const DtEntityType objectType()
const override;
211 virtual const unsigned long long userLongLongData()
const override;
212 virtual const DtSimulationAddress simEngineAddress()
const override;
256 if (myNextFrameState.isWritable())
258 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
261 myCurrentFrameState.emitComponentUpdated();
268 myCurrentFrameState.updateStateData(sd);
269 myNextFrameState.updateStateData(sd);
276 myCurrentFrameState.aboutToBeDeleted();
277 myNextFrameState.aboutToBeDeleted();
281 virtual void convertToLocal()
override;
283 virtual void convertToRemote()
override;
Read-only current frame implementation of DtOrbatStateComponent. Provides access to the committed ORB...
Definition: orbatStateComponent.h:187
UUID is a unique ID wrapper class.
Definition: uuid.h:59
const DtRwOrbatData & data() const
Returns the ORBAT data payload (read-only).
Definition: orbatStateComponent.h:43
unsigned int UInt32
32-bit unsigned integer type.
Definition: stateDataTypes.h:21
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
The DtSimulatedObjectStateComponent is an interface that all main components (those that are consider...
Definition: simulatedObjectStateComponent.h:21
virtual DtFrameStateInterface * nextFrameState() override
Returns the writable next frame state interface.
Definition: orbatStateComponent.h:249
Holds the ORBAT (Order of Battle) data payload for a single ORBAT entry in the simulation state...
Definition: orbatStateComponent.h:17
virtual const DtEntityType entityType() const override
Definition: orbatStateComponent.h:166
#define UNDEFINED_RETURNREF_ACCESSOR(ReturnType, Member)
Defines a virtual const reference accessor that throws DtUnimplementedMethod, marking the method as r...
Definition: doubleBufferedDataStorage.h:60
const DtOrbatStateComponentData & frameState() const
Returns read-only access to the raw frame state data.
Definition: orbatStateComponent.h:134
DtRwOrbatData & data()
Returns the ORBAT data payload (read-write).
Definition: orbatStateComponent.h:49
virtual void updateDataStorage() override
Promotes the next frame state to the current frame if it is writable, then emits an update notificati...
Definition: orbatStateComponent.h:254
DtOrbatStateComponentData myData
The pending ORBAT state data to be promoted on the next frame advance.
Definition: orbatStateComponent.h:182
DtOrbatStateComponentData(const DtOrbatStateComponentData &orig)
Copy constructor.
Definition: orbatStateComponent.h:26
Abstract interface for the ORBAT state component, representing both the current and next frame views...
Definition: orbatStateComponent.h:78
virtual bool mainComponentOnLegion() const override
Returns false; ORBAT components are not managed on the Legion network layer.
Definition: orbatStateComponent.h:104
Definition: stateComponent.h:69
void advanceFrame(const DtOrbatStateComponentData &data)
Copies the given state data into this frame, advancing the current frame.
Definition: orbatStateComponent.h:222
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Macro to define all required static and virtual state component type methods. Place in the public sec...
Definition: stateComponent.h:272
Definition: rwOrbatData.h:20
virtual const DtFrameStateInterface * currentFrameState() const override
Returns the read-only current frame state interface.
Definition: orbatStateComponent.h:247
DtUUID myUUID
Accessor and mutator for the persistent UUID of this ORBAT entry.
Definition: orbatStateComponent.h:65
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
DtOrbatStateComponentData myData
The committed ORBAT state data for the current simulation frame.
Definition: orbatStateComponent.h:229
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual by-value accessor and an undefined virtual setter, both throwing DtUnimp...
Definition: doubleBufferedDataStorage.h:103
DtOrbatStateComponentCurrentFrame myCurrentFrameState
The read-only current frame state.
Definition: orbatStateComponent.h:287
DtOrbatStateComponentData()
Constructs a default DtOrbatStateComponentData with a null UUID.
Definition: orbatStateComponent.h:20
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
Write-access frame implementation of DtOrbatStateComponent. Holds the pending ORBAT state that will b...
Definition: orbatStateComponent.h:109
virtual void aboutToBeDeleted() override
Notifies both frame states that this component is about to be destroyed.
Definition: orbatStateComponent.h:273
DtOrbatStateComponentNextFrame myNextFrameState
The writable next frame state.
Definition: orbatStateComponent.h:289
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual const-reference accessor and an undefined virtual setter, both throwing DtUnimplementedMethod and requiring overrides in a derived class.
Definition: doubleBufferedDataStorage.h:112
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
unsigned long long myObjectId
Simulation object store correlation ID.
Definition: orbatStateComponent.h:73
bool isDoubleBuffered()
Returns true; this component uses double buffering.
Definition: orbatStateComponent.h:245
DtOrbatStateComponentData & operator=(const DtOrbatStateComponentData &orig)
Assignment operator.
Definition: orbatStateComponent.h:32
DtStateComponentCreator< DtOrbatStateComponentImplementation > DtOrbatStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: orbatStateComponent.h:294
DtRwOrbatData myData
Full ORBAT payload (hierarchy, force side, symbol, etc.).
Definition: orbatStateComponent.h:69
virtual const DtFrameStateInterface * nextFrameState() const override
Returns the next frame state interface (read-only).
Definition: orbatStateComponent.h:251
Double-buffered state component implementation for ORBAT data. Owns both a current-frame (read) and n...
Definition: orbatStateComponent.h:235
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29
virtual const DtEntityType entityType() const override
Definition: orbatStateComponent.h:209
virtual void updateStateData(DtStateData *sd) override
Updates the state data pointer for both current and next frame states.
Definition: orbatStateComponent.h:266
Contains the DtStateComponent class declaration.
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
DtOrbatStateComponentData & frameState()
Returns write access to the raw frame state data.
Definition: orbatStateComponent.h:132
unsigned long long myUserData
64-bit application user tag.
Definition: orbatStateComponent.h:71