10 #include "legionDataStore/writeStateInstance.h"
12 #include <vlutil/vlString.h>
57 DtString myDestination;
68 : DtFrameStateInterface(storage)
92 virtual const int mmsi()
const override;
93 virtual void setMmsi(
const int&)
override;
95 virtual const int imo()
const override;
96 virtual void setImo(
const int&)
override;
98 virtual const int eta()
const override;
99 virtual void setEta(
const int&)
override;
101 virtual const DtString destination()
const override;
102 virtual void setDestination(
const DtString&)
override;
104 virtual const int status()
const override;
105 virtual void setStatus(
const int&)
override;
111 virtual void makeReadOnly()
override {};
129 virtual const int mmsi()
const override;
130 virtual const int imo()
const override;
131 virtual const int eta()
const override;
132 virtual const DtString destination()
const override;
133 virtual const int status()
const override;
135 friend class DtAisDataStateImplementation;
159 if (myNextFrameState.isWritable())
161 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
164 myCurrentFrameState.emitComponentUpdated();
169 myCurrentFrameState.updateStateData(sd);
170 myNextFrameState.updateStateData(sd);
176 myCurrentFrameState.aboutToBeDeleted();
177 myNextFrameState.aboutToBeDeleted();
int myImo
Definition: aisDataStateComponent.h:54
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: aisDataStateComponent.h:153
bool isDoubleBuffered()
Definition: aisDataStateComponent.h:152
3) Define the current frame class. This will be used for read access.
Definition: aisDataStateComponent.h:119
Definition: stateComponent.h:269
const DtAisDataStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: aisDataStateComponent.h:89
virtual void aboutToBeDeleted() override
Definition: aisDataStateComponent.h:173
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: aisDataStateComponent.h:167
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aisDataStateComponent.h:147
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: aisDataStateComponent.h:157
DtStateComponentCreator< DtAisDataStateComponentImplementation > DtAisDataStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: aisDataStateComponent.h:187
DtAisDataStateComponentData()
Definition: aisDataStateComponent.h:18
int myStatus
Definition: aisDataStateComponent.h:56
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
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
void advanceFrame(const DtAisDataStateComponentData &data)
Definition: aisDataStateComponent.h:136
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
virtual void aboutToBeDeleted()
virtual DtFrameStateInterface * nextFrameState() override
Definition: aisDataStateComponent.h:154
DtAisDataStateComponentData & frameState()
Definition: aisDataStateComponent.h:90
Definition: aisDataStateComponent.h:16
int myMmsi
Definition: aisDataStateComponent.h:53
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
Definition: stateComponent.h:98
const DtAisDataStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aisDataStateComponent.h:127
DtAisDataStateComponentData & operator=(const DtAisDataStateComponentData &orig)
Definition: aisDataStateComponent.h:35
DtAisDataStateComponentNextFrame myNextFrameState
Definition: aisDataStateComponent.h:182
#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
DtString myDestination
Definition: aisDataStateComponent.h:57
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: aisDataStateComponent.h:62
2) Define the next frame class. This will be used for write access.
Definition: aisDataStateComponent.h:81
DtAisDataStateComponentData(const DtAisDataStateComponentData &orig)
Definition: aisDataStateComponent.h:26
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: aisDataStateComponent.h:155
Contains the DtStateComponent class declaration.
int myEta
Definition: aisDataStateComponent.h:55
DtAisDataStateComponentData myData
Definition: aisDataStateComponent.h:142
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
DtAisDataStateComponentCurrentFrame myCurrentFrameState
Definition: aisDataStateComponent.h:181
virtual void makeWritable() override
Override to make component writable.
Definition: aisDataStateComponent.h:108