19 : myFormation(DtOtherAggregateFormation)
20 , myAggregateState(DtOtherAggregateState)
26 , myFormationName(orig.myFormationName)
27 , myAggregateState(orig.myAggregateState)
28 , myFormation(orig.myFormation)
29 , myFormationState(orig.myFormationState)
53 DtAggregateFormation myFormation;
54 DtString myFormationName;
55 DtAggregateState myAggregateState;
66 : DtEntityStateComponent(storage)
89 const DtString& formationName()
const;
90 void setFormationName(
const DtString&);
92 const DtAggregateState& aggregateState()
const;
93 void setAggregateState(
const DtAggregateState&);
95 const DtAggregateFormation& formation()
const;
96 void setFormation(
const DtAggregateFormation&);
112 const DtString& formationName()
const;
113 const DtAggregateState& aggregateState()
const;
114 const DtAggregateFormation& formation()
const;
120 myAggregateData = data;
142 if (myNextFrameState.isWritable())
144 myCurrentFrameState.advanceAggregateFrame(myNextFrameState.aggregateFrameState());
145 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
148 myCurrentFrameState.checkForUpdatedItems();
149 myCurrentFrameState.emitComponentUpdated();
154 myCurrentFrameState.updateStateData(sd);
155 myNextFrameState.updateStateData(sd);
158 Legion::WriteStateInstance
writeStateInstance()
override {
return myWriteAggregateStateRepository; };
161 virtual void convertToRemote();
164 virtual void convertToLocal();
166 virtual void addAdditionalStateComponents()
override;
168 virtual bool forceAdvance()
override;
173 myCurrentFrameState.aboutToBeDeleted();
174 myNextFrameState.aboutToBeDeleted();
2) Define the next frame class. This will be used for write access.
Definition: entityStateComponent.h:103
3) Define the current frame class. This will be used for read access.
Definition: aggregateStateComponent.h:103
DtAggregateStateComponentData(const DtAggregateStateComponentData &orig)
Definition: aggregateStateComponent.h:24
DtAggregateStateComponentData operator=(const DtAggregateStateComponentData &rhs)
Definition: aggregateStateComponent.h:33
DtAggregateStateComponentNextFrame myNextFrameState
Definition: aggregateStateComponent.h:179
DtAggregateStateComponentData()
Definition: aggregateStateComponent.h:18
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aggregateStateComponent.h:129
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: entityStateComponent.h:70
const DtAggregateStateComponentData & aggregateFrameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aggregateStateComponent.h:109
DtAggregateState myAggregateState
Definition: aggregateStateComponent.h:55
Definition: stateComponent.h:257
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: aggregateStateComponent.h:140
2) Define the next frame class. This will be used for write access.
Definition: aggregateStateComponent.h:77
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:60
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:40
DtAggregateStateComponentData myAggregateData
Definition: aggregateStateComponent.h:99
const DtFrameStateInterface * currentFrameState() const
Definition: aggregateStateComponent.h:136
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:185
bool isDoubleBuffered()
Definition: aggregateStateComponent.h:135
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: aggregateStateComponent.h:152
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
Legion::WriteStateInstance writeStateInstance() override
Definition: aggregateStateComponent.h:158
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:219
DtAggregateStateComponentData & aggregateFrameState()
Definition: aggregateStateComponent.h:84
3) Define the current frame class. This will be used for read access.
Definition: entityStateComponent.h:171
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:370
void advanceAggregateFrame(const DtAggregateStateComponentData &data)
Definition: aggregateStateComponent.h:118
DtAggregateStateComponentData myAggregateData
Definition: aggregateStateComponent.h:124
virtual void aboutToBeDeleted()
virtual const DtFrameStateInterface * nextFrameState() const
Definition: aggregateStateComponent.h:138
#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:83
#define DEFINE_REF_ACCESSORS(ReturnType, Method, Member)
Definition: doubleBufferedDataStorage.h:13
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
virtual void aboutToBeDeleted() override
Definition: aggregateStateComponent.h:170
DtAggregateFormation myFormation
Definition: aggregateStateComponent.h:53
DtAggregateStateComponentCurrentFrame myCurrentFrameState
Definition: aggregateStateComponent.h:178
Contains the declaration of the DtExtent class.
virtual DtFrameStateInterface * nextFrameState()
Definition: aggregateStateComponent.h:137
#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:43
DtFormationState myFormationState
Definition: aggregateStateComponent.h:51
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:282
DtString myFormationName
Definition: aggregateStateComponent.h:54
LOM::WriteEntityRepository myWriteAggregateStateRepository
Definition: aggregateStateComponent.h:180