19 : myFormation(DtOtherAggregateFormation)
20 , myAggregateState(DtOtherAggregateState)
26 , myFormationName(orig.myFormationName)
27 , myAggregateState(orig.myAggregateState)
28 , myFormation(orig.myFormation)
49 DtAggregateFormation myFormation;
51 DtString myFormationName;
53 DtAggregateState myAggregateState;
64 : DtEntityStateComponent(storage)
83 virtual const DtString& formationName()
const override;
84 virtual void setFormationName(
const DtString&)
override;
86 virtual const DtAggregateState& aggregateState()
const override;
87 virtual void setAggregateState(
const DtAggregateState&)
override;
89 virtual const DtAggregateFormation& formation()
const override;
90 virtual void setFormation(
const DtAggregateFormation&)
override;
105 virtual const DtString& formationName()
const override;
106 virtual const DtAggregateState& aggregateState()
const override;
107 virtual const DtAggregateFormation& formation()
const override;
113 myAggregateData = data;
135 if (myNextFrameState.isWritable())
137 myCurrentFrameState.advanceAggregateFrame(myNextFrameState.aggregateFrameState());
138 myCurrentFrameState.checkForUpdatedItems();
141 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
142 myCurrentFrameState.emitComponentUpdated();
147 myCurrentFrameState.updateStateData(sd);
148 myNextFrameState.updateStateData(sd);
151 virtual Legion::WriteStateInstance
writeStateInstance()
override {
return myWriteAggregateStateRepository; };
154 virtual void convertToRemote()
override;
157 virtual void convertToLocal()
override;
159 virtual void addAdditionalStateComponents()
override;
161 virtual bool forceAdvance()
override;
166 myCurrentFrameState.aboutToBeDeleted();
167 myNextFrameState.aboutToBeDeleted();
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: aggregateStateComponent.h:145
Write-access (next-frame) entity state component template.
Definition: entityStateComponent.h:227
3) Define the current frame class. This will be used for read access.
Definition: aggregateStateComponent.h:97
DtAggregateStateComponentData(const DtAggregateStateComponentData &orig)
Definition: aggregateStateComponent.h:24
DtAggregateStateComponentData operator=(const DtAggregateStateComponentData &rhs)
Definition: aggregateStateComponent.h:32
DtAggregateStateComponentNextFrame myNextFrameState
Definition: aggregateStateComponent.h:172
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: aggregateStateComponent.h:133
DtAggregateStateComponentData()
Definition: aggregateStateComponent.h:18
virtual Legion::WriteStateInstance writeStateInstance() override
Returns the Legion write state instance for this component. Throws if not supported.
Definition: aggregateStateComponent.h:151
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aggregateStateComponent.h:122
Abstract base interface for the entity state component.
Definition: entityStateComponent.h:141
const DtAggregateStateComponentData & aggregateFrameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aggregateStateComponent.h:103
DtAggregateState myAggregateState
Operational state of the aggregate unit (e.g., aggregated, disaggregated, fully disaggregated).
Definition: aggregateStateComponent.h:53
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
2) Define the next frame class. This will be used for write access.
Definition: aggregateStateComponent.h:74
Plain data container holding aggregate-specific state fields for use in the double-buffered state com...
Definition: aggregateStateComponent.h:16
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: aggregateStateComponent.h:58
DtAggregateStateComponentData myAggregateData
Definition: aggregateStateComponent.h:93
Plain-old-data container for all serializable entity state fields.
Definition: entityStateComponent.h:30
DtStateComponentCreator< DtAggregateStateComponentImplementation > DtAggregateStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: aggregateStateComponent.h:178
bool isDoubleBuffered()
Definition: aggregateStateComponent.h:128
virtual const DtFrameStateInterface * currentFrameState() const override
Returns the read-only current frame state. Throws if not double-buffered.
Definition: aggregateStateComponent.h:129
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
DtAggregateStateComponentData & aggregateFrameState()
Definition: aggregateStateComponent.h:81
Read-only (current-frame) entity state component template.
Definition: entityStateComponent.h:404
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
void advanceAggregateFrame(const DtAggregateStateComponentData &data)
Definition: aggregateStateComponent.h:111
DtAggregateStateComponentData myAggregateData
Definition: aggregateStateComponent.h:117
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
#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
const DtAggregateStateComponentData & aggregateFrameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: aggregateStateComponent.h:80
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
virtual void aboutToBeDeleted() override
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
Definition: aggregateStateComponent.h:163
DtAggregateFormation myFormation
Formation type of the aggregate unit.
Definition: aggregateStateComponent.h:49
DtAggregateStateComponentCurrentFrame myCurrentFrameState
Definition: aggregateStateComponent.h:171
Contains the declaration of the DtExtent class.
virtual const DtFrameStateInterface * nextFrameState() const override
Returns the read-only next frame state. Throws if not double-buffered.
Definition: aggregateStateComponent.h:131
virtual DtFrameStateInterface * nextFrameState() override
Returns the writable next frame state. Throws if not double-buffered.
Definition: aggregateStateComponent.h:130
#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:65
DtEntityStateComponentData & operator=(const DtEntityStateComponentData &rhs)
Assignment operator. Performs a member-wise deep copy of rhs.
Definition: entityStateComponent.h:64
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
DtString myFormationName
Name of the formation assigned to the aggregate unit.
Definition: aggregateStateComponent.h:51
LOM::WriteEntityRepository myWriteAggregateStateRepository
Definition: aggregateStateComponent.h:173