]> git.mxchange.org Git - flightgear.git/commitdiff
Clean up header file use of iostream and "using" declarations
authortimoore <timoore>
Mon, 2 Jun 2008 21:09:51 +0000 (21:09 +0000)
committertimoore <timoore>
Mon, 2 Jun 2008 21:09:51 +0000 (21:09 +0000)
Replace include <iostream> with istream, ostream and/or iosfwd as
appropriate.

Remove using namespace std and using std::foo from header files.

48 files changed:
src/ATCDCL/ATCVoice.hxx
src/ATCDCL/approach.cxx
src/ATCDCL/approach.hxx
src/ATCDCL/atis.hxx
src/ATCDCL/ground.hxx
src/ATCDCL/tower.hxx
src/ATCDCL/transmission.cxx
src/ATCDCL/transmission.hxx
src/ATCDCL/transmissionlist.cxx
src/Cockpit/panel_io.cxx
src/Cockpit/panel_io.hxx
src/FDM/JSBSim/input_output/FGXMLElement.cpp
src/FDM/JSBSim/input_output/FGXMLElement.h
src/FDM/JSBSim/input_output/FGXMLFileRead.h
src/FDM/JSBSim/input_output/FGfdmSocket.cpp
src/FDM/JSBSim/input_output/FGfdmSocket.h
src/FDM/JSBSim/math/FGColumnVector3.cpp
src/FDM/JSBSim/math/FGColumnVector3.h
src/FDM/JSBSim/math/FGCondition.cpp
src/FDM/JSBSim/math/FGCondition.h
src/FDM/JSBSim/math/FGFunction.cpp
src/FDM/JSBSim/math/FGFunction.h
src/FDM/JSBSim/math/FGMatrix33.cpp
src/FDM/JSBSim/math/FGMatrix33.h
src/FDM/JSBSim/models/FGAerodynamics.h
src/FDM/JSBSim/models/FGGroundReactions.cpp
src/FDM/JSBSim/models/FGInput.h
src/FDM/JSBSim/models/FGLGear.cpp
src/FDM/JSBSim/models/FGMassBalance.h
src/FDM/JSBSim/models/FGModel.h
src/FDM/JSBSim/models/FGOutput.cpp
src/FDM/JSBSim/models/FGOutput.h
src/FDM/JSBSim/models/FGPropulsion.cpp
src/FDM/JSBSim/models/FGPropulsion.h
src/FDM/JSBSim/models/flight_control/FGActuator.cpp
src/FDM/JSBSim/models/flight_control/FGFCSComponent.h
src/FDM/JSBSim/models/propulsion/FGEngine.cpp
src/FDM/LaRCsim/IO360.hxx
src/FDM/UIUCModel/uiuc_aircraft.h
src/FDM/UIUCModel/uiuc_engine.cpp
src/FDM/UIUCModel/uiuc_menu_functions.h
src/FDM/UIUCModel/uiuc_warnings_errors.cpp
src/FDM/UIUCModel/uiuc_warnings_errors.h
src/FDM/YASim/Rotorpart.hpp
src/Main/fg_init.cxx
src/Main/logger.hxx
src/Navaids/fix.hxx
src/Navaids/navrecord.hxx

index a5ea59394f084a3e9eb46d03fa00639ab516e5e2..0bc501c2065498f901dcfa8122bf6d65fe8520fb 100644 (file)
 
 #if defined( SG_HAVE_STD_INCLUDES ) || defined( __BORLANDC__ ) || (__APPLE__)
 #  include <fstream>
-#  include <iostream>
 #else
 #  include <fstream.h>
-#  include <iostream.h>
 #endif
 
 #include <map>
@@ -41,18 +39,13 @@ SG_USING_STD(map);
 SG_USING_STD(list);
 SG_USING_STD(string);
 
-SG_USING_STD(cout);
-SG_USING_STD(ios);
-SG_USING_STD(ofstream);
-SG_USING_STD(ifstream);
-
 
 struct WordData {
        unsigned int offset;    // Offset of beginning of word sample into raw sound sample
        unsigned int length;    // Byte length of word sample
 };
 
-typedef map < string, WordData > atc_word_map_type;
+typedef std::map < std::string, WordData > atc_word_map_type;
 typedef atc_word_map_type::iterator atc_word_map_iterator;
 typedef atc_word_map_type::const_iterator atc_word_map_const_iterator;
 
@@ -65,7 +58,7 @@ public:
 
        // Load the two voice files - one containing the raw sound data (.wav) and one containing the word positions (.vce).
        // Return true if successful.   
-       bool LoadVoice(const string& voice);
+       bool LoadVoice(const std::string& voice);
        
        // Given a desired message, return a pointer to the data buffer and write the buffer length into len.
        // Sets dataOK = true if the returned buffer is valid.
index 44784abf1e5b45c52db3bf70cea496b4fdbb661a..296e3446b102337ac349cd4c060b43bfe566cf35 100644 (file)
@@ -22,6 +22,8 @@
 #  include <config.h>
 #endif
 
+#include <iostream>
+
 #include "approach.hxx"
 #include "transmission.hxx"
 #include "transmissionlist.hxx"
@@ -38,6 +40,9 @@
 
 #include <GUI/gui.h>
 
+using std::cout;
+using std::endl;
+
 //Constructor
 FGApproach::FGApproach(){
   comm1_node = fgGetNode("/instrumentation/comm[0]/frequencies/selected-mhz", true);
index 9aec71d0174e96bc9535d99387d31ffe8ca27609..ad6bea6a2c4030dbd80317cad9229c9e567d2aa3 100644 (file)
 #include <Main/fg_props.hxx>
 
 #ifdef SG_HAVE_STD_INCLUDES
-#  include <istream>
-#include <iomanip>
+#  include <iosfwd>
 #elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 #  include <iostream.h>
 #elif defined( __BORLANDC__ )
 #  include <iostream>
 #else
 #  include <istream.h>
-#include <iomanip.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-SG_USING_STD(istream);
-#endif
-
-SG_USING_STD(string);
-
 #include "ATC.hxx"
 #include "transmission.hxx"
 
@@ -67,7 +59,7 @@ const double lfl    = 10.0;    // length of final leg
 struct PlaneApp {
 
   // variables for plane if it's on the radar
-  string ident;          // indentification of plane
+  std::string ident;          // indentification of plane
   double lon;            // longitude in degrees
   double lat;            // latitude in degrees
   double alt;            // Altitute above sea level in feet
@@ -111,7 +103,7 @@ class FGApproach : public FGATC {
 
   int      bucket;
 
-  string active_runway;         
+  std::string active_runway;         
   double active_rw_hdg;
   double active_rw_lon;
   double active_rw_lat;
@@ -119,7 +111,7 @@ class FGApproach : public FGATC {
 
   int      num_planes;          // number of planes on the stack
   PlaneApp planes[max_planes];  // Array of planes
-  string   transmission;
+  std::string   transmission;
   bool     first;
 
   SGPropertyNode_ptr comm1_node;
@@ -138,7 +130,7 @@ class FGApproach : public FGATC {
   SGPropertyNode_ptr atcopt9_node;
 
   // for failure modeling
-  string trans_ident;  // transmitted ident
+  std::string trans_ident;     // transmitted ident
   bool approach_failed;        // approach failed?
 
 public:
@@ -153,14 +145,14 @@ public:
   // Add new plane to stack if not already registered 
   // Input:  pid - id of plane (name) 
   // Output: "true" if added; "false" if already existend
-  void AddPlane(const string& pid);
+  void AddPlane(const std::string& pid);
 
   // Remove plane from stack if out of range
   int RemovePlane();
   
   inline double get_bucket() const { return bucket; }
   inline int get_pnum() const { return num_planes; }
-  inline const string& get_trans_ident() { return trans_ident; }
+  inline const std::string& get_trans_ident() { return trans_ident; }
   
 private:
 
@@ -176,7 +168,7 @@ private:
 
   double angle_diff_deg( const double &a1, const double &a2);
 
-  void set_message(const string &s);
+  void set_message(const std::string &s);
 
 // ========================================================================
 // get point2 given starting point1 and course and distance
@@ -225,7 +217,7 @@ private:
   //Update the transmission string
   void UpdateTransmission(void);
   
-  friend istream& operator>> ( istream&, FGApproach& );
+  friend std::istream& operator>> ( std::istream&, FGApproach& );
 };
 
 #endif // _FG_APPROACH_HXX
index 05835d4a7975503a1873b3b56dd5099da19bacf5..c4c28e2d4c5ec623cc6e7510b84adc16bf72311e 100644 (file)
 #include <simgear/timing/sg_time.hxx>
 
 #ifdef SG_HAVE_STD_INCLUDES
-#  include <istream>
-#  include <iomanip>
+#  include <iosfwd>
 #elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
-#  include <iomanip.h>
 #endif
 
-SG_USING_STD(istream);
-SG_USING_STD(string);
-
 #include "ATC.hxx"
 
 //DCL - a complete guess for now.
@@ -53,12 +48,12 @@ SG_USING_STD(string);
 class FGATIS : public FGATC {
        
        //atc_type type;
-       string transmission;    // The actual ATIS transmission
+       std::string transmission;       // The actual ATIS transmission
        // This is not stored in default.atis but is generated
        // from the prevailing conditions when required.
        
        // for failure modeling
-       string trans_ident;             // transmitted ident
+       std::string trans_ident;                // transmitted ident
        bool atis_failed;               // atis failed?
        
        // Aircraft position
@@ -79,17 +74,17 @@ class FGATIS : public FGATC {
        void Update(double dt);
        
        //inline void set_type(const atc_type tp) {type = tp;}
-       inline const string& get_trans_ident() { return trans_ident; }
-       inline void set_refname(const string& r) { refname = r; } 
+       inline const std::string& get_trans_ident() { return trans_ident; }
+       inline void set_refname(const std::string& r) { refname = r; } 
        
        private:
        
-       string refname;         // Holds the refname of a transmission in progress
+       std::string refname;            // Holds the refname of a transmission in progress
        
        //Update the transmission string
        void UpdateTransmission(void);
        
-       friend istream& operator>> ( istream&, FGATIS& );
+       friend std::istream& operator>> ( std::istream&, FGATIS& );
 };
 
 #endif // _FG_ATIS_HXX
index 43f5c0a31e26817da196c87902aab8f96c1e5445..de8348b87a7eec4bb836803cfb1cef1d467034c0 100644 (file)
 #include "ATC.hxx"
 #include "ATCProjection.hxx"
 
-#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;
 
@@ -86,7 +78,7 @@ struct ground_network_element {
 
 struct arc : public ground_network_element {
        int distance;
-       string name;
+       std::string name;
        arc_type type;
        bool directed;  //false if 2-way, true if 1-way.  
        //This is a can of worms since arcs might be one way in different directions under different circumstances
@@ -95,7 +87,7 @@ struct arc : public ground_network_element {
        // If the arc is directed then flow is normally from n1 to n2.  See the above can of worms comment though.
 };
 
-typedef vector <arc*> arc_array_type;  // This was and may become again a list instead of vector
+typedef std::vector <arc*> arc_array_type;     // This was and may become again a list instead of vector
 typedef arc_array_type::iterator arc_array_iterator;
 typedef arc_array_type::const_iterator arc_array_const_iterator; 
 
@@ -106,13 +98,13 @@ struct node : public ground_network_element {
        unsigned int nodeID;    //each node in an airport needs a unique ID number - this is ZERO-BASED to match array position
        Point3D pos;
        Point3D orthoPos;
-       string name;
+       std::string name;
        node_type type;
        arc_array_type arcs;
        double max_turn_radius;
 };
 
-typedef vector <node*> node_array_type;
+typedef std::vector <node*> node_array_type;
 typedef node_array_type::iterator node_array_iterator;
 typedef node_array_type::const_iterator node_array_const_iterator;
 
@@ -121,18 +113,18 @@ struct Gate : public node {
        int max_weight; //units??
        //airline_code airline; //For the future - we don't have any airline codes ATM
        int id; // The gate number in the logical scheme of things
-       string name;    // The real-world gate letter/number
+       std::string name;       // The real-world gate letter/number
        //node* pNode;
        bool used;
        double heading; // The direction the parked-up plane should point in degrees
 };
 
-typedef vector < Gate* > gate_vec_type;
+typedef std::vector < Gate* > gate_vec_type;
 typedef gate_vec_type::iterator gate_vec_iterator;
 typedef gate_vec_type::const_iterator gate_vec_const_iterator;
 
 // A map of gate vs. the logical (internal FGFS) gate ID
-typedef map < int, Gate* > gate_map_type;
+typedef std::map < int, Gate* > gate_map_type;
 typedef gate_map_type::iterator gate_map_iterator;
 typedef gate_map_type::const_iterator gate_map_const_iterator;
 
@@ -146,7 +138,7 @@ struct Rwy {
        // This will get us up and running for single runway airports though.
 };
 
-typedef vector < Rwy > runway_array_type;
+typedef std::vector < Rwy > runway_array_type;
 typedef runway_array_type::iterator runway_array_iterator;
 typedef runway_array_type::const_iterator runway_array_const_iterator;
 
@@ -157,7 +149,7 @@ typedef runway_array_type::const_iterator runway_array_const_iterator;
 // Structures to use the network
 
 // A path through the network 
-typedef vector < ground_network_element* > ground_network_path_type;
+typedef std::vector < ground_network_element* > ground_network_path_type;
 typedef ground_network_path_type::iterator ground_network_path_iterator;
 typedef ground_network_path_type::const_iterator ground_network_path_const_iterator;
 
@@ -174,7 +166,7 @@ struct a_path {
 };
 
 // Paths mapped by nodeID reached so-far
-typedef map < unsigned int, a_path* > shortest_path_map_type;
+typedef std::map < unsigned int, a_path* > shortest_path_map_type;
 typedef shortest_path_map_type::iterator shortest_path_map_iterator;
 
 // Nodes mapped by their ID
@@ -201,7 +193,7 @@ struct GroundRec {
     // Almost certainly need to add more here
 };
 
-typedef list < GroundRec* > ground_rec_list;
+typedef std::list < GroundRec* > ground_rec_list;
 typedef ground_rec_list::iterator ground_rec_list_itr;
 typedef ground_rec_list::const_iterator ground_rec_list_const_itr;
 
@@ -215,7 +207,7 @@ struct GRunwayDetails {
        Point3D end2ortho;      // ortho projection end2 (the take off end in the current hardwired scheme)
        double hdg;             // true runway heading
        double length;  // In *METERS*
-       string rwyID;
+       std::string rwyID;
 };
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -227,13 +219,13 @@ class FGGround : public FGATC {
 
 public:
        FGGround();
-       FGGround(const string& id);
+       FGGround(const std::string& id);
        ~FGGround();
     void Init();
 
     void Update(double dt);
        
-       inline const string& get_trans_ident() { return trans_ident; }
+       inline const std::string& get_trans_ident() { return trans_ident; }
 
     // Contact ground control on arrival, assumed to request any gate
     //void NewArrival(plane_rec plane);
@@ -258,22 +250,22 @@ public:
        Gate* GetGateNode();
        
        // Return a pointer to a hold short node
-       node* GetHoldShortNode(const string& rwyID);
+       node* GetHoldShortNode(const std::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(const string& rwyID);
+       node_array_type GetExits(const std::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, const string& rwyID);
+       ground_network_path_type GetPath(node* A, const std::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, const string& rwyID);
+       ground_network_path_type GetPathToHoldShort(node* A, const std::string& rwyID);
 
 private:
        FGATCMgr* ATCmgr;       
@@ -314,7 +306,7 @@ private:
        SGPropertyNode_ptr wind_speed_knots;            //knots
        
        // for failure modeling
-       string trans_ident;             // transmitted ident
+       std::string trans_ident;                // transmitted ident
        bool ground_failed;             // ground failed?
        bool networkLoadOK;             // Indicates whether LoadNetwork returned true or false at last attempt
        
@@ -328,7 +320,7 @@ private:
        
        // Physical runway details
        double aptElev;         // Airport elevation
-       string activeRwy;       // Active runway number - For now we'll disregard multiple / alternate runway operation.
+       std::string activeRwy;  // Active runway number - For now we'll disregard multiple / alternate runway operation.
        RunwayDetails rwy;      // Assumed to be the active one for now.// Figure out which runways are active.
        
        // For now we'll just be simple and do one active runway - eventually this will get much more complex
@@ -353,7 +345,7 @@ private:
        
        // Return a pointer to the node at a runway threshold
        // Returns NULL if unsuccessful.
-       node* GetThresholdNode(const string& rwyID);
+       node* GetThresholdNode(const std::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); 
index 0fe4103a7791736f656e228b82fda194b99cee42..ad1c2ba17d4d4893602f17e88795024e4f64d9a2 100644 (file)
 #include <simgear/misc/sgstream.hxx>
 #include <plib/sg.h>
 
-#include STL_IOSTREAM
+#include <iosfwd>
 #include STL_STRING
 
-SG_USING_STD(string);
-SG_USING_STD(ios);
-
 #include "ATC.hxx"
 #include "ATCProjection.hxx"
 #include "AIPlane.hxx"
@@ -117,7 +114,7 @@ public:
 };
 
 
-typedef list < TowerPlaneRec* > tower_plane_rec_list_type;
+typedef std::list < TowerPlaneRec* > tower_plane_rec_list_type;
 typedef tower_plane_rec_list_type::iterator tower_plane_rec_list_iterator;
 typedef tower_plane_rec_list_type::const_iterator tower_plane_rec_list_const_iterator;
 
@@ -138,21 +135,21 @@ public:
        // Contact tower for VFR approach
        // eg "Cessna Charlie Foxtrot Golf Foxtrot Sierra eight miles South of the airport for full stop with Bravo"
        // This function probably only called via user interaction - AI planes will have an overloaded function taking a planerec.
-       void VFRArrivalContact(const string& ID, const LandingType& opt = AIP_LT_UNKNOWN);
+       void VFRArrivalContact(const std::string& ID, const LandingType& opt = AIP_LT_UNKNOWN);
        // For the AI planes...
        void VFRArrivalContact(const PlaneRec& plane, FGAIPlane* requestee, const LandingType& lt = AIP_LT_UNKNOWN);
        
-       void RequestDepartureClearance(const string& ID);
-       void RequestTakeOffClearance(const string& ID);
-       void ReportFinal(const string& ID);
-       void ReportLongFinal(const string& ID);
-       void ReportOuterMarker(const string& ID);
-       void ReportMiddleMarker(const string& ID);
-       void ReportInnerMarker(const string& ID);
-       void ReportRunwayVacated(const string& ID);
-       void ReportReadyForDeparture(const string& ID);
-       void ReportDownwind(const string& ID);
-       void ReportGoingAround(const string& ID);
+       void RequestDepartureClearance(const std::string& ID);
+       void RequestTakeOffClearance(const std::string& ID);
+       void ReportFinal(const std::string& ID);
+       void ReportLongFinal(const std::string& ID);
+       void ReportOuterMarker(const std::string& ID);
+       void ReportMiddleMarker(const std::string& ID);
+       void ReportInnerMarker(const std::string& ID);
+       void ReportRunwayVacated(const std::string& ID);
+       void ReportReadyForDeparture(const std::string& ID);
+       void ReportDownwind(const std::string& ID);
+       void ReportGoingAround(const std::string& ID);
        
        // Contact tower when at a hold short for departure - for now we'll assume plane - maybe vehicles might want to cross runway eventually?
        void ContactAtHoldShort(const PlaneRec& plane, FGAIPlane* requestee, tower_traffic_type operation);
@@ -162,16 +159,16 @@ public:
        void RegisterAIPlane(const PlaneRec& plane, FGAIPlane* ai, const tower_traffic_type& op, const PatternLeg& lg = LEG_UNKNOWN);
        
        // Deregister and remove an AI plane.
-       void DeregisterAIPlane(const string& id);
+       void DeregisterAIPlane(const std::string& id);
        
        // Public interface to the active runway - this will get more complex 
        // in the future and consider multi-runway use, airplane weight etc.
-       inline const string& GetActiveRunway() const { return activeRwy; }
+       inline const std::string& GetActiveRunway() const { return activeRwy; }
        inline const RunwayDetails& GetActiveRunwayDetails() const { return rwy; }
        // Get the pattern direction of the active rwy.
        inline int GetPatternDirection() const { return rwy.patternDirection; }
        
-       inline const string& get_trans_ident() const { return trans_ident; }
+       inline const std::string& get_trans_ident() const { return trans_ident; }
        
        inline FGGround* const GetGroundPtr() const { return ground; }
        
@@ -181,9 +178,9 @@ public:
        bool GetDownwindConstraint(double& dpos);
        bool GetBaseConstraint(double& bpos);
        
-       string GenText(const string& m, int c);
-       string GetWeather();
-       string GetATISID();
+       std::string GenText(const std::string& m, int c);
+       std::string GetWeather();
+       std::string GetATISID();
 
 private:
        FGATCMgr* ATCmgr;
@@ -210,10 +207,10 @@ private:
        void ClearHoldingPlane(TowerPlaneRec* t);
        
        // Find a pointer to plane of callsign ID within the internal data structures
-       TowerPlaneRec* FindPlane(const string& ID);
+       TowerPlaneRec* FindPlane(const std::string& ID);
        
        // Remove and delete all instances of a plane with a given ID
-       void RemovePlane(const string& ID);
+       void RemovePlane(const std::string& ID);
        
        // Figure out if a given position lies on the active runway
        // Might have to change when we consider more than one active rwy.
@@ -227,10 +224,10 @@ private:
        // For air traffic this is the middle approximation.
        void CalcETA(TowerPlaneRec* tpr, bool printout = false);
        
-       // Iterate through all the lists and call CalcETA for all the planes.
+       // Iterate through all the std::lists and call CalcETA for all the planes.
        void doThresholdETACalc();
        
-       // Order the list of traffic as per expected threshold use and flag any conflicts
+       // Order the std::list of traffic as per expected threshold use and flag any conflicts
        bool doThresholdUseOrder();
        
        // Calculate the crow-flys distance of a plane to the threshold in meters
@@ -258,7 +255,7 @@ private:
        SGPropertyNode_ptr wind_speed_knots;            //knots
        
        double aptElev;         // Airport elevation
-       string activeRwy;       // Active runway number - For now we'll disregard multiple / alternate runway operation.
+       std::string activeRwy;  // Active runway number - For now we'll disregard multiple / alternate runway operation.
        RunwayDetails rwy;      // Assumed to be the active one for now.
        bool rwyOccupied;       // Active runway occupied flag.  For now we'll disregard land-and-hold-short operations.
        FGATCAlignedProjection ortho;   // Orthogonal mapping of the local area with the active runway threshold at the origin
@@ -311,9 +308,9 @@ private:
        tower_plane_rec_list_iterator vacatedListItr;
        
        // Returns true if successful
-       bool RemoveFromTrafficList(const string& id);
-       bool RemoveFromAppList(const string& id);
-       bool RemoveFromRwyList(const string& id);
+        bool RemoveFromTrafficList(const std::string& id);
+       bool RemoveFromAppList(const std::string& id);
+       bool RemoveFromRwyList(const std::string& id);
        
        // Return the ETA of plane no. list_pos (1-based) in the traffic list.
        // i.e. list_pos = 1 implies next to use runway.
@@ -340,7 +337,7 @@ private:
        //FGDeparture* _departure;      // The relevant departure control (once we've actually written it!)
        
        // for failure modeling
-       string trans_ident;             // transmitted ident
+       std::string trans_ident;                // transmitted ident
        bool tower_failed;              // tower failed?
        
        // Pointers to current users position and orientation
@@ -359,7 +356,7 @@ private:
        double nominal_downwind_leg_pos;
        double nominal_base_leg_pos;
        
-       friend istream& operator>> ( istream&, FGTower& );
+        friend std::istream& operator>> ( std::istream&, FGTower& );
 };
 
 #endif  //_FG_TOWER_HXX
index 0a6ea4b76193fc20bb7811279439f6e9d98b774d..9f77af9393fe67359919a8d7a37ac2dbea6fbc8d 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "transmission.hxx"
 
+#include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 
 
@@ -60,7 +61,7 @@ TransPar FGTransmission::Parse() {
       if ( tkn <= 20 ) {
        tkn += 1;
       } else {
-       cout << "Too many tokens" << endl;
+        SG_LOG(SG_ATC, SG_WARN,"Too many tokens");
       }
     }
   }
index c1881b3c62fe1c8afe7e8d4667a4568782529cef..8318d5a3b2a717d22bbd5049ff19867de6f39be0 100644 (file)
 
 #include "ATC.hxx"
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-SG_USING_STD(istream);
-#endif
-
-SG_USING_STD(string);
-
 struct TransCode {
   int c1;
   int c2;
@@ -62,18 +56,18 @@ struct TransCode {
 
 // TransPar - a representation of the logic of a parsed speech transmission
 struct TransPar {
-  string  station;
-  string  callsign;
-  string  airport;
-  string  intention;      // landing, crossing
-  string  intid;          // (airport) ID for intention
+  std::string  station;
+  std::string  callsign;
+  std::string  airport;
+  std::string  intention;      // landing, crossing
+  std::string  intid;          // (airport) ID for intention
   bool    request;        // is the transmission a request or an answer?
   int     tdir;           // turning direction: 1=left, 2=right
   double  heading;
   int     VDir;           // vertical direction: 1=descent, 2=maintain, 3=climb
   double  alt;
   double  miles;
-  string  runway;
+  std::string  runway;
   double  freq;
   double  time;
 };
@@ -84,8 +78,8 @@ class FGTransmission {
   //int       StationType;    // Type of ATC station: 1 Approach
   atc_type  StationType;
   TransCode Code;           // DCL - no idea what this is.
-  string    TransText;      // The text of the spoken transmission
-  string    MenuText;       // An abbreviated version of the text for the menu entry
+  std::string    TransText;      // The text of the spoken transmission
+  std::string    MenuText;       // An abbreviated version of the text for the menu entry
 
 public:
 
@@ -96,21 +90,21 @@ public:
 
   inline atc_type  get_station()   const { return StationType; }
   inline const TransCode& get_code()      { return Code; }
-  inline const string&    get_transtext() { return TransText; }
-  inline const string&    get_menutext()  { return MenuText; }
+  inline const std::string&    get_transtext() { return TransText; }
+  inline const std::string&    get_menutext()  { return MenuText; }
 
   // Return the parsed logic of the transmission  
   TransPar Parse();
 
 private:
 
-  friend istream& operator>> ( istream&, FGTransmission& );
+  friend std::istream& operator>> ( std::istream&, FGTransmission& );
 
 };
 
 
-inline istream&
-operator >> ( istream& in, FGTransmission& a ) {
+inline std::istream&
+operator >> ( std::istream& in, FGTransmission& a ) {
        char ch;
        int tmp;
        
index cb24e50ca7aee8fba8e5d1b75e2933e81c577749..1f55609a359b03040a5334be57918b8c24bed4e5 100644 (file)
@@ -130,13 +130,13 @@ bool FGTransmissionList::query_station( const atc_type &station, FGTransmission
       num_trans += 1;
     }
     else {
-      cout << "Transmissionlist error: Too many transmissions" << endl
+      SG_LOG(SG_GENERAL, SG_WARN, "Transmissionlist error: Too many transmissions")
     }
   }
 
   if ( num_trans != 0 ) return true;
   else {
-    cout << "No transmission with station " << station << "found." << endl;
+    SG_LOG(SG_GENERAL, SG_WARN, "No transmission with station " << station << "found.");
     string empty;
     return false;
   }
@@ -240,7 +240,7 @@ string FGTransmissionList::gen_text(const atc_type &station, const TransCode cod
                                else if ( strcmp ( tag, "@RW" ) == 0 )
                                        strcat( &dum[0], tpars.runway.c_str() );
                                else {
-                                       cout << "Tag " << tag << " not found" << endl;
+                                       SG_LOG(SG_GENERAL, SG_WARN, "Tag " << tag << " not found");
                                        break;
                                }
                                strcat( &dum[0], &mes[len+3] );
@@ -248,7 +248,7 @@ string FGTransmissionList::gen_text(const atc_type &station, const TransCode cod
                                
                                ++check;
                                if(check > 10) {
-                                       SG_LOG(SG_ATC, SG_WARN, "WARNING: Possibly endless loop terminated in FGTransmissionlist::gen_text(...)"); 
+                                       SG_LOG(SG_GENERAL, SG_WARN, "WARNING: Possibly endless loop terminated in FGTransmissionlist::gen_text(...)"); 
                                        break;
                                }
                        }
index d017fb93c8e0987d1df6ba4a5cd8f650ed999ebb..9461544de506df156fed11e715e0c240b19035c4 100644 (file)
@@ -34,7 +34,7 @@
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/props/props.hxx>
 
-#include STL_IOSTREAM
+#include <istream>
 #include STL_FSTREAM
 #include STL_STRING
 
index 4db99ea18ffe5107b89d6d4eb61e0ac8345d5a4f..3f604828d4e78e0f76be4f13f8661cf749370fe2 100644 (file)
 
 #include <simgear/compiler.h>
 
-#include STL_IOSTREAM
+#include <iosfwd>
 #include STL_STRING
 
-SG_USING_STD(istream);
-SG_USING_STD(string);
-
 class FGPanel;
 
-extern FGPanel * fgReadPanel (istream &input);
-extern FGPanel * fgReadPanel (const string &relative_path);
+extern FGPanel * fgReadPanel (std::istream &input);
+extern FGPanel * fgReadPanel (const std::string &relative_path);
 
 #endif // __PANEL_IO_HXX
index 741a806095ac292e16d1a59b25ebc55ab65e480c..831256fe104eb1f06ae9196565683eea87a8afe8 100755 (executable)
@@ -53,6 +53,8 @@ INCLUDES
 #include <stdlib.h>
 #include <math.h>
 
+#include <iostream>
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -62,6 +64,10 @@ namespace JSBSim {
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_XMLELEMENT;
 
+using std::cerr;
+using std::cout;
+using std::endl;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
index ce3711aed1e1a42e442bbb7d3bfc9f2484d6c80b..55aa6b1f72a3549c6c7ecfc6d37ef2e82cb48375 100755 (executable)
@@ -39,30 +39,17 @@ INCLUDES
 #  ifdef SG_HAVE_STD_INCLUDES
 #    include <string>
 #    include <vector>
-#    include <iostream>
 #    include <map>
 #  else
 #    include <vector.h>
 #    include <string>
-#    include <iostream.h>
 #    include <map.h>
 #  endif
 #else
 #  include <string>
 #  include <map>
-#  include <iostream>
 #  include <vector>
-   using std::string;
-   using std::map;
-   using std::vector;
-   using std::cout;
-   using std::endl;
 #endif
-   using std::string;
-   using std::map;
-   using std::vector;
-   using std::cout;
-   using std::endl;
 
 #include <math/FGColumnVector3.h>
 
@@ -159,7 +146,7 @@ public:
   /** Constructor
       @param nm the name of this element (if given)
       */
-  Element(string nm);
+  Element(std::string nm);
   /// Destructor
   ~Element(void);
 
@@ -167,23 +154,23 @@ public:
       @param key specifies the attribute key to retrieve the value of.
       @return the key value (as a string), or the empty string if no such
               attribute exists. */
-  string GetAttributeValue(string key);
+  std::string GetAttributeValue(std::string key);
 
   /** Retrieves an attribute value as a double precision real number.
       @param key specifies the attribute key to retrieve the value of.
       @return the key value (as a number), or the HUGE_VAL if no such
               attribute exists. */
-  double GetAttributeValueAsNumber(string key);
+  double GetAttributeValueAsNumber(std::string key);
 
   /** Retrieves the element name.
       @return the element name, or the empty string if no name has been set.*/
-  string GetName(void) {return name;}
+  std::string GetName(void) {return name;}
 
   /** Gets a line of data belonging to an element.
       @param i the index of the data line to return (0 by default).
       @return a string representing the data line requested, or the empty string
               if none exists.*/
-  string GetDataLine(unsigned int i=0);
+  std::string GetDataLine(unsigned int i=0);
 
   /// Returns the number of lines of data stored
   unsigned int GetNumDataLines(void) {return (unsigned int)data_lines.size();}
@@ -192,7 +179,7 @@ public:
   unsigned int GetNumElements(void) {return (unsigned int)children.size();}
 
   /// Returns the number of named child elements for this element.
-  unsigned int GetNumElements(string);
+  unsigned int GetNumElements(std::string);
 
   /** Converts the element data to a number.
       This function attempts to convert the first (and presumably only) line of
@@ -225,12 +212,12 @@ public:
   Element* GetParent(void) {return parent;}
 
   /** Searches for a specified element.
-      Finds the first element that matches the supplied string, or simply the first
-      element if no search string is supplied. This function call resets the internal
+      Finds the first element that matches the supplied std::string, or simply the first
+      element if no search std::string is supplied. This function call resets the internal
       element counter to the first element.
-      @param el the search string (empty string by default).
-      @return a pointer to the first element that matches the supplied search string. */
-  Element* FindElement(string el="");
+      @param el the search std::string (empty std::string by default).
+      @return a pointer to the first element that matches the supplied search std::string. */
+  Element* FindElement(std::string el="");
 
   /** Searches for the next element as specified.
       This function would be called after FindElement() is first called (in order to
@@ -241,7 +228,7 @@ public:
       @param el the name of the next element to find.
       @return the pointer to the found element, or 0 if no appropriate element us
               found.*/
-  Element* FindNextElement(string el="");
+  Element* FindNextElement(std::string el="");
 
   /** Searches for the named element and returns the string data belonging to it.
       This function allows the data belonging to a named element to be returned
@@ -251,7 +238,7 @@ public:
       default)
       @return the data value for the named element as a string, or the empty
               string if the element cannot be found. */
-  string FindElementValue(string el="");
+  std::string FindElementValue(std::string el="");
 
   /** Searches for the named element and returns the data belonging to it as a number.
       This function allows the data belonging to a named element to be returned
@@ -261,7 +248,7 @@ public:
       default)
       @return the data value for the named element as a double, or HUGE_VAL if the
               data is missing. */
-  double FindElementValueAsNumber(string el="");
+  double FindElementValueAsNumber(std::string el="");
 
   /** Searches for the named element and converts and returns the data belonging to it.
       This function allows the data belonging to a named element to be returned
@@ -278,7 +265,7 @@ public:
              to which the value returned will be converted.
       @return the unit-converted data value for the named element as a double,
               or HUGE_VAL if the data is missing. */
-  double FindElementValueAsNumberConvertTo(string el, string target_units);
+  double FindElementValueAsNumberConvertTo(std::string el, std::string target_units);
 
   /** Searches for the named element and converts and returns the data belonging to it.
       This function allows the data belonging to a named element to be returned
@@ -297,9 +284,9 @@ public:
              to which the value returned will be converted.
       @return the unit-converted data value for the named element as a double,
               or HUGE_VAL if the data is missing. */
-  double FindElementValueAsNumberConvertFromTo( string el,
-                                                string supplied_units,
-                                                string target_units);
+  double FindElementValueAsNumberConvertFromTo( std::string el,
+                                                std::string supplied_units,
+                                                std::string target_units);
 
   /** Composes a 3-element column vector for the supplied location or orientation.
       This function processes a LOCATION or ORIENTATION construct, returning a
@@ -310,7 +297,7 @@ public:
       @param target_units the string representing the native units used by JSBSim
              to which the value returned will be converted.
       @return a column vector object built from the LOCATION or ORIENT components. */
-  FGColumnVector3 FindElementTripletConvertTo( string target_units);
+  FGColumnVector3 FindElementTripletConvertTo( std::string target_units);
 
   /** This function sets the value of the parent class attribute to the supplied
       Element pointer.
@@ -324,11 +311,11 @@ public:
   /** Stores an attribute belonging to this element.
   *   @param name The string name of the attribute.
   *   @param value The string value of the attribute. */
-  void AddAttribute(string name, string value);
+  void AddAttribute(std::string name, std::string value);
 
   /** Stores data belonging to this element.
   *   @param d the data to store. */
-  void AddData(string d);
+  void AddData(std::string d);
 
   /** Prints the element.
   *   Prints this element and calls the Print routine for child elements.
@@ -336,14 +323,14 @@ public:
   void Print(unsigned int level=0);
 
 private:
-  string name;
-  map <string, string> attributes;
-  vector <string> data_lines;
-  vector <Element*> children;
-  vector <string> attribute_key;
+  std::string name;
+  std::map <std::string, std::string> attributes;
+  std::vector <std::string> data_lines;
+  std::vector <Element*> children;
+  std::vector <std::string> attribute_key;
   Element *parent;
   unsigned int element_index;
-  typedef map <string, map <string, double> > tMapConvert;
+  typedef std::map <std::string, std::map <std::string, double> > tMapConvert;
   tMapConvert convert;
 };
 
index b9e250600918594dd232a61694f4836bc8004be2..15493c674931535676d200401d812d3330608eeb 100755 (executable)
@@ -35,6 +35,7 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+#include <fstream>
 #include <input_output/FGXMLParse.h>
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -58,7 +59,7 @@ protected:
   Element* document;
   Element* LoadXMLDocument(string XML_filename)
   {
-    ifstream infile;
+    std::ifstream infile;
 
     if ( !XML_filename.empty() ) {
       if (XML_filename.find(".xml") == string::npos) XML_filename += ".xml";
index c1a582699ae7ae09ccd09e1813957385916a19c2..2376f2b806f28c3c8d28962e1ab373c20bdd40b5 100644 (file)
@@ -38,6 +38,7 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <cstring>
+#include <iostream>
 
 #include "FGfdmSocket.h"
 
@@ -46,6 +47,10 @@ namespace JSBSim {
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_FDMSOCKET;
 
+using std::cerr;
+using std::cout;
+using std::endl;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
index f1d41ef1bb8a4d6d38d4d1c2e8132c04d7134823..cd88fddbd6da698293ed05665e4b3eecb744f4bc 100644 (file)
@@ -43,21 +43,8 @@ INCLUDES
 #ifdef FGFS
 #  include <simgear/compiler.h>
 #  include STL_STRING
-#  include STL_IOSTREAM
-#  include STL_FSTREAM
-   SG_USING_STD(cout);
-   SG_USING_STD(endl);
 #else
 #  include <string>
-#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
-#    include <iostream.h>
-#    include <fstream.h>
-#  else
-#    include <iostream>
-#    include <fstream>
-     using std::cout;
-     using std::endl;
-#  endif
 #endif
 
 #include <sys/types.h>
index f34afe5923420592ecadda642b44f2bbca6df0a2..fc66c27e73908b29348e6de94e3f9811784b7ac1 100644 (file)
@@ -39,12 +39,18 @@ INCLUDES
 
 #include "FGColumnVector3.h"
 #include <stdio.h>
+#include <iostream>
 
 namespace JSBSim {
 
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_COLUMNVECTOR3;
 
+using std::ostream;
+using std::cerr;
+using std::cout;
+using std::endl;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
index 85e6bab227304a11ce6dec3df00ede9b7cca63f1..1045436cbd27976ca927a55a0b474fa529a9cba9 100644 (file)
@@ -44,14 +44,8 @@ INCLUDES
 #  include <math.h>
 #  include <simgear/compiler.h>
 #  include STL_STRING
+#  include <iosfwd>
 #  include STL_FSTREAM
-#  include STL_IOSTREAM
-   SG_USING_STD(string);
-   SG_USING_STD(ostream);
-   SG_USING_STD(istream);
-   SG_USING_STD(cerr);
-   SG_USING_STD(cout);
-   SG_USING_STD(endl);
 #else
 #  include <string>
 #  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
@@ -66,16 +60,10 @@ INCLUDES
 #    else
 #      include <cmath>
 #    endif
-     using std::ostream;
-     using std::istream;
-     using std::cerr;
-     using std::cout;
-     using std::endl;
 #    if !(defined(_MSC_VER) && _MSC_VER <= 1200)
        using std::sqrt;
 #    endif
 #  endif
-   using std::string;
 #endif
 
 #include "FGJSBBase.h"
@@ -174,7 +162,7 @@ public:
   /** Prints the contents of the vector
       @param delimeter the item separator (tab or comma)
       @return a string with the delimeter-separated contents of the vector  */
-  string Dump(string delimeter) const;
+  std::string Dump(std::string delimeter) const;
 
   /** Assignment operator.
       @param b source vector.
@@ -316,7 +304,7 @@ inline FGColumnVector3 operator*(double scalar, const FGColumnVector3& A) {
     @param os Stream to write to.
     @param M Matrix to write.
     Write the matrix to a stream.*/
-ostream& operator<<(ostream& os, const FGColumnVector3& col);
+std::ostream& operator<<(std::ostream& os, const FGColumnVector3& col);
 
 } // namespace JSBSim
 
index e5cebbcb043397ff35bbad776023640fa2d3dae4..9177f4f02dd3082448db2d716fa2174429385500 100644 (file)
@@ -34,6 +34,8 @@ COMMENTS, REFERENCES,  and NOTES
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+#include <iostream>
+
 #include "FGCondition.h"
 
 namespace JSBSim {
@@ -41,6 +43,11 @@ namespace JSBSim {
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_CONDITION;
 
+using std::cerr;
+using std::cout;
+using std::endl;
+using std::vector;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
index c778e0f79ae5bf71e0fbec0799d3fefcbf36ffe9..aaee6aacd7c08a306a9c49944a82888529795f04 100644 (file)
@@ -38,6 +38,8 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <map>
+#include <string>
+
 #include <FGJSBBase.h>
 #include <input_output/FGXMLElement.h>
 #include <input_output/FGPropertyManager.h>
@@ -69,7 +71,7 @@ class FGCondition : public FGJSBBase
 {
 public:
   FGCondition(Element* element, FGPropertyManager* PropertyManager);
-  FGCondition(string test, FGPropertyManager* PropertyManager);
+  FGCondition(std::string test, FGPropertyManager* PropertyManager);
   ~FGCondition(void);
 
   bool Evaluate(void);
@@ -78,18 +80,18 @@ public:
 private:
   enum eComparison {ecUndef=0, eEQ, eNE, eGT, eGE, eLT, eLE};
   enum eLogic {elUndef=0, eAND, eOR};
-  map <string, eComparison> mComparison;
+  std::map <std::string, eComparison> mComparison;
   eLogic Logic;
 
   FGPropertyManager *TestParam1, *TestParam2, *PropertyManager;
   double TestValue;
   eComparison Comparison;
   bool isGroup;
-  string conditional;
+  std::string conditional;
 
-  static string indent;
+  static std::string indent;
 
-  vector <FGCondition> conditions;
+  std::vector <FGCondition> conditions;
   void InitializeConditionals(void);
 
   void Debug(int from);
index f040e2a65f59711a4daa52bb205b51f5b2fb7c2e..304575a62bdb505ca0f31c41ca7b2d477bad4cd5 100755 (executable)
@@ -29,6 +29,7 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <stdio.h>
+#include <iostream>
 
 #include "FGFunction.h"
 #include "FGTable.h"
@@ -40,6 +41,9 @@ namespace JSBSim {
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_FUNCTION;
 
+using std::cerr;
+using std::cout;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
index 47bc1ccc38f4d236e780785eb490567e5da9113b..bad10f5f156b46788b8220563be670572c26e891 100755 (executable)
@@ -180,7 +180,7 @@ public:
   void cacheValue(bool shouldCache);
 
 private:
-  vector <FGParameter*> Parameters;
+  std::vector <FGParameter*> Parameters;
   FGPropertyManager* const PropertyManager;
   bool cached;
   string Prefix;
index 9b4ce123103196d3f730bec674d97394b768b924..5b66bc8e144fe64b74821c978979c65380de8e42 100644 (file)
@@ -45,6 +45,9 @@ namespace JSBSim {
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_MATRIX33;
 
+using std::cout;
+using std::endl;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -61,7 +64,7 @@ FGMatrix33::FGMatrix33(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-ostream& operator<<(ostream& os, const FGMatrix33& M)
+std::ostream& operator<<(std::ostream& os, const FGMatrix33& M)
 {
   for (unsigned int i=1; i<=M.Rows(); i++) {
     for (unsigned int j=1; j<=M.Cols(); j++) {
@@ -76,7 +79,7 @@ ostream& operator<<(ostream& os, const FGMatrix33& M)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-istream& operator>>(istream& is, FGMatrix33& M)
+std::istream& operator>>(std::istream& is, FGMatrix33& M)
 {
   for (unsigned int i=1; i<=M.Rows(); i++) {
     for (unsigned int j=1; j<=M.Cols(); j++) {
index 60b1ff885dd5702abcc5bc09ed9445874181b98a..b540389eac60c91e9c812bf0e2de676a7d9a3003 100644 (file)
@@ -45,14 +45,7 @@ INCLUDES
 #  include <math.h>
 #  include <simgear/compiler.h>
 #  include STL_STRING
-#  include STL_FSTREAM
-#  include STL_IOSTREAM
-   SG_USING_STD(string);
-   SG_USING_STD(ostream);
-   SG_USING_STD(istream);
-   SG_USING_STD(cerr);
-   SG_USING_STD(cout);
-   SG_USING_STD(endl);
+#  include <iosfwd>
 #else
 #  include <string>
 #  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
@@ -61,19 +54,13 @@ INCLUDES
 #    include <math.h>
 #  else
 #    include <fstream>
-#    include <iostream>
+#    include <iosfwd>
 #    if defined(sgi) && !defined(__GNUC__)
 #      include <math.h>
 #    else
 #      include <cmath>
 #    endif
-     using std::ostream;
-     using std::istream;
-     using std::cerr;
-     using std::cout;
-     using std::endl;
 #  endif
-   using std::string;
 #endif
 
 #include "FGColumnVector3.h"
@@ -107,7 +94,7 @@ DECLARATION: MatrixException
 class MatrixException : public FGJSBBase
 {
 public:
-  string Message;
+  std::string Message;
 };
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -473,7 +460,7 @@ inline FGMatrix33 operator*(double scalar, const FGMatrix33& A) {
 
     Write the matrix to a stream.
 */
-ostream& operator<<(ostream& os, const FGMatrix33& M);
+std::ostream& operator<<(std::ostream& os, const FGMatrix33& M);
 
 /** Read matrix from a stream.
 
@@ -482,7 +469,7 @@ ostream& operator<<(ostream& os, const FGMatrix33& M);
 
     Read matrix from a stream.
 */
-istream& operator>>(istream& is, FGMatrix33& M);
+std::istream& operator>>(std::istream& is, FGMatrix33& M);
 
 } // namespace JSBSim
 
index 91c19d122f5debc9a9ba1a1be9759743c0de0594..e25faa761ebdcf472f9e621e21704c8c70f1dfb0 100644 (file)
@@ -165,20 +165,20 @@ public:
   /** Gets the strings for the current set of coefficients.
       @param delimeter either a tab or comma string depending on output type
       @return a string containing the descriptive names for all coefficients */
-  string GetCoefficientStrings(string delimeter);
+  std::string GetCoefficientStrings(std::string delimeter);
 
   /** Gets the coefficient values.
       @param delimeter either a tab or comma string depending on output type
       @return a string containing the numeric values for the current set of
       coefficients */
-  string GetCoefficientValues(string delimeter);
+  std::string GetCoefficientValues(std::string delimeter);
 
 private:
-  typedef map<string,int> AxisIndex;
+  typedef std::map<std::string,int> AxisIndex;
   AxisIndex AxisIdx;
   FGFunction* AeroRPShift;
-  vector <FGFunction*> variables;
-  typedef vector <FGFunction*> CoeffArray;
+  std::vector <FGFunction*> variables;
+  typedef std::vector <FGFunction*> CoeffArray;
   CoeffArray* Coeff;
   FGColumnVector3 vFs;
   FGColumnVector3 vForces;
index c8bf6ab9e589ab85d0b19411692eda4ba0cf595b..8ba03ddf4d16587e7d14759f0d1febc75afc26b1 100644 (file)
@@ -46,6 +46,9 @@ namespace JSBSim {
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_GROUNDREACTIONS;
 
+using std::ostringstream;
+using std::setprecision;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -139,7 +142,7 @@ bool FGGroundReactions::Load(Element* el)
 
 string FGGroundReactions::GetGroundReactionStrings(string delimeter)
 {
-  std::ostringstream buf;
+  ostringstream buf;
 
   for (unsigned int i=0;i<lGear.size();i++) {
     if (lGear[i].IsBogey()) {
index 4ef5dad11f27de57251e9fc53828b8262696ce88..fff348f61424d1098ca54dd213ddc0e8e680859c 100755 (executable)
@@ -42,16 +42,6 @@ INCLUDES
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
-#  include STL_IOSTREAM
-#  include STL_FSTREAM
-#else
-#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
-#    include <iostream.h>
-#    include <fstream.h>
-#  else
-#    include <iostream>
-#    include <fstream>
-#  endif
 #endif
 
 #include <input_output/FGfdmSocket.h>
index b25b95a89aae7ff4e6fcc7692c43a3a6afcb5edd..bfbe8a7c08416a34213bfec292040c46aa131b32 100644 (file)
@@ -38,6 +38,8 @@ HISTORY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+#include <algorithm>
+
 #include "FGLGear.h"
 
 namespace JSBSim {
@@ -650,11 +652,11 @@ void FGLGear::ComputeVerticalStrutForce(void)
   } else {
     dampForce   = -compressSpeed * bDampRebound;
   }
-  vLocalForce(eZ) =  min(springForce + dampForce, (double)0.0);
+  vLocalForce(eZ) =  std::min(springForce + dampForce, (double)0.0);
 
   // Remember these values for reporting
-  MaximumStrutForce = max(MaximumStrutForce, fabs(vLocalForce(eZ)));
-  MaximumStrutTravel = max(MaximumStrutTravel, fabs(compressLength));
+  MaximumStrutForce = std::max(MaximumStrutForce, fabs(vLocalForce(eZ)));
+  MaximumStrutTravel = std::max(MaximumStrutTravel, fabs(compressLength));
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
index 13f1aa9b370a003854e5efb120a29475c88e3010..10817e9ceb230917e5fb88adee85e32670cffe3b 100644 (file)
@@ -154,7 +154,7 @@ private:
     double Weight;
   };
 
-  vector <struct PointMass> PointMasses;
+  std::vector <struct PointMass> PointMasses;
 
   void Debug(int from);
 };
index 4d0f8b7f261f78515df373b1194dfce390abb55c..8ef7e27742f12f7b037b4e324b7c7ccb1140dfd1 100644 (file)
@@ -44,17 +44,6 @@ INCLUDES
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
-#  ifdef SG_HAVE_STD_INCLUDES
-#    include <iostream>
-#  else
-#    include <iostream.h>
-#  endif
-#else
-#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
-#    include <iostream.h>
-#  else
-#    include <iostream>
-#  endif
 #endif
 
 #include <string>
@@ -65,8 +54,6 @@ DEFINITIONS
 
 #define ID_MODEL "$Id$"
 
-using namespace std;
-
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -113,7 +100,7 @@ public:
   virtual bool Load(Element* el) {return true;}
 
   FGModel* NextModel;
-  string Name;
+  std::string Name;
 
   /** Runs the model; called by the Executive
       @see JSBSim.cpp documentation
index 64aaf018f0195d888615fb1d8142933049594317..bc5de4f6b22f8787bf8fb89ea9990d635dcce822 100644 (file)
@@ -59,6 +59,8 @@ namespace JSBSim {
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_OUTPUT;
 
+using std::setprecision;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
index 8d3f00b9ed44aec2ac682c547840aa095cd7b60e..73bfda49180acf2965f8f64ee7828317f95df152 100644 (file)
@@ -42,18 +42,18 @@ INCLUDES
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
-#  include STL_IOSTREAM
 #  include STL_FSTREAM
 #else
 #  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
-#    include <iostream.h>
 #    include <fstream.h>
 #  else
-#    include <iostream>
 #    include <fstream>
 #  endif
 #endif
 
+#include <string>
+#include <vector>
+
 #include <input_output/FGfdmSocket.h>
 #include <input_output/FGXMLFileRead.h>
 
@@ -165,10 +165,10 @@ private:
   enum {otNone, otCSV, otTab, otSocket, otTerminal, otUnknown} Type;
   bool sFirstPass, dFirstPass, enabled;
   int SubSystems;
-  string output_file_name, delimeter, Filename, DirectivesFile;
-  ofstream datafile;
+  std::string output_file_name, delimeter, Filename, DirectivesFile;
+  std::ofstream datafile;
   FGfdmSocket* socket;
-  vector <FGPropertyManager*> OutputProperties;
+  std::vector <FGPropertyManager*> OutputProperties;
 
   void Debug(int from);
 };
index a6f45021fb8a3d2972cc66a5ee9ef389dff78fa4..ba486d1398054cd57099c124dfa85c83d70820ed 100644 (file)
@@ -62,6 +62,7 @@ static const char *IdHdr = ID_PROPULSION;
 
 extern short debug_lvl;
 
+using std::ifstream;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
index 9884f61c34ead2be26452f3f89e05cd500248d25..19329865a4917abcb87e3d7d2a05e9285e7a0aa9 100644 (file)
@@ -153,8 +153,8 @@ public:
       be done before calling this (i.e. magnetos, starter engage, etc.) */
   bool ICEngineStart(void);
 
-  string GetPropulsionStrings(string delimeter);
-  string GetPropulsionValues(string delimeter);
+  std::string GetPropulsionStrings(std::string delimeter);
+  std::string GetPropulsionValues(std::string delimeter);
 
   inline FGColumnVector3& GetForces(void)  {return vForces; }
   inline double GetForces(int n) const { return vForces(n);}
@@ -169,8 +169,8 @@ public:
   FGColumnVector3& GetTanksMoment(void);
   double GetTanksWeight(void);
 
-  ifstream* FindEngineFile(string filename);
-  string FindEngineFullPathname(string engine_filename);
+  std::ifstream* FindEngineFile(std::string filename);
+  std::string FindEngineFullPathname(std::string engine_filename);
   inline int GetActiveEngine(void) const {return ActiveEngine;}
   inline bool GetFuelFreeze(void) {return fuel_freeze;}
   double GetTotalFuelQuantity(void) const {return TotalFuelQuantity;}
@@ -186,9 +186,9 @@ public:
   void unbind();
 
 private:
-  vector <FGEngine*>   Engines;
-  vector <FGTank*>     Tanks;
-  vector <FGTank*>::iterator iTank;
+  std::vector <FGEngine*>   Engines;
+  std::vector <FGTank*>     Tanks;
+  std::vector <FGTank*>::iterator iTank;
   unsigned int numSelectedFuelTanks;
   unsigned int numSelectedOxiTanks;
   unsigned int numFuelTanks;
index 3a06e89b33656d0dad7ee1ef46b2058d8d947813..6db41de90ad19456be3585f55c0da25d02ca0723 100755 (executable)
@@ -37,6 +37,8 @@ COMMENTS, REFERENCES,  and NOTES
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+#include <algorithm>
+
 #include "FGActuator.h"
 
 namespace JSBSim {
@@ -153,9 +155,9 @@ void FGActuator::Hysteresis(void)
   double input = Output;
   
   if (input > PreviousHystOutput) {
-    Output = max(PreviousHystOutput, input-0.5*hysteresis_width);
+    Output = std::max(PreviousHystOutput, input-0.5*hysteresis_width);
   } else if (input < PreviousHystOutput) {
-    Output = min(PreviousHystOutput, input+0.5*hysteresis_width);
+    Output = std::min(PreviousHystOutput, input+0.5*hysteresis_width);
   }
 
   PreviousHystOutput = Output;
index 8e0fa14f4b73e66177d42e94354f56e311b568b0..935cb7596d5dc8bc32e8bb3ef62991d4771472a5 100644 (file)
@@ -53,8 +53,6 @@ DEFINITIONS
 
 #define ID_FCSCOMPONENT "$Id$"
 
-using std::string;
-
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -103,8 +101,8 @@ public:
   virtual void SetOutput(void);
   inline double GetOutput (void) const {return Output;}
   inline FGPropertyManager* GetOutputNode(void) { return OutputNode; }
-  inline string GetName(void) const {return Name;}
-  inline string GetType(void) const { return Type; }
+  inline std::string GetName(void) const {return Name;}
+  inline std::string GetType(void) const { return Type; }
   virtual double GetOutputPct(void) const { return 0; }
 
 protected:
@@ -114,10 +112,10 @@ protected:
   FGPropertyManager* OutputNode;
   FGPropertyManager* ClipMinPropertyNode;
   FGPropertyManager* ClipMaxPropertyNode;
-  vector <FGPropertyManager*> InputNodes;
-  vector <float> InputSigns;
-  string Type;
-  string Name;
+  std::vector <FGPropertyManager*> InputNodes;
+  std::vector <float> InputSigns;
+  std::string Type;
+  std::string Name;
   double Input;
   double Output;
   double clipmax, clipmin;
index b40cdb3490a0d36e8cfe6e9980c6fe387dd6d713..436526f702199c00a58ca43177e34214804d294f 100644 (file)
@@ -250,7 +250,7 @@ bool FGEngine::LoadThruster(Element *thruster_element)
   double P_Factor = 0, Sense = 0.0;
   string enginePath = FDMExec->GetEnginePath();
   string aircraftPath = FDMExec->GetFullAircraftPath();
-  ifstream thruster_file;
+  std::ifstream thruster_file;
   FGColumnVector3 location, orientation;
   string separator = "/";
 
index fe8ae82ddf983af5db91b4d691037ed2762e7997..76d79a56ebf5f37b67c1ebadadaab2e66ea05d9a 100644 (file)
 
 #include <math.h>
 
-#include STL_IOSTREAM
-#include STL_FSTREAM
-
-SG_USING_STD(ofstream);
-
 class FGNewEngine {
 
 private:
index 59370558800953f6d362fca67e442fb0566a8a34..1ade41da2b0fcf7938b63b19c8bcc468591eb02b 100644 (file)
 #include <FDM/LaRCsim/ls_types.h>
 
 #include <map>
-#include STL_IOSTREAM
+#include <fstream>
 #include <cmath>
 
 #include "uiuc_parsefile.h"
 #include "uiuc_flapdata.h"
 
-SG_USING_STD(map);
-SG_USING_STD(iostream);
-SG_USING_STD(ofstream);
-
-
 typedef stack :: iterator LIST;
 
 /* Add more keywords here if required*/
@@ -635,7 +630,7 @@ struct AIRCRAFT
 #define  recordParts        aircraft_->recordParts
   
   /*= Keywords (token1) ===========================================*/
-  map <string,int>      Keyword_map;
+  std::map <string,int>      Keyword_map;
 #define      Keyword_map         aircraft_->Keyword_map       
 
   double CD, CX, CL, CZ, Cm, CY, Cl, Cn;
@@ -670,7 +665,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* init ========== Initial values for equations of motion =======*/
 
-  map <string,int> init_map;
+  std::map <string,int> init_map;
 #define      init_map          aircraft_->init_map          
 
   int recordRate;
@@ -777,7 +772,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* geometry ====== Aircraft-specific geometric quantities =======*/
   
-  map <string,int> geometry_map;
+  std::map <string,int> geometry_map;
 #define      geometry_map        aircraft_->geometry_map       
   
   double bw, cbar, Sw, ih, bh, chord_h, Sh;
@@ -793,7 +788,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* controlSurface  Control surface deflections and properties ===*/
   
-  map <string,int> controlSurface_map;
+  std::map <string,int> controlSurface_map;
 #define      controlSurface_map  aircraft_->controlSurface_map
   
   double demax, demin;
@@ -980,7 +975,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* controlsMixer = Control mixer ================================*/
   
-  map <string,int> controlsMixer_map;
+  std::map <string,int> controlsMixer_map;
 #define      controlsMixer_map  aircraft_->controlsMixer_map
   
   double nomix;
@@ -990,7 +985,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* mass =========== Aircraft-specific mass properties ===========*/
   
-  map <string,int> mass_map;
+  std::map <string,int> mass_map;
 #define      mass_map            aircraft_->mass_map
 
   double Weight;
@@ -1016,7 +1011,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* engine ======== Propulsion data ==============================*/
   
-  map <string,int> engine_map;
+  std::map <string,int> engine_map;
 #define      engine_map            aircraft_->engine_map          
   
   double simpleSingleMaxThrust;
@@ -1158,7 +1153,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* CD ============ Aerodynamic x-force quantities (longitudinal) */
   
-  map <string,int> CD_map;
+  std::map <string,int> CD_map;
 #define      CD_map              aircraft_->CD_map            
   
   double CDo, CDK, CLK, CD_a, CD_adot, CD_q, CD_ih, CD_de, CD_dr, CD_da, CD_beta;
@@ -1358,7 +1353,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* CL ============ Aerodynamic z-force quantities (longitudinal) */
   
-  map <string,int> CL_map;
+  std::map <string,int> CL_map;
 #define      CL_map              aircraft_->CL_map            
   
   double CLo, CL_a, CL_adot, CL_q, CL_ih, CL_de;
@@ -1545,7 +1540,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* Cm ============ Aerodynamic m-moment quantities (longitudinal) */
   
-  map <string,int> Cm_map;
+  std::map <string,int> Cm_map;
 #define      Cm_map              aircraft_->Cm_map            
   
   double Cmo, Cm_a, Cm_a2, Cm_adot, Cm_q;
@@ -1709,7 +1704,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* CY ============ Aerodynamic y-force quantities (lateral) =====*/
   
-  map <string,int> CY_map;
+  std::map <string,int> CY_map;
 #define      CY_map              aircraft_->CY_map            
   
   double CYo, CY_beta, CY_p, CY_r, CY_da, CY_dr, CY_dra, CY_bdot;
@@ -1884,7 +1879,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* Cl ============ Aerodynamic l-moment quantities (lateral) ====*/
   
-  map <string,int> Cl_map;
+  std::map <string,int> Cl_map;
 #define      Cl_map              aircraft_->Cl_map            
   
   double Clo, Cl_beta, Cl_p, Cl_r, Cl_da, Cl_dr, Cl_daa;
@@ -2057,7 +2052,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* Cn ============ Aerodynamic n-moment quantities (lateral) ====*/
   
-  map <string,int> Cn_map;
+  std::map <string,int> Cn_map;
 #define      Cn_map              aircraft_->Cn_map
 
   double Cno, Cn_beta, Cn_p, Cn_r, Cn_da, Cn_dr, Cn_q, Cn_b3;
@@ -2232,7 +2227,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* gear ========== Landing gear model quantities ================*/
   
-  map <string,int> gear_map;
+  std::map <string,int> gear_map;
   
 #define      gear_map              aircraft_->gear_map
 #define MAX_GEAR 16
@@ -2258,7 +2253,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* ice =========== Ice model quantities ======================== */
   
-  map <string,int> ice_map;
+  std::map <string,int> ice_map;
 #define      ice_map              aircraft_->ice_map            
 
   bool ice_model, ice_on, beta_model;
@@ -2793,7 +2788,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* fog =========== Fog field quantities ======================== */
 
-  map <string,int> fog_map;
+  std::map <string,int> fog_map;
 #define fog_map        aircraft_->fog_map
 
   bool fog_field;
@@ -2821,7 +2816,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* record ======== Record desired quantites to file =============*/
   
-  map <string,int> record_map;
+  std::map <string,int> record_map;
 #define      record_map              aircraft_->record_map
 
   /***** Angles ******/
@@ -2899,7 +2894,7 @@ struct AIRCRAFT
   /* Variables (token2) ===========================================*/
   /* misc ========== Miscellaneous input commands =================*/
 
-  map <string,int> misc_map;
+  std::map <string,int> misc_map;
 #define      misc_map        aircraft_->misc_map       
 
   double simpleHingeMomentCoef;
@@ -3036,7 +3031,7 @@ struct AIRCRAFT
 #define Cn_iced          aircraft_->Cn_iced
 #define Ch_iced          aircraft_->Ch_iced
 
-  ofstream fout;
+  std::ofstream fout;
   
 #define fout aircraft_->fout
   
index a5af47eff40e4e69cc48c410f8cc504656389e2c..453b4e37fa71388ce440853844ce39510ab6825f 100644 (file)
@@ -72,8 +72,6 @@
 
 #include "uiuc_engine.h"
 
-SG_USING_STD(cerr);
-
 void uiuc_engine() 
 {
   stack command_list;
index 048ebf9911197ab79f2238bf19902585660c8978..1423c0fe492c776b7b915f6a5844f3db771b2641 100644 (file)
@@ -6,17 +6,12 @@
 #include <simgear/compiler.h>
 
 #include <string>
-#include STL_IOSTREAM
-//#include STL_STRSTREAM
-#include <sstream>
-
-//SG_USING_STD(istrstream);
 
 void d_2_to_3( double array2D[100][100], double array3D[][100][100], int index3D);
 void d_1_to_2( double array1D[100], double array2D[][100], int index2D);
 void d_1_to_1( double array1[100], double array2[100] );
 void i_1_to_2( int array1D[100], int array2D[][100], int index2D);
-bool check_float( const string &token);
+bool check_float( const std::string &token);
 //bool check_float( const string &token);
 
 #endif //_MENU_FUNCTIONS_H_
index a4e3930c8f5a06a46f6356164efa09356c06119c..c16266c14b60e7d7817ff2cfb931be632befc9b4 100644 (file)
@@ -74,6 +74,8 @@ Prints to screen the follow:
 
 **********************************************************************/
 
+#include <iostream>
+
 #include "uiuc_warnings_errors.h"
 
 SG_USING_STD (cerr);
@@ -83,7 +85,7 @@ SG_USING_STD (endl);
 SG_USING_STD (exit);
 #endif
 
-void uiuc_warnings_errors(int errorCode, string line)
+void uiuc_warnings_errors(int errorCode, std::string line)
 {
   switch (errorCode)
     {
index e19d13f95ba766a81b94228aab5e34aa390a4ccf..62640bb4721d4d8375eab6762c968fcbd83b7b45 100644 (file)
@@ -5,10 +5,7 @@
 
 #include <string>
 #include <cstdlib>
-#include STL_IOSTREAM
 
-SG_USING_STD(string);
-
-void uiuc_warnings_errors(int errorCode, string line);
+void uiuc_warnings_errors(int errorCode, std::string line);
 
 #endif  //_WARNINGS_ERRORS_H_
index 7f50349c2c8723320208f24aac3ff84b651d25e1..05b945b37262ed36b1099ae74c2432d58f3f415a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _ROTORPART_HPP
 #define _ROTORPART_HPP
-#include <sstream>
-#include <iostream>
+#include <iosfwd>
+
 namespace yasim {
     class Rotor;
     class Rotorpart
index 7cb2c6fc399218c7070a794c49684c9dec2aeae6..0c6c42ca3546a05423920860423453e99d81231b 100644 (file)
@@ -462,7 +462,7 @@ SGPropertyNode *fgInitLocale(const char *language) {
 
 // Initialize the localization routines
 bool fgDetectLanguage() {
-    char *language = ::getenv("LANG");
+    const char *language = ::getenv("LANG");
 
     if (language == NULL) {
         SG_LOG(SG_GENERAL, SG_INFO, "Unable to detect the language" );
index d9ffb73c3212dd069220a460d8141fcea5b99b21..184af4425110a5d7697d3b88224240aae38558c0 100644 (file)
@@ -14,7 +14,7 @@
 #  include <config.h>
 #endif
 
-#include <ostream>
+#include <iosfwd>
 #include <vector>
 
 #include <simgear/compiler.h>
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/props/props.hxx>
 
-SG_USING_STD(ostream);
-SG_USING_STD(vector);
-
-
 /**
  * Log any property values to any number of CSV files.
  */
index a5f8f891db79fbe8b7bb1a3705b2b58930ba7b6f..2335be1fb3c0257f663706554d8f8b65ca511df0 100644 (file)
 #  include <istream.h>
 #endif
 
-SG_USING_STD(istream);
-
 #include STL_STRING
-SG_USING_STD(string);
 
 // SG_USING_STD(cout);
 // SG_USING_STD(endl);
@@ -51,7 +48,7 @@ SG_USING_STD(string);
 
 class FGFix {
 
-    string ident;
+    std::string ident;
     double lon, lat;
 
 public:
@@ -59,11 +56,11 @@ public:
     inline FGFix(void);
     inline ~FGFix(void) {}
 
-    inline const string& get_ident() const { return ident; }
+    inline const std::string& get_ident() const { return ident; }
     inline double get_lon() const { return lon; }
     inline double get_lat() const { return lat; }
 
-    friend istream& operator>> ( istream&, FGFix& );
+    friend std::istream& operator>> ( std::istream&, FGFix& );
 };
 
 
@@ -76,8 +73,8 @@ FGFix::FGFix()
 }
 
 
-inline istream&
-operator >> ( istream& in, FGFix& f )
+inline std::istream&
+operator >> ( std::istream& in, FGFix& f )
 {
     in >> f.lat;
 
index dcf605ceeeca3aed8be6c8173cdc47829055ad6d..d5ab6ec0ba197b59103ffca45e07067cb4daccf0 100644 (file)
@@ -43,9 +43,6 @@
 #  include <istream.h>
 #endif
 
-SG_USING_STD(istream);
-
-
 #define FG_NAV_DEFAULT_RANGE 50 // nm
 #define FG_LOC_DEFAULT_RANGE 18 // nm
 #define FG_DME_DEFAULT_RANGE 50 // nm
@@ -105,7 +102,7 @@ public:
     inline bool get_serviceable() const { return serviceable; }
     inline const char *get_trans_ident() const { return trans_ident.c_str(); }
 
-    friend istream& operator>> ( istream&, FGNavRecord& );
+    friend std::istream& operator>> ( std::istream&, FGNavRecord& );
 };
 
 
@@ -136,8 +133,8 @@ inline fg_nav_types FGNavRecord::get_fg_type() const {
 }
 
 
-inline istream&
-operator >> ( istream& in, FGNavRecord& n )
+inline std::istream&
+operator >> ( std::istream& in, FGNavRecord& n )
 {
     in >> n.type;
     
@@ -209,7 +206,7 @@ public:
 
     inline const string& get_channel() const { return channel; }
     inline int get_freq() const { return freq; }
-    friend istream& operator>> ( istream&, FGTACANRecord& );
+    friend std::istream& operator>> ( std::istream&, FGTACANRecord& );
     };
 
 
@@ -221,8 +218,8 @@ FGTACANRecord::FGTACANRecord(void) :
 {
 }
 
-inline istream&
-operator >> ( istream& in, FGTACANRecord& n )
+inline std::istream&
+operator >> ( std::istream& in, FGTACANRecord& n )
 {
     in >> n.channel >> n.freq ;
     //getline( in, n.name );