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& checkForNameReservation()
const;
67 void setCheckForNameReservation(
const bool&);
69 const bool& active()
const;
70 void setActive(
const bool&);
75 const DtUUID& uuid()
const;
76 void setUUID(
const DtUUID&);
79 void setAirportCode(
const DtString&);
81 unsigned char value(
const DtString&)
const;
82 void setValue(
const DtString&,
unsigned char);
83 void restoreFromArchive(
const DtString&);
85 unsigned char runwayValue(
const DtString&,
const DtString& runwayName)
const;
86 void setRunwayValue(
const DtString&,
unsigned char,
const DtString& runwayName);
88 std::vector<DtString> runwaysArchived()
const;
100 const DtForceType forceType()
const;
101 void setForceType(
const DtForceType&);
103 const UInt32 appearanceBits()
const;
104 void setAppearanceBits(
const UInt32&);
106 const DtEntityType
entityType()
const {
return DtEntityType(objectType()); };
107 const DtObjectType objectType()
const;
108 void setEntityType(
const DtEntityType& t);
110 const DtEntityIdentifier& entityId()
const;
111 void setEntityId(
const DtEntityIdentifier&);
114 void removeRunway(
const DtUUID&);
120 const std::map<DtUUID, DtRunwayStateData>& runways()
const;
121 void setRunways(
const std::map<DtUUID, DtRunwayStateData>&);
123 void restoreRunwaysFromArchive(
const std::vector<DtString>&);
140 const bool& isLocal()
const;
141 const bool& checkForNameReservation()
const;
142 const bool& active()
const;
144 const DtUUID& uuid()
const;
145 const DtString& airportCode()
const;
148 return airportCode();
151 const UInt32 appearanceBits()
const;
152 const DtEntityType
entityType()
const {
return DtEntityType(objectType()); };
153 const DtObjectType objectType()
const;
154 const DtEntityIdentifier& entityId()
const;
155 std::vector<DtString> runwaysArchived()
const;
156 unsigned char value(
const DtString&)
const;
157 unsigned char runwayValue(
const DtString&,
const DtString& runwayName)
const;
159 const DtForceType forceType()
const;
163 const std::map<DtUUID, DtRunwayStateData>& runways()
const;
192 if (myNextFrameState.isWritable())
194 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
197 myCurrentFrameState.emitComponentUpdated();
202 myCurrentFrameState.updateStateData(sd);
203 myNextFrameState.updateStateData(sd);
209 myCurrentFrameState.aboutToBeDeleted();
210 myNextFrameState.aboutToBeDeleted();
213 virtual void addAdditionalStateComponents()
override;
217 virtual void convertToRemote();
220 virtual void convertToLocal();
DtAerodromeStateData myData
Definition: aerodromeStateComponent.h:127
UUID is a unique ID wrapper class.
Definition: uuid.h:59
bool isDoubleBuffered()
Definition: aerodromeStateComponent.h:185
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:230
Definition: stateComponent.h:66
Definition: stateDataTypes.h:23
DtStateData * myStateData
Definition: aerodromeStateComponent.h:173
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:131
virtual DtRunwayStateData & runway(const std::string &)
Definition: aerodromeStateComponent.h:35
const DtEntityType entityType() const
Definition: aerodromeStateComponent.h:106
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:95
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: aerodromeStateComponent.h:190
2) Define the next frame class. This will be used for write access.
Definition: aerodromeStateComponent.h:53
Legion::WriteStateInstance writeStateInstance() override
Definition: aerodromeStateComponent.h:214
const DtFrameStateInterface * currentFrameState() const
Definition: aerodromeStateComponent.h:186
virtual void restoreFromArchive(const DtString &)
Definition: aerodromeStateComponent.h:47
const DtString & markingText() const
Definition: aerodromeStateComponent.h:90
virtual DtFrameStateInterface * nextFrameState()
Definition: aerodromeStateComponent.h:187
const DtAerodromeStateData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aerodromeStateComponent.h:138
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:126
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:200
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:188
Legion::WriteStateInstance myWriteStateInstance
Definition: aerodromeStateComponent.h:225
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:174
virtual unsigned char runwayValue(const DtString &, const DtString &runwayName) const
Definition: aerodromeStateComponent.h:43
const DtEntityType entityType() const
Definition: aerodromeStateComponent.h:152
#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:223
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aerodromeStateComponent.h:179
DtAerodromeStateComponentNextFrame myNextFrameState
Definition: aerodromeStateComponent.h:224
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:206
const DtString & markingText() const
Definition: aerodromeStateComponent.h:146
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:167
Definition: aerodromeStateData.h:355