20 : myUUID(
DtUUID::nullUUID())
21 , myForceType(DtForceOther)
24 , myCheckForNameReservation(true)
32 , myMarkingText(orig.myMarkingText)
33 , myEntityType(orig.myEntityType)
34 , myForceType(orig.myForceType)
35 , myAppearanceBits(orig.myAppearanceBits)
36 , myEntityIdentifier(orig.myEntityIdentifier)
37 , myGlobalId(orig.myGlobalId)
38 , myIsLocal(orig.myIsLocal)
39 , myCheckForNameReservation(orig.myCheckForNameReservation)
84 DtString myMarkingText;
86 DtEntityType myEntityType;
88 DtForceType myForceType;
90 UInt32 myAppearanceBits;
92 DtEntityIdentifier myEntityIdentifier;
98 bool myCheckForNameReservation;
113 : DtSimulatedObjectStateComponent(sd)
136 virtual const DtString& globalId()
const override;
138 virtual void setGlobalId(
const DtString&)
override;
141 virtual const bool& isLocal()
const override;
143 virtual void setIsLocal(
const bool&)
override;
146 virtual const bool& checkForNameReservation()
const override;
148 virtual void setCheckForNameReservation(
const bool&)
override;
151 virtual const DtUUID& uuid()
const override;
153 virtual void setUUID(
const DtUUID&)
override;
156 virtual const DtString& markingText()
const override;
158 virtual void setMarkingText(
const DtString&)
override;
161 virtual const DtString& sidc()
const override;
162 virtual void setSidc(
const DtString&)
override;
165 virtual const DtForceType forceType()
const override;
167 virtual void setForceType(
const DtForceType&)
override;
170 virtual const UInt32 appearanceBits()
const override;
172 virtual void setAppearanceBits(
const UInt32&)
override;
175 virtual const DtEntityType entityType()
const override;
177 virtual void setEntityType(
const DtEntityType&)
override;
180 virtual const DtEntityIdentifier& entityId()
const override;
182 virtual void setEntityId(
const DtEntityIdentifier&)
override;
185 virtual const DtEntityType objectType()
const override;
205 virtual const DtString& globalId()
const override;
207 virtual const bool& isLocal()
const override;
209 virtual const bool& checkForNameReservation()
const override;
211 virtual const DtUUID& uuid()
const override;
213 virtual const DtString& markingText()
const override;
216 virtual const DtString& sidc()
const override;
219 virtual const DtForceType forceType()
const override;
221 virtual const UInt32 appearanceBits()
const override;
223 virtual const DtEntityType entityType()
const override;
225 virtual const DtEntityIdentifier& entityId()
const override;
227 virtual const DtEntityType objectType()
const override;
266 if (myNextFrameState.isWritable())
268 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
271 myCurrentFrameState.emitComponentUpdated();
278 myCurrentFrameState.updateStateData(sd);
279 myNextFrameState.updateStateData(sd);
286 myCurrentFrameState.aboutToBeDeleted();
287 myNextFrameState.aboutToBeDeleted();
291 virtual void addAdditionalStateComponents()
override;
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtMetocStateComponentData myData
Buffered METOC state data for the current (read) simulation frame.
Definition: metocServiceStateComponent.h:238
bool isDoubleBuffered()
Definition: metocServiceStateComponent.h:254
bool myIsLocal
True if this entity is locally owned; false if it is a remote entity.
Definition: metocServiceStateComponent.h:96
unsigned int UInt32
32-bit unsigned integer type.
Definition: stateDataTypes.h:21
Write-access implementation of DtMetocServiceStateComponent for the next simulation frame...
Definition: metocServiceStateComponent.h:123
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
DtString myGlobalId
Application-level global identifier string.
Definition: metocServiceStateComponent.h:94
const DtMetocStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: metocServiceStateComponent.h:202
DtMetocStateComponentData myData
Buffered METOC state data for the next simulation frame.
Definition: metocServiceStateComponent.h:189
virtual void aboutToBeDeleted() override
Notifies the base class and both frame state objects that this component is about to be deleted...
Definition: metocServiceStateComponent.h:283
DtMetocStateComponentData()
Constructs a DtMetocStateComponentData with default values: null UUID, DtForceOther affiliation...
Definition: metocServiceStateComponent.h:19
DtEntityType myEntityType
DIS entity type classifying this METOC service entity.
Definition: metocServiceStateComponent.h:86
DtString myMarkingText
Human-readable marking text label for the METOC service area.
Definition: metocServiceStateComponent.h:84
const DtMetocStateComponentData & frameState() const
Definition: metocServiceStateComponent.h:131
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
DtEntityIdentifier myEntityIdentifier
DIS entity identifier (site, application, entity number).
Definition: metocServiceStateComponent.h:92
#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
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: metocServiceStateComponent.h:256
DtMetocStateComponentData & operator=(const DtMetocStateComponentData &rhs)
Assignment operator; copies all fields from rhs.
Definition: metocServiceStateComponent.h:46
virtual bool mainComponentOnLegion() const override
Definition: metocServiceStateComponent.h:118
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
DtStateComponentCreator< DtMetocServiceStateComponentImplementation > DtMetocServiceStateComponentCreator
Factory type used to create DtMetocServiceStateComponentImplementation instances. Registered with the...
Definition: metocServiceStateComponent.h:302
virtual void updateStateData(DtStateData *sd) override
Propagates a new state data pointer to both the current and next frame state objects.
Definition: metocServiceStateComponent.h:276
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
bool myCheckForNameReservation
True if a name reservation check should be performed before publishing.
Definition: metocServiceStateComponent.h:98
Double-buffered state component implementation for METOC service entities. Owns both the current-fram...
Definition: metocServiceStateComponent.h:244
DtMetocServiceStateComponentNextFrame myNextFrameState
The next (write) frame state object.
Definition: metocServiceStateComponent.h:297
DtForceType myForceType
Force affiliation of this METOC service entity.
Definition: metocServiceStateComponent.h:88
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
DtUUID myUUID
Unique identifier for this METOC service entity.
Definition: metocServiceStateComponent.h:82
DtMetocStateComponentData & frameState()
Definition: metocServiceStateComponent.h:133
UInt32 myAppearanceBits
Packed DIS appearance bits for the visual state of this entity.
Definition: metocServiceStateComponent.h:90
#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
Definition: stateComponent.h:66
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: metocServiceStateComponent.h:260
Read-only implementation of DtMetocServiceStateComponent for the current simulation frame...
Definition: metocServiceStateComponent.h:194
DtMetocServiceStateComponentCurrentFrame myCurrentFrameState
The current (read) frame state object.
Definition: metocServiceStateComponent.h:295
Holds the identity and classification data for a METOC (meteorological and oceanographic) service ent...
Definition: metocServiceStateComponent.h:15
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
virtual void updateDataStorage() override
Promotes the next-frame data into the current frame and emits a component-updated signal...
Definition: metocServiceStateComponent.h:264
Abstract interface representing the METOC (meteorological and oceanographic) service state component ...
Definition: metocServiceStateComponent.h:105
virtual DtFrameStateInterface * nextFrameState() override
Definition: metocServiceStateComponent.h:258
DtMetocStateComponentData(const DtMetocStateComponentData &orig)
Copy constructor; initialises all fields from orig.
Definition: metocServiceStateComponent.h:30