11 #include "legionDataStore/writeStateInstance.h"
12 #include <boost/signals2.hpp>
14 #include <vlutil/vlString.h>
39 virtual const std::map<DtUUID, DtRunwayStateData>&
runways()
const {
throw DtUnimplementedMethod(
"The std::map<DtUUID, DtRunwayStateData> runways() const method is unimplemented"); };
40 virtual void setRunways(
const std::map<DtUUID, DtRunwayStateData>&) {
throw DtUnimplementedMethod(
"The void setRunways(const std::map<DtUUID, DtRunwayStateData>&) method is unimplemented"); };
63 const bool& isLocal()
const;
64 void setIsLocal(
const bool&);
66 const bool& active()
const;
67 void setActive(
const bool&);
72 const DtUUID& uuid()
const;
73 void setUUID(
const DtUUID&);
76 void setAirportCode(
const DtString&);
78 unsigned char value(
const DtString&)
const;
79 void setValue(
const DtString&,
unsigned char);
80 void restoreFromArchive(
const DtString&);
82 unsigned char runwayValue(
const DtString&,
const DtString& runwayName)
const;
83 void setRunwayValue(
const DtString&,
unsigned char,
const DtString& runwayName);
85 std::vector<DtString> runwaysArchived()
const;
97 const DtForceType forceType()
const;
98 void setForceType(
const DtForceType&);
100 const UInt32 appearanceBits()
const;
101 void setAppearanceBits(
const UInt32&);
103 const DtEntityType
entityType()
const {
return DtEntityType(objectType()); };
105 void setEntityType(
const DtEntityType& t);
107 const DtEntityIdentifier& entityId()
const;
108 void setEntityId(
const DtEntityIdentifier&);
111 void removeRunway(
const DtUUID&);
117 const std::map<DtUUID, DtRunwayStateData>& runways()
const;
118 void setRunways(
const std::map<DtUUID, DtRunwayStateData>&);
120 void restoreRunwaysFromArchive(
const std::vector<DtString>&);
137 const bool& isLocal()
const;
138 const bool& active()
const;
140 const DtUUID& uuid()
const;
141 const DtString& airportCode()
const;
144 return airportCode();
147 const UInt32 appearanceBits()
const;
148 const DtEntityType
entityType()
const {
return DtEntityType(objectType()); };
150 const DtEntityIdentifier& entityId()
const;
151 std::vector<DtString> runwaysArchived()
const;
152 unsigned char value(
const DtString&)
const;
153 unsigned char runwayValue(
const DtString&,
const DtString& runwayName)
const;
155 const DtForceType forceType()
const;
159 const std::map<DtUUID, DtRunwayStateData>& runways()
const;
188 if (myNextFrameState.isWritable())
190 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
193 myCurrentFrameState.emitComponentUpdated();
198 myCurrentFrameState.updateStateData(sd);
199 myNextFrameState.updateStateData(sd);
205 myCurrentFrameState.aboutToBeDeleted();
206 myNextFrameState.aboutToBeDeleted();
209 virtual void addAdditionalStateComponents()
override;
213 virtual void convertToRemote();
216 virtual void convertToLocal();
DtAerodromeStateData myData
Definition: aerodromeStateComponent.h:124
UUID is a unique ID wrapper class.
Definition: uuid.h:59
bool isDoubleBuffered()
Definition: aerodromeStateComponent.h:181
unsigned int UInt32
Definition: stateDataTypes.h:18
DtStateComponentCreator< DtAerodromeStateComponentImplementation > DtAerodromeStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: aerodromeStateComponent.h:226
Definition: stateComponent.h:66
Definition: stateDataTypes.h:23
DtStateData * myStateData
Definition: aerodromeStateComponent.h:169
virtual const DtRunwayLightStateData & runwayState(const std::string &) const
Definition: aerodromeStateComponent.h:38
3) Define the current frame class. This will be used for read access.
Definition: aerodromeStateComponent.h:128
virtual DtRunwayStateData & runway(const std::string &)
Definition: aerodromeStateComponent.h:35
const DtEntityType entityType() const
Definition: aerodromeStateComponent.h:103
Definition: aerodromeStateData.h:498
Definition: stateComponent.h:266
The DtSimulatedObjectStateComponent is an interface that all main components (those that are consider...
Definition: simulatedObjectStateComponent.h:21
const DtAerodromeStateData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: aerodromeStateComponent.h:60
#define UNDEFINED_RETURNREF_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:34
DtAerodromeStateData & frameState()
Definition: aerodromeStateComponent.h:61
void setMarkingText(const DtString &t)
Definition: aerodromeStateComponent.h:92
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: aerodromeStateComponent.h:186
2) Define the next frame class. This will be used for write access.
Definition: aerodromeStateComponent.h:53
Definition: objectType.h:27
Legion::WriteStateInstance writeStateInstance() override
Definition: aerodromeStateComponent.h:210
const DtFrameStateInterface * currentFrameState() const
Definition: aerodromeStateComponent.h:182
virtual void restoreFromArchive(const DtString &)
Definition: aerodromeStateComponent.h:47
const DtString & markingText() const
Definition: aerodromeStateComponent.h:87
virtual DtFrameStateInterface * nextFrameState()
Definition: aerodromeStateComponent.h:183
const DtAerodromeStateData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aerodromeStateComponent.h:135
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
virtual void restoreRunwaysFromArchive(const std::vector< DtString > &)
Definition: aerodromeStateComponent.h:42
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:228
DtStateData * myStateData
Definition: aerodromeStateComponent.h:123
virtual const std::map< DtUUID, DtRunwayStateData > & runways() const
Definition: aerodromeStateComponent.h:39
virtual const DtRunwayStateData & runway(const std::string &) const
Definition: aerodromeStateComponent.h:37
virtual std::vector< DtString > runwaysArchived() const
Definition: aerodromeStateComponent.h:41
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:379
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: aerodromeStateComponent.h:196
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: aerodromeStateComponent.h:20
Definition: aerodromeStateData.h:17
virtual void aboutToBeDeleted()
virtual const DtFrameStateInterface * nextFrameState() const
Definition: aerodromeStateComponent.h:184
Legion::WriteStateInstance myWriteStateInstance
Definition: aerodromeStateComponent.h:221
virtual void setValue(const DtString &, unsigned char)
Definition: aerodromeStateComponent.h:46
virtual DtRunwayStateData & runway(const DtUUID &)
Definition: aerodromeStateComponent.h:34
DtAerodromeStateData myData
Definition: aerodromeStateComponent.h:170
virtual unsigned char runwayValue(const DtString &, const DtString &runwayName) const
Definition: aerodromeStateComponent.h:43
const DtEntityType entityType() const
Definition: aerodromeStateComponent.h:148
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
virtual const DtRunwayStateData & runway(const DtUUID &) const
Definition: aerodromeStateComponent.h:36
DtAerodromeStateComponentCurrentFrame myCurrentFrameState
Definition: aerodromeStateComponent.h:219
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aerodromeStateComponent.h:175
DtAerodromeStateComponentNextFrame myNextFrameState
Definition: aerodromeStateComponent.h:220
virtual unsigned char value(const DtString &) const
Definition: aerodromeStateComponent.h:45
#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
virtual void aboutToBeDeleted() override
Definition: aerodromeStateComponent.h:202
const DtString & markingText() const
Definition: aerodromeStateComponent.h:142
virtual void setRunwayValue(const DtString &, unsigned char, const DtString &runwayName)
Definition: aerodromeStateComponent.h:44
virtual void setRunways(const std::map< DtUUID, DtRunwayStateData > &)
Definition: aerodromeStateComponent.h:40
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
virtual void removeRunway(const DtUUID &)
Definition: aerodromeStateComponent.h:33
void advanceFrame(const DtAerodromeStateData &data)
Definition: aerodromeStateComponent.h:163
Definition: aerodromeStateData.h:355