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 const DtString& formationName()
const;
80 void setFormationName(
const DtString&);
82 const DtAggregateState& aggregateState()
const;
83 void setAggregateState(
const DtAggregateState&);
85 const DtAggregateFormation& formation()
const;
86 void setFormation(
const DtAggregateFormation&);
101 const DtString& formationName()
const;
102 const DtAggregateState& aggregateState()
const;
103 const DtAggregateFormation& formation()
const;
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 Legion::WriteStateInstance
writeStateInstance()
override {
return myWriteAggregateStateRepository; };
150 virtual void convertToRemote();
153 virtual void convertToLocal();
155 virtual void addAdditionalStateComponents()
override;
157 virtual bool forceAdvance()
override;
162 myCurrentFrameState.aboutToBeDeleted();
163 myNextFrameState.aboutToBeDeleted();
2) Define the next frame class. This will be used for write access.
Definition: entityStateComponent.h:115
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
DtAggregateStateComponentData()
Definition: aggregateStateComponent.h:17
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:79
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:266
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: aggregateStateComponent.h:129
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
const DtFrameStateInterface * currentFrameState() const
Definition: aggregateStateComponent.h:125
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
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: aggregateStateComponent.h:141
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
Legion::WriteStateInstance writeStateInstance() override
Definition: aggregateStateComponent.h:147
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:228
DtAggregateStateComponentData & aggregateFrameState()
Definition: aggregateStateComponent.h:77
3) Define the current frame class. This will be used for read access.
Definition: entityStateComponent.h:189
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:379
void advanceAggregateFrame(const DtAggregateStateComponentData &data)
Definition: aggregateStateComponent.h:107
DtAggregateStateComponentData myAggregateData
Definition: aggregateStateComponent.h:113
virtual void aboutToBeDeleted()
virtual const DtFrameStateInterface * nextFrameState() const
Definition: aggregateStateComponent.h:127
#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 DtFrameStateInterface * nextFrameState()
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:64
DtEntityStateComponentData & operator=(const DtEntityStateComponentData &rhs)
Definition: entityStateComponent.h:46
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
DtString myFormationName
Definition: aggregateStateComponent.h:48
LOM::WriteEntityRepository myWriteAggregateStateRepository
Definition: aggregateStateComponent.h:169