]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ground.hxx
Modified Files:
[flightgear.git] / src / ATC / ground.hxx
index ffc668c4ab400ac8282734009775ed3a22bc6320..43f5c0a31e26817da196c87902aab8f96c1e5445 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 #ifndef _FG_GROUND_HXX
 #define _FG_GROUND_HXX
 
-#include STL_IOSTREAM
-#include STL_STRING
-
-SG_USING_STD(string);
-SG_USING_STD(ios);
-
 #include <map>
 #include <vector>
 #include <list>
+
 #include <simgear/math/point3d.hxx>
 #include <simgear/misc/sgstream.hxx>
 #include <simgear/math/sg_geodesy.hxx>
+#include <simgear/props/props.hxx>
 
 #include "ATC.hxx"
-//#include "ATCmgr.hxx"
 #include "ATCProjection.hxx"
-#include "AIEntity.hxx"
-//#include "AILocalTraffic.hxx"        // RunwayDetails - this is a temporary hack
+
+#include STL_IOSTREAM
+#include STL_STRING
+
+SG_USING_STD(string);
+SG_USING_STD(ios);
 
 SG_USING_STD(map);
 SG_USING_STD(vector);
 SG_USING_STD(list);
 
+class FGAIEntity;
+class FGATCMgr;
+
 //////////////////////////////////////////////////////
 // Types for the logical network data structure
 enum arc_type {
@@ -225,19 +227,19 @@ class FGGround : public FGATC {
 
 public:
        FGGround();
-       FGGround(string id);
+       FGGround(const string& id);
        ~FGGround();
     void Init();
 
     void Update(double dt);
        
-       inline string get_trans_ident() { return trans_ident; }
+       inline const string& get_trans_ident() { return trans_ident; }
 
     // Contact ground control on arrival, assumed to request any gate
     //void NewArrival(plane_rec plane);
 
     // Contact ground control on departure, assumed to request currently active runway.
-    void RequestDeparture(PlaneRec plane, FGAIEntity* requestee);
+    void RequestDeparture(const PlaneRec& plane, FGAIEntity* requestee);
 
     // Contact ground control when the calling routine doesn't know if arrival
     // or departure is appropriate.
@@ -256,22 +258,22 @@ public:
        Gate* GetGateNode();
        
        // Return a pointer to a hold short node
-       node* GetHoldShortNode(string rwyID);
+       node* GetHoldShortNode(const string& rwyID);
        
        // Runway stuff - this might change in the future.
        // Get a list of exits from a given runway
        // It is up to the calling function to check for non-zero size of returned array before use
-       node_array_type GetExits(string rwyID);
+       node_array_type GetExits(const string& rwyID);
        
        // Get a path from one node to another
        ground_network_path_type GetPath(node* A, node* B);
        
        // Get a path from a node to a runway threshold
-       ground_network_path_type GetPath(node* A, string rwyID);
+       ground_network_path_type GetPath(node* A, const string& rwyID);
        
        // Get a path from a node to a runway hold short point
        // Bit of a hack this at the moment!
-       ground_network_path_type GetPathToHoldShort(node* A, string rwyID);
+       ground_network_path_type GetPathToHoldShort(node* A, const string& rwyID);
 
 private:
        FGATCMgr* ATCmgr;       
@@ -308,8 +310,8 @@ private:
     //NextClearance(ground_rec &g);
        
        // environment - need to make sure we're getting the surface winds and not winds aloft.
-       SGPropertyNode* wind_from_hdg;  //degrees
-       SGPropertyNode* wind_speed_knots;               //knots
+       SGPropertyNode_ptr wind_from_hdg;       //degrees
+       SGPropertyNode_ptr wind_speed_knots;            //knots
        
        // for failure modeling
        string trans_ident;             // transmitted ident
@@ -351,7 +353,7 @@ private:
        
        // Return a pointer to the node at a runway threshold
        // Returns NULL if unsuccessful.
-       node* GetThresholdNode(string rwyID);
+       node* GetThresholdNode(const string& rwyID);
        
        // A shortest path algorithm from memory (I can't find the bl&*dy book again!)
        ground_network_path_type GetShortestPath(node* A, node* B);