10 #include <vlutil/vlString.h>
49 : DtFrameStateInterface(storage)
68 virtual const int& airTurbulence()
const override;
71 virtual void setAirTurbulence(
const int&)
override;
77 virtual void makeReadOnly()
override {};
96 virtual const int& airTurbulence()
const override;
100 void completeSetup();
102 void updateVrfStateComponentParameters();
105 void updateAirTurbulence();
147 if (myNextFrameState.isWritable())
149 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
152 myCurrentFrameState.emitComponentUpdated();
159 myCurrentFrameState.updateStateData(sd);
160 myNextFrameState.updateStateData(sd);
167 myCurrentFrameState.aboutToBeDeleted();
168 myNextFrameState.aboutToBeDeleted();
DtAirTurbulenceStateComponentData & frameState()
Definition: airTurbulenceStateComponent.h:65
boost::signals2::scoped_connection myVrfStateComponentChangedConnection
Signal connection for VRF state component change notifications.
Definition: airTurbulenceStateComponent.h:117
DtAirTurbulenceStateComponentData myData
Current-frame air turbulence data buffer.
Definition: airTurbulenceStateComponent.h:123
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
virtual void updateDataStorage() override
Copies next-frame data into the current frame buffer if the next frame is writable, then notifies listeners that the component has been updated.
Definition: airTurbulenceStateComponent.h:145
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: airTurbulenceStateComponent.h:42
DtAirTurbulenceStateComponentData & operator=(const DtAirTurbulenceStateComponentData &orig)
Definition: airTurbulenceStateComponent.h:26
2) Define the next frame class. This will be used for write access.
Definition: airTurbulenceStateComponent.h:57
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: airTurbulenceStateComponent.h:137
virtual void updateStateData(DtStateData *sd) override
Updates the state data pointer for both current and next frame states.
Definition: airTurbulenceStateComponent.h:157
void advanceFrame(const DtAirTurbulenceStateComponentData &data)
Advances the current frame by copying data into the local buffer.
Definition: airTurbulenceStateComponent.h:110
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
DtStateComponentCreator< DtAirTurbulenceStateComponentImplementation > DtAirTurbulenceStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: airTurbulenceStateComponent.h:180
3) Define the current frame class. This will be used for read access.
Definition: airTurbulenceStateComponent.h:85
#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 void makeWritable() override
Override to make component writable.
Definition: airTurbulenceStateComponent.h:74
boost::signals2::scoped_connection myCompleteSetupConnection
Signal connection used to defer component setup until after the first frame advance.
Definition: airTurbulenceStateComponent.h:119
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
const DtAirTurbulenceStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: airTurbulenceStateComponent.h:93
const DtAirTurbulenceStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: airTurbulenceStateComponent.h:64
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
virtual DtFrameStateInterface * nextFrameState() override
Definition: airTurbulenceStateComponent.h:139
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: airTurbulenceStateComponent.h:141
bool isDoubleBuffered()
Definition: airTurbulenceStateComponent.h:135
#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
virtual void aboutToBeDeleted() override
Performs cleanup on both current and next frame states before deletion.
Definition: airTurbulenceStateComponent.h:164
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
DtAirTurbulenceStateComponentData(const DtAirTurbulenceStateComponentData &orig)
Definition: airTurbulenceStateComponent.h:21
Definition: stateComponent.h:96
#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
Data container holding air turbulence parameters for a single simulation entity.
Definition: airTurbulenceStateComponent.h:15
int myAirTurbulence
Air turbulence intensity level.
Definition: airTurbulenceStateComponent.h:37
Contains the DtStateComponent class declaration.
DtAirTurbulenceStateComponentCurrentFrame myCurrentFrameState
Current-frame (read) state instance.
Definition: airTurbulenceStateComponent.h:173
Definition: vrfObjectManipulationHandlerBaseClass.h:68
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: airTurbulenceStateComponent.h:128
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
DtAirTurbulenceStateComponentData()
Definition: airTurbulenceStateComponent.h:17
DtAirTurbulenceStateComponentNextFrame myNextFrameState
Next-frame (write) state instance.
Definition: airTurbulenceStateComponent.h:175