18 : myFormation(DtOtherAggregateFormation)
19 , myAggregateState(DtOtherAggregateState)
25 , myFormationName(orig.myFormationName)
26 , myAggregateState(orig.myAggregateState)
27 , myFormation(orig.myFormation)
47 DtAggregateFormation myFormation;
48 DtString myFormationName;
49 DtAggregateState myAggregateState;
60 : DtEntityStateComponent(storage)
79 virtual const DtString& formationName()
const override;
80 virtual void setFormationName(
const DtString&)
override;
82 virtual const DtAggregateState& aggregateState()
const override;
83 virtual void setAggregateState(
const DtAggregateState&)
override;
85 virtual const DtAggregateFormation& formation()
const override;
86 virtual void setFormation(
const DtAggregateFormation&)
override;
101 virtual const DtString& formationName()
const override;
102 virtual const DtAggregateState& aggregateState()
const override;
103 virtual const DtAggregateFormation& formation()
const override;
109 myAggregateData = data;
131 if (myNextFrameState.isWritable())
133 myCurrentFrameState.advanceAggregateFrame(myNextFrameState.aggregateFrameState());
134 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
137 myCurrentFrameState.checkForUpdatedItems();
138 myCurrentFrameState.emitComponentUpdated();
143 myCurrentFrameState.updateStateData(sd);
144 myNextFrameState.updateStateData(sd);
147 virtual Legion::WriteStateInstance
writeStateInstance()
override {
return myWriteAggregateStateRepository; };
150 virtual void convertToRemote()
override;
153 virtual void convertToLocal()
override;
155 virtual void addAdditionalStateComponents()
override;
157 virtual bool forceAdvance()
override;
162 myCurrentFrameState.aboutToBeDeleted();
163 myNextFrameState.aboutToBeDeleted();
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: aggregateStateComponent.h:141
2) Define the next frame class. This will be used for write access.
Definition: entityStateComponent.h:127
3) Define the current frame class. This will be used for read access.
Definition: aggregateStateComponent.h:93
DtAggregateStateComponentData(const DtAggregateStateComponentData &orig)
Definition: aggregateStateComponent.h:23
DtAggregateStateComponentData operator=(const DtAggregateStateComponentData &rhs)
Definition: aggregateStateComponent.h:31
DtAggregateStateComponentNextFrame myNextFrameState
Definition: aggregateStateComponent.h:168
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: aggregateStateComponent.h:129
DtAggregateStateComponentData()
Definition: aggregateStateComponent.h:17
virtual Legion::WriteStateInstance writeStateInstance() override
Definition: aggregateStateComponent.h:147
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aggregateStateComponent.h:118
1) Define the interface class that will be used to represent the next and current frames...
Definition: entityStateComponent.h:91
const DtAggregateStateComponentData & aggregateFrameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aggregateStateComponent.h:99
DtAggregateState myAggregateState
Definition: aggregateStateComponent.h:49
Definition: stateComponent.h:269
2) Define the next frame class. This will be used for write access.
Definition: aggregateStateComponent.h:70
Definition: aggregateStateComponent.h:15
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:54
DtAggregateStateComponentData myAggregateData
Definition: aggregateStateComponent.h:89
Definition: entityStateComponent.h:25
DtStateComponentCreator< DtAggregateStateComponentImplementation > DtAggregateStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: aggregateStateComponent.h:174
bool isDoubleBuffered()
Definition: aggregateStateComponent.h:124
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: aggregateStateComponent.h:125
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
DtAggregateStateComponentData & aggregateFrameState()
Definition: aggregateStateComponent.h:77
3) Define the current frame class. This will be used for read access.
Definition: entityStateComponent.h:208
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
void advanceAggregateFrame(const DtAggregateStateComponentData &data)
Definition: aggregateStateComponent.h:107
DtAggregateStateComponentData myAggregateData
Definition: aggregateStateComponent.h:113
virtual void aboutToBeDeleted()
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
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:76
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
virtual void aboutToBeDeleted() override
Definition: aggregateStateComponent.h:159
DtAggregateFormation myFormation
Definition: aggregateStateComponent.h:47
DtAggregateStateComponentCurrentFrame myCurrentFrameState
Definition: aggregateStateComponent.h:167
Contains the declaration of the DtExtent class.
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: aggregateStateComponent.h:127
virtual DtFrameStateInterface * nextFrameState() override
Definition: aggregateStateComponent.h:126
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
Definition: stateComponent.h:65
DtEntityStateComponentData & operator=(const DtEntityStateComponentData &rhs)
Definition: entityStateComponent.h:49
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
DtString myFormationName
Definition: aggregateStateComponent.h:48
LOM::WriteEntityRepository myWriteAggregateStateRepository
Definition: aggregateStateComponent.h:169