X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FTraffic%2FSchedFlight.hxx;h=0ee3eb6bd1f9c5b3056daa27b0488810ec53c59b;hb=2ba4f3ddad94c6045160663578b66bb573fd05ac;hp=7e74afcc55747cf39f7b9f0282715829bcf93ce9;hpb=c9813d1b5d79b4aad13c263690a0223086af25ac;p=flightgear.git diff --git a/src/Traffic/SchedFlight.hxx b/src/Traffic/SchedFlight.hxx index 7e74afcc5..0ee3eb6bd 100644 --- a/src/Traffic/SchedFlight.hxx +++ b/src/Traffic/SchedFlight.hxx @@ -43,7 +43,7 @@ using namespace std; -SG_USING_STD(vector); +using std::vector; class FGScheduledFlight @@ -55,11 +55,14 @@ private: FGAirport *arrivalPort; string depId; string arrId; + string requiredAircraft; time_t departureTime; time_t arrivalTime; time_t repeatPeriod; int cruiseAltitude; + bool initialized; + bool available; @@ -74,7 +77,8 @@ public: int cruiseAlt, const string& deptime, const string& arrtime, - const string& rep + const string& rep, + const string& reqAC ); ~FGScheduledFlight(); @@ -95,13 +99,24 @@ public: { return (departureTime < other.departureTime); }; + string& getFlightRules() { return fltRules; }; time_t processTimeString(const string& time); const string& getCallSign() {return callsign; }; + const string& getRequirement() { return requiredAircraft; } + + void lock() { available = false; }; + void release() { available = true; }; + + bool isAvailable() { return available; }; }; -typedef vector FGScheduledFlightVec; -typedef vector::iterator FGScheduledFlightVecIterator; +typedef vector FGScheduledFlightVec; +typedef vector::iterator FGScheduledFlightVecIterator; + +typedef std::map < std::string, FGScheduledFlightVec > FGScheduledFlightMap; + +bool compareScheduledFlights(FGScheduledFlight *a, FGScheduledFlight *b); #endif