]> git.mxchange.org Git - flightgear.git/commitdiff
Fix (nearly) all the std:: namespace violations in headers, in preparation for fixing...
authorJames Turner <zakalawe@mac.com>
Mon, 17 Oct 2011 16:41:59 +0000 (17:41 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 17 Oct 2011 16:41:59 +0000 (17:41 +0100)
114 files changed:
src/AIModel/AIBase.hxx
src/ATC/atcdialog.hxx
src/ATCDCL/ATCDialogOld.cxx
src/ATCDCL/atis.cxx
src/Airports/simple.cxx
src/Autopilot/analogcomponent.cxx
src/Autopilot/autopilot.cxx
src/Autopilot/autopilotgroup.cxx
src/Autopilot/component.cxx
src/Autopilot/digitalcomponent.cxx
src/Autopilot/digitalfilter.cxx
src/Autopilot/flipflop.cxx
src/Autopilot/pidcontroller.cxx
src/Autopilot/pisimplecontroller.cxx
src/Autopilot/predictor.cxx
src/Cockpit/panel.cxx
src/Environment/fgclouds.cxx
src/Environment/presets.cxx
src/Environment/realwx_ctrl.cxx
src/Environment/ridge_lift.cxx
src/Environment/terrainsampler.cxx
src/FDM/YASim/Hitch.cpp
src/FDM/YASim/Rotor.cpp
src/GUI/menubar.cxx
src/GUI/menubar.hxx
src/GUI/new_gui.cxx
src/GUI/new_gui.hxx
src/GUI/property_list.cxx
src/Input/FGCommonInput.cxx
src/Input/FGEventInput.cxx
src/Input/FGEventInput.hxx
src/Input/FGJoystickInput.cxx
src/Input/FGMacOSXEventInput.cxx
src/Input/FGMacOSXEventInput.hxx
src/Input/FGMouseInput.cxx
src/Instrumentation/HUD/HUD.cxx
src/Instrumentation/KLN89/kln89.cxx
src/Instrumentation/KLN89/kln89.hxx
src/Instrumentation/KLN89/kln89_page.cxx
src/Instrumentation/KLN89/kln89_page.hxx
src/Instrumentation/KLN89/kln89_page_alt.cxx
src/Instrumentation/KLN89/kln89_page_apt.hxx
src/Instrumentation/KLN89/kln89_page_cal.cxx
src/Instrumentation/KLN89/kln89_page_dir.cxx
src/Instrumentation/KLN89/kln89_page_dir.hxx
src/Instrumentation/KLN89/kln89_page_fpl.hxx
src/Instrumentation/KLN89/kln89_page_int.cxx
src/Instrumentation/KLN89/kln89_page_int.hxx
src/Instrumentation/KLN89/kln89_page_nav.cxx
src/Instrumentation/KLN89/kln89_page_nav.hxx
src/Instrumentation/KLN89/kln89_page_ndb.cxx
src/Instrumentation/KLN89/kln89_page_ndb.hxx
src/Instrumentation/KLN89/kln89_page_oth.cxx
src/Instrumentation/KLN89/kln89_page_vor.cxx
src/Instrumentation/KLN89/kln89_page_vor.hxx
src/Instrumentation/NavDisplay.hxx
src/Instrumentation/adf.hxx
src/Instrumentation/airspeed_indicator.hxx
src/Instrumentation/altimeter.hxx
src/Instrumentation/attitude_indicator.cxx
src/Instrumentation/attitude_indicator.hxx
src/Instrumentation/clock.cxx
src/Instrumentation/clock.hxx
src/Instrumentation/dclgps.hxx
src/Instrumentation/dme.hxx
src/Instrumentation/gsdi.cxx
src/Instrumentation/gsdi.hxx
src/Instrumentation/heading_indicator.cxx
src/Instrumentation/heading_indicator.hxx
src/Instrumentation/heading_indicator_dg.cxx
src/Instrumentation/heading_indicator_dg.hxx
src/Instrumentation/heading_indicator_fg.cxx
src/Instrumentation/heading_indicator_fg.hxx
src/Instrumentation/inst_vertical_speed_indicator.hxx
src/Instrumentation/kr_87.hxx
src/Instrumentation/mag_compass.cxx
src/Instrumentation/mag_compass.hxx
src/Instrumentation/mrg.cxx
src/Instrumentation/mrg.hxx
src/Instrumentation/navradio.hxx
src/Instrumentation/newnavradio.cxx
src/Instrumentation/slip_skid_ball.cxx
src/Instrumentation/slip_skid_ball.hxx
src/Instrumentation/tacan.cxx
src/Instrumentation/tacan.hxx
src/Instrumentation/transponder.cxx
src/Instrumentation/transponder.hxx
src/Instrumentation/turn_indicator.cxx
src/Instrumentation/turn_indicator.hxx
src/Instrumentation/vertical_speed_indicator.cxx
src/Instrumentation/vertical_speed_indicator.hxx
src/Instrumentation/wxradar.cxx
src/Instrumentation/wxradar.hxx
src/Main/fg_props.hxx
src/Main/logger.cxx
src/Main/main.cxx
src/Main/splash.cxx
src/Main/util.cxx
src/Main/viewmgr.cxx
src/Main/viewmgr.hxx
src/Navaids/navdb.cxx
src/Network/ATC-Inputs.cxx
src/Network/ATC-Main.cxx
src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx
src/Sound/voice.cxx
src/Sound/voice.hxx
src/Systems/pitot.hxx
src/Systems/static.cxx
src/Systems/static.hxx
src/Systems/vacuum.cxx
src/Systems/vacuum.hxx
src/Time/TimeManager.cxx
utils/fgpanel/FGPanelProtocol.hxx

index ed20dd869b6a9d65269ae87fbb171996e30983c7..fb845bd4158bb811bb87a7032742f4c6c7702f6f 100644 (file)
@@ -134,7 +134,7 @@ public:
     string _path;
     string _callsign;
     string _submodel;
-    string _name;
+    std::string _name;
     string _parent;
 
     SGGeod userpos;
index 2e1c4ada686af1a194e8e4f2677b9149e0a0e234..3125fd3e475e2e9a585cb9ed2f6ade38a20d44d3 100644 (file)
@@ -40,8 +40,8 @@
 #include <GUI/gui.h>           // mkDialog
 #include <GUI/new_gui.hxx>
 
-typedef vector<string> StringVec;
-typedef vector<string>:: iterator StringVecIterator;
+typedef std::vector<std::string> StringVec;
+typedef StringVec::iterator StringVecIterator;
 
 
 class FGATCDialogNew {
index 9f1a53077bdc60f30aa309dde2dca9cb480b2beb..bb3cc1650fa46eefd11cb9f854e43d2fa61a72e1 100644 (file)
@@ -41,6 +41,8 @@
 #include <sstream>
 
 using std::ostringstream;
+using std::cerr;
+using std::endl;
 
 FGATCDialog *current_atcdialog;
 
index 460cc31a8acbd482ba1f38eb687139c11840e6ed..dad36fb0a8c351aa2a1584e5847d2e44ba403659 100644 (file)
@@ -59,6 +59,8 @@
 #include "ATCutils.hxx"
 #include "ATCmgr.hxx"
 
+using std::string;
+using std::map;
 using std::cout;
 using std::cout;
 using boost::ref;
index 92b79005ad756d5a8b3945a8dd2316f5bb534a76..d9ac0e676f5355d3dc174a0e055788862caa881b 100644 (file)
@@ -51,6 +51,8 @@
 #include <ATC/CommStation.hxx>
 
 using std::vector;
+using std::pair;
+
 using namespace flightgear;
 
 // magic import of a helper which uses FGPositioned internals
@@ -76,7 +78,6 @@ FGAirport::FGAirport(const string &id, const SGGeod& location, const SGGeod& tow
 
 FGAirport::~FGAirport()
 {
-    cerr << "Deleting Airport" << endl;
     delete _dynamics;
 }
 
@@ -552,7 +553,7 @@ FGAirport::selectSID(const SGGeod& aDest, FGRunway* aRwy)
       << (aRwy ? aRwy->ident() : "no runway preference"));
   }
   
-  return make_pair(sid, enroute);
+  return std::make_pair(sid, enroute);
 }
     
 pair<STAR*, WayptRef>
@@ -584,7 +585,7 @@ FGAirport::selectSTAR(const SGGeod& aOrigin, FGRunway* aRwy)
     }
   } // of STAR iteration
   
-  return make_pair(star, enroute);
+  return std::make_pair(star, enroute);
 }
 
 
index d32717d226ec3bba6a4a1e3e98025f965b651a20..752c3ecedbc9ab45fd3fa4ebfa76a10e2beb9f5d 100644 (file)
@@ -51,7 +51,7 @@ double AnalogComponent::clamp( double value ) const
 
 bool AnalogComponent::configure( const std::string & nodeName, SGPropertyNode_ptr configNode )
 {
-  SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ")" << endl );
+  SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ")" );
   if( Component::configure( nodeName, configNode ) )
     return true;
 
@@ -108,6 +108,6 @@ bool AnalogComponent::configure( const std::string & nodeName, SGPropertyNode_pt
     return true;
   }
 
-  SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ") [unhandled]" << endl );
+  SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ") [unhandled]" );
   return false;
 }
index e8bb91b02bc857bf090267e962e67e2dc8d8f135..b68ea958ee2f601585b85144bd47ca9bece9b89f 100644 (file)
@@ -36,6 +36,9 @@
 
 #include "Main/fg_props.hxx"
 
+using std::map;
+using std::string;
+
 using namespace FGXMLAutopilot;
 
 Autopilot::Autopilot( SGPropertyNode_ptr rootNode, SGPropertyNode_ptr configNode ) :
@@ -58,13 +61,13 @@ Autopilot::Autopilot( SGPropertyNode_ptr rootNode, SGPropertyNode_ptr configNode
     SGPropertyNode_ptr node = configNode->getChild(i);
     string childName = node->getName();
     if( componentForge.count(childName) == 0 ) {
-      SG_LOG( SG_AUTOPILOT, SG_BULK, "unhandled element <" << childName << ">" << endl );
+      SG_LOG( SG_AUTOPILOT, SG_BULK, "unhandled element <" << childName << ">" << std::endl );
       continue;
     }
 
     Component * component = (*componentForge[childName])(node);
     if( component->get_name().length() == 0 ) {
-      ostringstream buf;
+      std::ostringstream buf;
       buf <<  "unnamed_component_" << i;
       component->set_name( buf.str() );
     }
@@ -96,7 +99,7 @@ void Autopilot::add_component( Component * component )
   // check for duplicate name
   std::string name = component->get_name();
   for( unsigned i = 0; get_subsystem( name.c_str() ) != NULL; i++ ) {
-      ostringstream buf;
+      std::ostringstream buf;
       buf <<  component->get_name() << "_" << i;
       name = buf.str();
   }
index e58cd8fd71ad8e1bbb7aaeb11d20932a7d3fbf11..10c55514ff4464beb5e8199fbe2d3a0ce85aa77b 100644 (file)
@@ -36,7 +36,8 @@
 #include <simgear/structure/exception.hxx>
 #include <Main/fg_props.hxx>
 
-
+using std::vector;
+using std::string;
 using simgear::PropertyList;
 
 class FGXMLAutopilotGroupImplementation : public FGXMLAutopilotGroup
@@ -111,7 +112,7 @@ void FGXMLAutopilotGroupImplementation::initFrom( SGPropertyNode_ptr rootNode, c
           // check for duplicate names
           string name = apName;
           for( unsigned i = 0; get_subsystem( apName.c_str() ) != NULL; i++ ) {
-              ostringstream buf;
+              std::ostringstream buf;
               buf <<  name << "_" << i;
               apName = buf.str();
           }
index 63ee6262a1b062b53a5226c1dea626ddb0d188de..1da236cc9c3f29f0613dac1b111f5c6285a05fbf 100644 (file)
@@ -58,7 +58,7 @@ bool Component::configure( SGPropertyNode_ptr configNode )
 
 bool Component::configure( const std::string & nodeName, SGPropertyNode_ptr configNode )
 {
-  SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ")" << endl );
+  SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ")" << std::endl );
 
   if ( nodeName == "name" ) {
     _name = configNode->getStringValue();
@@ -97,7 +97,7 @@ bool Component::configure( const std::string & nodeName, SGPropertyNode_ptr conf
     return true;
   } // enable
 
-  SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ") [unhandled]" << endl );
+  SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ") [unhandled]" << std::endl );
   return false;
 }
 
index 8fed619fb0767b3b22eb53a95500baffcddf1d83..5e3e9fb227105ed25bed633dc4a0e3d50b0d1dd4 100644 (file)
@@ -24,6 +24,7 @@
 #include "digitalcomponent.hxx"
 #include <Main/fg_props.hxx>
 
+using std::string;
 using namespace FGXMLAutopilot;
 
 DigitalComponent::DigitalComponent() :
index 2686797434936113423c860b86c219dcf3b4d3ff..6f83b01e1f6ea48d2b134f1748a572c1033445e2 100644 (file)
 #include "functor.hxx"
 #include <deque>
 
+using std::map;
+using std::string;
+using std::endl;
+using std::cout;
+
 namespace FGXMLAutopilot {
 
 /* --------------------------------------------------------------------------------- */
index 076b2db48eae542ecdeba2013170a8d3bb36acb2..8046ce5dcd8ddcc761ac44faf9a562bdc4fb4eba 100644 (file)
 #include "inputvalue.hxx"
 #include <Main/fg_props.hxx>
 
+using std::map;
+using std::string;
+using std::endl;
+using std::cout;
+
 namespace FGXMLAutopilot {
 
 /**
index 1ad027460c1c45a3d7055c87f16e3569357ad9db..c3631a22dfb28d899ed24e96d6316ef04c7d2d9a 100644 (file)
@@ -25,6 +25,9 @@
 
 using namespace FGXMLAutopilot;
 
+using std::endl;
+using std::cout;
+
 PIDController::PIDController():
     AnalogComponent(),
     alpha( 0.1 ),
index b19633adf46205022bab50800ee5e46de4433b98..c332606988253b617a0af305a4947d4a71d15a14 100644 (file)
@@ -25,6 +25,9 @@
 
 using namespace FGXMLAutopilot;
 
+using std::endl;
+using std::cout;
+
 PISimpleController::PISimpleController() :
     AnalogComponent(),
     _int_sum( 0.0 )
index e1a9f6dc8beb919dd59a6f2b659b7199ab3f68bb..d5c854a728662449133d07a5e3ebd39cb703f42e 100644 (file)
@@ -25,6 +25,9 @@
 
 using namespace FGXMLAutopilot;
 
+using std::endl;
+using std::cout;
+
 Predictor::Predictor () :
     AnalogComponent(),
     _average(0.0)
index 7c7dd810c690e1f21119b43f8657453db7046f5f..916771726e6fdb81fe97c57446784c3fbb60f927 100644 (file)
@@ -71,6 +71,8 @@
 // my hardware/driver requires many more.
 #define POFF_UNITS 8
 
+using std::map;
+
 ////////////////////////////////////////////////////////////////////////
 // Local functions.
 ////////////////////////////////////////////////////////////////////////
index 6cc4d49ef4f2fda9992d4cf0cfb742a841dc96be..e7273a7148ed6b44c05c13c74d6dba536c6d0431 100644 (file)
@@ -135,7 +135,7 @@ double FGClouds::buildCloud(SGPropertyNode *cloud_def_root, SGPropertyNode *box_
                        double c = abox->getDoubleValue("count", 5);
                        int count = (int) (c + (sg_random() - 0.5) * c);
 
-                       extent = max(w*w, extent);
+                       extent = std::max(w*w, extent);
 
                        for (int j = 0; j < count; j++) {
 
index 55da646302b829cb215501b96bd29aef574ce3df..5e31e63cff87d45f23878d86de82ea01d1f2459c 100644 (file)
@@ -24,6 +24,7 @@
 #endif
 #include "presets.hxx"
 
+#include <cmath>
 #include <simgear/math/SGMisc.hxx>
 #include <Main/fg_props.hxx>
 
index a481268ea069075a9e3253e1f33115a87461f1ae..5592a386e771b9c6ede33013729c4cea81912228 100644 (file)
@@ -330,7 +330,7 @@ void NoaaMetarRealWxController::requestMetar( MetarDataHandler * metarDataHandle
               string reply;
 
               if( name == "X-TIME" ) {
-                  ostringstream buf;
+                  std::ostringstream buf;
                   buf <<  globals->get_time_params()->get_cur_time();
                   reply = buf.str();
               }
index 3b675a93ff686f3d4c3eef285018f8fda05fa1da..cac1388aa90dfb6644c5f2aa4df6d959e4f5707f 100644 (file)
@@ -187,8 +187,8 @@ void FGRidgeLift::update(double dt) {
        //boundaries
        double boundary2_m = 130.0; // in the lift
        if (lift_factor < 0.0) { // in the sink
-               double highest_probe_temp= max ( probe_elev_m[1], probe_elev_m[2] );
-               double highest_probe_downwind_m= max ( highest_probe_temp, probe_elev_m[3] );
+               double highest_probe_temp= std::max ( probe_elev_m[1], probe_elev_m[2] );
+               double highest_probe_downwind_m= std::max ( highest_probe_temp, probe_elev_m[3] );
                boundary2_m = highest_probe_downwind_m - probe_elev_m[0];
        }
 
@@ -199,7 +199,7 @@ void FGRidgeLift::update(double dt) {
                agl_factor = 1.0;
        } else {
                agl_factor = exp(-(2 + probe_elev_m[0] / 2000) * 
-                               (user_altitude_agl_m - boundary2_m) / max(probe_elev_m[0],200.0));
+                     (user_altitude_agl_m - boundary2_m) / std::max(probe_elev_m[0],200.0));
        }
        
        double ground_wind_speed_mps = _surface_wind_speed_node->getDoubleValue() * SG_NM_TO_METER / 3600;
index d3a0e713845f8d230f66c28f3cfa27a170b123e4..c2f928350662d455ed166c91502e5cca0f4b07f4 100644 (file)
 #include <deque>
 
 #include "terrainsampler.hxx"
+
 using simgear::PropertyList;
+using std::deque;
+using std::vector;
+using std::ostringstream;
+using std::string;
 
 #include <simgear/props/tiedpropertylist.hxx>
 
index df8b1f7cc0f7e55fd1ffdd3a1ee6df3dacc30183..5681625b86127870e3db4e1b4b4720b82a48c2a6 100644 (file)
@@ -7,6 +7,9 @@
 
 
 #include "Hitch.hpp"
+
+using std::vector;
+
 namespace yasim {
 Hitch::Hitch(const char *name)
 {
index 2a93a4457f4be5e9468ddad21d4784c31f455a4d..797bf21ab4a01d81bc8b41780a48a633b062e159 100644 (file)
@@ -11,8 +11,6 @@
 #include <iostream>
 #include <iomanip>
 
-using std::setprecision;
-
 #ifdef TEST_DEBUG
 #include <stdio.h>
 #endif
@@ -20,7 +18,8 @@ using std::setprecision;
 #include <iostream>
 #include <sstream>
 
-
+using std::setprecision;
+using std::endl;
 
 namespace yasim {
 
@@ -732,7 +731,7 @@ void Rotor::setParameter(const char *parametername, float value)
         p(rotor_correction_factor,1)
         SG_LOG(SG_INPUT, SG_ALERT,
             "internal error in parameter set up for rotor: '" << 
-            parametername <<"'" << endl);
+               parametername <<"'" << std::endl);
 #undef p
 }
 
index 40f803c231b954ca7f8fb418a768b9e58b6eef4e..b21b9ce64f5357b62fa16b315d777c6f8e8b9048 100644 (file)
@@ -14,8 +14,9 @@
 #include "new_gui.hxx"
 #include "menubar.hxx"
 
-
-\f
+using std::vector;
+using std::string;
+using std::map;\f
 ////////////////////////////////////////////////////////////////////////
 // FIXME!!
 //
index eab4b7ff8c6d939b700fe5d1a71e6615fb45d100..79e0af8146d9e4802824c4fe113c96d8743a258f 100644 (file)
@@ -7,17 +7,12 @@
 # error This library requires C++
 #endif
 
-#include <simgear/compiler.h>  // for SG_USING_STD
 #include <Main/fg_props.hxx>
 
 #include <plib/pu.h>
 
 #include <map>
-using std::map;
-
 #include <vector>
-using std::vector;
-
 
 class puMenuBar;
 class puObject;
@@ -124,7 +119,7 @@ private:
     puMenuBar * _menuBar;
 
     // A map of bindings for the menubar.
-    map<string,vector<SGBinding *> > _bindings;
+    std::map<std::string,std::vector<SGBinding *> > _bindings;
 
     // These are hoops that we have to jump through because PUI doesn't
     // do memory management for lists.  We have to allocate the arrays,
@@ -132,11 +127,11 @@ private:
     // freed.
     char ** make_char_array (int size);
     puCallback * make_callback_array (int size);
-    vector<char **> _char_arrays;
-    vector<puCallback *> _callback_arrays;
+    std::vector<char **> _char_arrays;
+    std::vector<puCallback *> _callback_arrays;
 
     // A map for {menu node path}->puObject translation.
-    map<string, puObject *> _objects;
+    std::map<std::string, puObject *> _objects;
 };
 
 #endif // __MENUBAR_HXX
index b8834fdcaed7924a5ba4a7e7aaf64efe9fd91c50..220d4c3fcbb35579b3e4bbc4136ddf2354008e33 100644 (file)
@@ -32,9 +32,9 @@
 extern puFont FONT_HELVETICA_14;
 extern puFont FONT_SANS_12B;
 
+using std::map;
+using std::string;
 
-
-\f
 ////////////////////////////////////////////////////////////////////////
 // Implementation of NewGUI.
 ////////////////////////////////////////////////////////////////////////
index 0797d53a66ac8551f4b8adc9e0362b00fd832297..53590173ef1db5b564edee4fad611e13ffaadc9b 100644 (file)
@@ -212,9 +212,10 @@ private:
     };
 
     puFont *_font;
-    map<const char*,FGColor*, ltstr> _colors;
-    typedef map<const char*,FGColor*, ltstr>::iterator _itt_t;
-    typedef map<const char*,FGColor*, ltstr>::const_iterator _citt_t;
+    typedef std::map<const char*,FGColor*, ltstr> ColourDict;
+    ColourDict _colors;
+    typedef ColourDict::iterator _itt_t;
+    typedef ColourDict::const_iterator _citt_t;
 
     void clear_colors();
 
@@ -311,8 +312,8 @@ private:
     // Path to the font directory
     SGPath _path;
 
-    typedef map<const string, fntTexFont*> TexFontMap;
-    typedef map<const FntParams, fnt*, FntParamsLess> PuFontMap;
+    typedef std::map<const std::string, fntTexFont*> TexFontMap;
+    typedef std::map<const FntParams, fnt*, FntParamsLess> PuFontMap;
     TexFontMap _texFonts;
     PuFontMap _puFonts;
 
index 7940ca28f11a464f28cff6cd60cf618267c572cb..6ceba838ca97112bfa107fc7dcdcfcc6dae8a405 100644 (file)
 #include <iomanip>
 #include <iostream>
 #include <string>
+
 using std::string;
 using std::cout;
+using std::endl;
 
 typedef string stdString;      // puObject has a "string" member
 
@@ -95,7 +97,7 @@ static void dumpProperties(const SGPropertyNode *node)
         case props::VEC3D:
         case props::VEC4D:
         {
-            streamsize precision = cout.precision(15);
+            std::streamsize precision = cout.precision(15);
             c->printOn(cout);
             cout.precision(precision);
         }
index 3e9d92aa981188d20c631b780c7ce951ed72c0e0..f62b5ebc77eb49a782545979e21c90c27b615a02 100644 (file)
@@ -33,6 +33,7 @@
 #include <simgear/math/SGMath.hxx>
 
 using simgear::PropertyList;
+using std::string;
 
 void FGCommonInput::read_bindings (const SGPropertyNode * node, binding_list_t * binding_list, int modifiers, const string & module )
 {
index 7e8c98944bc342fbdc3d72b88c00175b8935e481..a90d20c882e7c0aead8f5244ee3ec498bd6aa935 100644 (file)
@@ -32,6 +32,8 @@
 #include <Scripting/NasalSys.hxx>
 
 using simgear::PropertyList;
+using std::cout;
+using std::endl;
 
 FGEventSetting::FGEventSetting( SGPropertyNode_ptr base ) :
   value(0.0)
index 7188c83813f112d844e0d2afae40a27c09465d34..23b4dd4d1c3ef5f0cf46e62c7f56504ee1a6d6d6 100644 (file)
@@ -24,6 +24,9 @@
 #define __FGEVENTINPUT_HXX
 
 #include "FGCommonInput.hxx"
+
+#include <vector>
+
 #include "FGButton.hxx"
 #include "FGDeviceConfigurationMap.hxx"
 #include <simgear/structure/subsystem_mgr.hxx>
@@ -57,7 +60,7 @@ protected:
 };
 
 typedef SGSharedPtr<FGEventSetting> FGEventSetting_ptr;
-typedef vector<FGEventSetting_ptr> setting_list_t;
+typedef std::vector<FGEventSetting_ptr> setting_list_t;
 
 /*
  * A wrapper class for a configured event. 
@@ -99,12 +102,12 @@ public:
   /*
    * access for the name property
    */
-  string GetName() const { return name; }
+  std::string GetName() const { return name; }
 
   /*
    * access for the description property
    */
-  string GetDescription() const { return desc; }
+  std::string GetDescription() const { return desc; }
 
   virtual void update( double dt );
 
@@ -113,10 +116,10 @@ public:
 protected:
   virtual void fire( SGBinding * binding, FGEventData & eventData );
   /* A more or less meaningfull description of the event */
-  string desc;
+  std::string desc;
 
   /* One of the predefined names of the event */
-  string name;
+  std::string name;
 
   /* A list of SGBinding objects */
   binding_list_t bindings[KEYMOD_MAX];
@@ -184,7 +187,7 @@ typedef class SGSharedPtr<FGInputEvent> FGInputEvent_ptr;
 class FGInputDevice : public SGReferenced {
 public:
   FGInputDevice() : debugEvents(false), grab(false) {}
-  FGInputDevice( string aName ) : name(aName) {}
+  FGInputDevice( std::string aName ) : name(aName) {}
     
   virtual ~FGInputDevice();
 
@@ -193,15 +196,15 @@ public:
 
   virtual void Send( const char * eventName, double value ) = 0;
 
-  inline void Send( const string & eventName, double value ) {
+  inline void Send( const std::string & eventName, double value ) {
     Send( eventName.c_str(), value );
   }
 
   virtual const char * TranslateEventName( FGEventData & eventData ) = 0;
 
 
-  void SetName( string name );
-  string & GetName() { return name; }
+  void SetName( std::string name );
+  std::string & GetName() { return name; }
 
   void HandleEvent( FGEventData & eventData );
 
@@ -218,14 +221,14 @@ public:
 
   bool GetGrab() const { return grab; }
 
-  const string & GetNasalModule() const { return nasalModule; }
+  const std::string & GetNasalModule() const { return nasalModule; }
 
 private:
   // A map of events, this device handles
-  map<string,FGInputEvent_ptr> handledEvents;
+  std::map<std::string,FGInputEvent_ptr> handledEvents;
 
   // the device has a name to be recognized
-  string name;
+  std::string name;
 
   // print out events comming in from the device
   // if true
@@ -236,7 +239,7 @@ private:
   bool   grab;
 
   SGPropertyNode_ptr deviceNode;
-  string nasalModule;
+  std::string nasalModule;
 };
 
 typedef SGSharedPtr<FGInputDevice> FGInputDevice_ptr;
@@ -261,7 +264,7 @@ protected:
   unsigned AddDevice( FGInputDevice * inputDevice );
   void RemoveDevice( unsigned index );
 
-  map<int,FGInputDevice*> input_devices;
+  std::map<int,FGInputDevice*> input_devices;
   FGDeviceConfigurationMap configMap;
 
   SGPropertyNode_ptr nasalClose;
index 516679f25136565358ccbfbde3d1ac1c0b542f8a..58a491c789731b21302434f381bc0c3d3b1baaf7 100644 (file)
@@ -193,7 +193,7 @@ void FGJoystickInput::postinit()
     //
     // Initialize nasal groups.
     //
-    ostringstream str;
+    std::ostringstream str;
     str << "__js" << i;
     string module = str.str();
     nasalsys->createModule(module.c_str(), module.c_str(), "", 0);
index 6c6d27fb550d1571d965d6efb420d3362b2fcffe..28c3094cccfa84c0653d891f8d43c181eea19531 100644 (file)
@@ -22,6 +22,9 @@
 
 #include "FGMacOSXEventInput.hxx"
 
+using std::stringstream;
+using std::map;
+using std::string;
 
 #define GetHIDElementLongValue(element, key) ({ \
       long value = 0; \
@@ -612,7 +615,7 @@ void FGMacOSXInputDevice::Open() {
        
   if (ret != kIOReturnSuccess) {
     SG_LOG(SG_INPUT, SG_ALERT, "Error creating a plugin for HID : " << GetName());
-    throw exception();
+    throw std::exception();
     return;
   }
 
@@ -626,14 +629,14 @@ void FGMacOSXInputDevice::Open() {
   (*plugin)->Release(plugin); // don't leak a ref
   if (devInterface == NULL) {
     return;
-    throw exception();
+    throw std::exception();
   }
        
   // store the interface in this instance
   ret = (*devInterface)->open(devInterface, 0);
   if (ret != kIOReturnSuccess) {
     SG_LOG(SG_INPUT, SG_ALERT, "Error opening device interface: " << GetName());
-    throw exception();
+    throw std::exception();
     return;
   }
   CFDictionaryRef props = getProperties();
index a730c30157d70dcf161f021d9c8eaf92d239d3f3..07e16ae135f294f7fe2745772ebb26b4a10a349a 100644 (file)
@@ -68,9 +68,9 @@ typedef enum {
 
 class HIDElement;
 struct FGMacOSXEventData : public FGEventData {
-  FGMacOSXEventData(string name, double value, double dt, int modifiers) : 
+  FGMacOSXEventData(std::string name, double value, double dt, int modifiers) : 
     FGEventData(value, dt, modifiers), name(name) {}
-  string name;
+  std::string name;
 };
 
 //
@@ -92,7 +92,7 @@ public:
   HIDElement(CFDictionaryRef element, long page, long usage);
   virtual ~HIDElement() {}
   bool isUpdated();
-  string getName() { return name; }
+  std::string getName() { return name; }
   virtual void generateEvent(FGMacOSXInputDevice *device, double dt, int modifiers);
   virtual long read(IOHIDDeviceInterface **interface);
   virtual void write(IOHIDDeviceInterface **interface, double value) { 
@@ -106,7 +106,7 @@ protected:
   float value;
   float lastValue;
 
-  string name;
+  std::string name;
 };
 
 class AxisElement : public HIDElement {
@@ -182,7 +182,7 @@ public:
 private:
   io_object_t device;
   IOHIDDeviceInterface **devInterface;
-  map<string, HIDElement *> elements; // maps eventName and its relevant element for Send()
+  std::map<std::string, HIDElement *> elements; // maps eventName and its relevant element for Send()
 };
 
 //
@@ -225,22 +225,22 @@ private:
   io_iterator_t removedIterator;
 
   // maps FG device property ID (i.e. /input/events/device[ID]) with io_object for detaching devices
-  map<io_object_t, unsigned> deviceIndices; 
+  std::map<io_object_t, unsigned> deviceIndices; 
 };
 
 
 //
 // For obtaining event name and type from both HID element page and usage
 // 
-class HIDTypeByID : public map<long, pair<HIDUsageType, const char *>*> {
+class HIDTypeByID : public std::map<long, std::pair<HIDUsageType, const char *>*> {
 public:
   HIDTypeByID(struct HIDTypes *table) {
     for( int i = 0; table[i].key!= -1; i++ )
-      (*this)[table[i].key] = new pair<HIDUsageType, const char *>(table[i].type, table[i].eventName);
+      (*this)[table[i].key] = new std::pair<HIDUsageType, const char *>(table[i].type, table[i].eventName);
   }
 
   ~HIDTypeByID() {
-    map<long, pair<HIDUsageType, const char *>*>::iterator it;
+    std::map<long, std::pair<HIDUsageType, const char *>*>::iterator it;
     for (it = this->begin(); it != this->end(); it++) {
       delete (*it).second;
     }
@@ -249,7 +249,7 @@ public:
 
   // key = (HID_element_page) << 16 | HID_element_usage)
   const char *getName(long key) {
-    pair<HIDUsageType, const char *> *usageType = (*this)[key];
+    std::pair<HIDUsageType, const char *> *usageType = (*this)[key];
     if (usageType == NULL) {
       return "";
     } else {
@@ -258,7 +258,7 @@ public:
   }
 
   const HIDUsageType getType(long key) {
-    pair<HIDUsageType, const char *> *usageType = (*this)[key];
+    std::pair<HIDUsageType, const char *> *usageType = (*this)[key];
     if (usageType == NULL) {
       return kHIDUsageNotSupported;
     } else {
index 276fc0ed55efb9d3e68180a37ab92c5ab77d0eb4..5d9a6884b1b2892ba48d1d2f65c3d91f55bc4b29 100644 (file)
@@ -25,6 +25,8 @@
 #include "FGMouseInput.hxx"
 #include "Main/globals.hxx"
 
+using std::ios_base;
+
 void ActivePickCallbacks::init( int b, const osgGA::GUIEventAdapter* ea )
 {
   // Get the list of hit callbacks. Take the first callback that
index d886bc76ed0fdfcdd5bf372139dc0abea53879bb..2f130ae9615166c4c05e2db00a3d3fc7b5920b85 100644 (file)
@@ -40,6 +40,8 @@
 
 #include "HUD.hxx"
 
+using std::endl;
+using std::ifstream;
 
 static float clamp(float f)
 {
index 8b7f537790bef5c0e16f521a0fd7dcc9ba431dd5..c2212a99f6f3b26f924e67c323ba456733166e7c 100644 (file)
@@ -52,6 +52,7 @@
 #include <Airports/simple.hxx>
 
 using std::cout;
+using std::string;
 
 // Command callbacks for FlightGear
 
index b84d6efdc1c6039141b34701a011074e72b0acc0..c9ee874d536c2a2090bdb1ee826e2df76ee34c2a 100644 (file)
@@ -68,10 +68,10 @@ const char* KLN89TimeCodes[20] = { "UTC", "GST", "GDT", "ATS", "ATD", "EST", "ED
 */
 
 // Used for storing airport town and county mapped by ID, since currently FG does not store this
-typedef map<string, string> airport_id_str_map_type;
+typedef std::map<std::string, std::string> airport_id_str_map_type;
 typedef airport_id_str_map_type::iterator airport_id_str_map_iterator;
 
-typedef vector<KLN89Page*> kln89_page_list_type;
+typedef std::vector<KLN89Page*> kln89_page_list_type;
 typedef kln89_page_list_type::iterator kln89_page_list_itr;
 
 class KLN89 : public DCLGPS {
@@ -150,14 +150,14 @@ private:
        void ToggleOBSMode();
        
        // Initiate Direct To operation to the supplied ID.
-       void DtoInitiate(const string& id);
+       void DtoInitiate(const std::string& id);
 
        //----------------------- Drawing functions which take CHARACTER units -------------------------
        // Render string s in display field field at position x, y
        // WHERE POSITION IS IN CHARACTER UNITS!
        // zero y at bottom?
        // invert: -1 => no inversion, 0 -> n => 1 char - s[invert] gets inverted, 99 => entire string gets inverted 
-       void DrawText(const string& s, int field, int px, int py, bool bold = false, int invert = -1);
+       void DrawText(const std::string& s, int field, int px, int py, bool bold = false, int invert = -1);
        
        void DrawLatitude(double d, int field, int px, int py);
        void DrawLongitude(double d, int field, int px, int py);
@@ -307,7 +307,7 @@ private:
        // Draw an airport or waypoint label on the moving map
        // Specify position by the map pixel co-ordinate of the left or right, bottom, of the *visible* portion of the label.
        // The black background quad will automatically overlap this by 1 pixel.
-       void DrawLabel(const string& s, int x1, int y1, bool right_align = false);
+       void DrawLabel(const std::string& s, int x1, int y1, bool right_align = false);
        
        int GetLabelQuadrant(double h);
        int GetLabelQuadrant(double h1, double h2);
@@ -316,7 +316,7 @@ private:
        void DrawLine(int x1, int y1, int x2, int y2);
        
        // Draw normal sized text on the moving map
-       void DrawMapText(const string& s, int x, int y, bool draw_background = false);
+       void DrawMapText(const std::string& s, int x, int y, bool draw_background = false);
        
        void DrawMapUpArrow(int x, int y);
        
index a53f3065b88c3017a7fe5cc2fd8cdc93d5f821cc..03a22ee88f6323980377e887f04b4937bf6b9d2f 100644 (file)
@@ -24,6 +24,8 @@
 #include "kln89_page.hxx"
 #include <Main/fg_props.hxx>
 
+using std::string;
+
 KLN89Page::KLN89Page(KLN89* parent) {
        _kln89 = parent;
        _entInvert = false;
index 7c2e1802e2f9b1f7bd44e3ec68452227f5d0e463..d785a7d9afa9d1c172fd96c7301787bdde483d8f 100644 (file)
@@ -65,21 +65,21 @@ public:
        inline void SetEntInvert(bool b) { _entInvert = b; }
        
        // Get / Set a waypoint id, NOT the page name!
-       virtual void SetId(const string& s);
-       virtual const string& GetId();
+       virtual void SetId(const std::string& s);
+       virtual const std::string& GetId();
        
        inline int GetSubPage() { return(_subPage); }
        void SetSubPage(int n);
        
        inline int GetNSubPages() { return(_nSubPages); }
        
-       inline const string& GetName() { return(_name); }
+       inline const std::string& GetName() { return(_name); }
        
 protected:
 
        KLN89* _kln89;
        
-       string _name;   // eg. "APT", "NAV" etc
+       std::string _name;      // eg. "APT", "NAV" etc
        int _nSubPages;
        // _subpage is zero based
        int _subPage;   // The subpage gets remembered when other pages are displayed
@@ -97,18 +97,18 @@ protected:
        // Invert ID and display ENT in field 1
        bool _entInvert;
        
-       string _id;             // The ID of the waypoint that the page is displaying.
+       std::string _id;                // The ID of the waypoint that the page is displaying.
                                        // Doesn't make sense for all pages, but does for all the data pages.
                                        
-       void ShowScratchpadMessage(const string& line1, const string& line2);
+       void ShowScratchpadMessage(const std::string& line1, const std::string& line2);
                                        
        bool _scratchpadMsg;            // Set true when there is a scratchpad message to display
        double _scratchpadTimer;        // Used for displaying the scratchpad messages for the right amount of time.
-       string _scratchpadLine1;
-       string _scratchpadLine2;
+       std::string _scratchpadLine1;
+       std::string _scratchpadLine2;
        
        // TODO - remove this function from this class and use a built in method instead.
-       string GPSitoa(int n);
+       std::string GPSitoa(int n);
 };
 
 #endif // _KLN89_PAGE_HXX
index c60e0c0274f6c0618c70b66cf6a99793a6ea2781..685febcdbfef19993e6452fde3e8290943d83f1c 100644 (file)
@@ -25,6 +25,8 @@
 
 #include "kln89_page_alt.hxx"
 
+using std::string;
+
 KLN89AltPage::KLN89AltPage(KLN89* parent) 
 : KLN89Page(parent) {
        _nSubPages = 2;
index b091193ba62f9abdce3e245c16abd545ec8c51e8..b1e9d4d8415c522bd359591dfca9d5d29448061a 100644 (file)
@@ -29,7 +29,7 @@
 class FGRunway;
 
 struct AptFreq {
-       string service;
+       std::string service;
        unsigned short int freq;
 };
 
@@ -49,15 +49,15 @@ public:
        void Knob2Left1();
        void Knob2Right1();
        
-       void SetId(const string& s);
+       void SetId(const std::string& s);
        
 private:
        // Update the cached airport details
-       void UpdateAirport(const string& id);
+       void UpdateAirport(const std::string& id);
 
-       string _apt_id;
-       string _last_apt_id;
-       string _save_apt_id;
+       std::string _apt_id;
+       std::string _last_apt_id;
+       std::string _save_apt_id;
        const FGAirport* ap;
        
        vector<FGRunway*> _aptRwys;
index 4354ba1ea116ecc58936698a947d84e9b5d77c8e..5aac2b5e5ac4a1ccb2d2f3eede9d2552d52be7e1 100644 (file)
@@ -28,6 +28,8 @@
 #include <Main/fg_props.hxx>
 #include "kln89_page_cal.hxx"
 
+using std::string;
+
 KLN89CalPage::KLN89CalPage(KLN89* parent)
 : KLN89Page(parent) {
        _nSubPages = 8;
index 9b04ffb9b87ae1f25a74d6094452a96be28a2c20..db139f519326e1ef4d07b311d5fef3a1e85d59cf 100644 (file)
@@ -28,6 +28,8 @@
 #include "kln89_page_dir.hxx"
 #include <Main/fg_props.hxx>
 
+using std::string;
+
 KLN89DirPage::KLN89DirPage(KLN89* parent)
 : KLN89Page(parent) {
        _nSubPages = 1;
index 2f23d6276f0eea7ca9f2e8f698f19b7f9f381c7f..e4918c83f894eeeb5de6d45ed03593e5c1a48b3b 100644 (file)
@@ -34,7 +34,7 @@ public:
        
        void Update(double dt);
        
-       void SetId(const string& s);
+       void SetId(const std::string& s);
        
        void CrsrPressed();
        void ClrPressed();
index 770c7ab3707344862aba9a11f6dcd06771565d8a..e790973435a9fed3a8c07114317e487edd1f7161 100644 (file)
@@ -48,7 +48,7 @@ public:
        // Override the base class GetId function to return the waypoint ID under the cursor
        // on FPL0 page, if there is one and the cursor is on.
        // Otherwise return an empty string.
-       inline const string& GetId() { return(_fp0SelWpId); } 
+       inline const std::string& GetId() { return(_fp0SelWpId); } 
        
 private:
        int _fpMode;    // 0 = Dis, 1 = Dtk
@@ -56,7 +56,7 @@ private:
        
        bool _bEntWp;   // set true when a waypoint is being entered
        bool _bEntExp;  // Set true when ent is expected to set the currently entered waypoint as entered.
-       string _entWpStr;  // The currently entered wp ID (need not be valid) 
+       std::string _entWpStr;  // The currently entered wp ID (need not be valid) 
        GPSWaypoint* _entWp;    // Waypoint being currently entered
        
        // The position of the cursor in a waypoint being entered
@@ -83,9 +83,9 @@ private:
        void Calc();
        
        // The ID of the waypoint under the cursor in fpl0, if those conditions exist!
-       string _fp0SelWpId;
+       std::string _fp0SelWpId;
        
-       vector<string> _params;
+  std::vector<std::string> _params;
 };
 
 #endif // _KLN89_PAGE_FPL_HXX
index 4d5ff6923354c33f4ebf20d15dba5303783385bc..ac3ac25b9d97fb90b748d6093b7f9637c0221bf0 100644 (file)
@@ -29,6 +29,8 @@
 #include <Navaids/fix.hxx>
 #include <Navaids/navrecord.hxx>
 
+using std::string;
+
 KLN89IntPage::KLN89IntPage(KLN89* parent) 
 : KLN89Page(parent) {
        _nSubPages = 2;
index 8923db88669a3bda2b7b13fdeb2b47462f2dff2a..76ff0ee31172595b9a6ef584eb3417a6cecb830b 100644 (file)
@@ -42,12 +42,12 @@ public:
        void Knob2Left1();
        void Knob2Right1();
        
-       void SetId(const string& s);
+       void SetId(const std::string& s);
        
 private:
-       string _int_id;
-       string _last_int_id;
-       string _save_int_id;
+       std::string _int_id;
+       std::string _last_int_id;
+       std::string _save_int_id;
        const FGFix* _fp;
        FGNavRecord* _nearestVor;
        FGNavRecord* _refNav;   // Will usually be the same as _nearestVor, and gets reset to _nearestVor when page looses focus.
index f376c938444d420ad4813d674df8640e9042f311..6997a5cf1bf4744d4371ec44db527d6f7c3731ea 100644 (file)
@@ -28,6 +28,8 @@
 #include "kln89_page_nav.hxx"
 #include <Main/fg_props.hxx>
 
+using std::string;
+
 KLN89NavPage::KLN89NavPage(KLN89* parent) 
 : KLN89Page(parent) {
        _nSubPages = 4;
index 53ec9e5ee20b5bc98f8fad6c68df1c29e00f9463..aff3747d8ae8df8f70ab34ce371516e3fe4261b4 100644 (file)
@@ -42,7 +42,7 @@ public:
        void LooseFocus();
        
        // Returns the id string of the selected waypoint on NAV4 if valid, else returns an empty string.
-       string GetNav4WpId();
+       std::string GetNav4WpId();
        
 private:
        int _posFormat;         // 0 => lat,lon; 1 => ref to wp.
index c6ba4bb0eee145d0b967bdd181e678751ee25865..c621bba514d44176bfb593f4061f739af3665b5e 100644 (file)
@@ -28,6 +28,8 @@
 #include "kln89_page_ndb.hxx"
 #include <Navaids/navrecord.hxx>
 
+using std::string;
+
 KLN89NDBPage::KLN89NDBPage(KLN89* parent) 
 : KLN89Page(parent) {
        _nSubPages = 2;
index 191a8d1afa9e140a86fac24f29751a96b9a7099f..a4a5bb65224bad9c78bcb8ff7a7072efb4e8a3c6 100644 (file)
@@ -40,12 +40,12 @@ public:
        void Knob2Left1();
        void Knob2Right1();
        
-       void SetId(const string& s);
+       void SetId(const std::string& s);
        
 private:
-       string _ndb_id; 
-       string _last_ndb_id;
-       string _save_ndb_id;
+       std::string _ndb_id;    
+       std::string _last_ndb_id;
+       std::string _save_ndb_id;
        FGNavRecord* np;
 };
 
index 3caa76ce32d28188695f23619edad568cf74187e..2ab41a1d0372c3334069b0d0862c1b10c5ecd32e 100644 (file)
@@ -27,6 +27,8 @@
 
 #include "kln89_page_oth.hxx"
 
+using std::string;
+
 KLN89OthPage::KLN89OthPage(KLN89* parent)
 : KLN89Page(parent) {
        _nSubPages = 12;
index cbc70e669b836c460db359ed5d2ecf4feadfce76..0c6239c99b95163ffed05cc68b9c4ceae964fbf3 100644 (file)
@@ -28,6 +28,8 @@
 #include "kln89_page_vor.hxx"
 #include <Navaids/navrecord.hxx>
 
+using std::string;
+
 KLN89VorPage::KLN89VorPage(KLN89* parent) 
 : KLN89Page(parent) {
        _nSubPages = 2;
index f07fd82324d4a0aed03af44f32dd84d5608b923c..4ce12be292e3078360dbfe5836fec89cfa59b9ec 100644 (file)
@@ -40,12 +40,12 @@ public:
        void Knob2Left1();
        void Knob2Right1();
        
-       void SetId(const string& s);
+       void SetId(const std::string& s);
        
 private:
-       string _vor_id;
-       string _last_vor_id;
-       string _save_vor_id;
+       std::string _vor_id;
+       std::string _last_vor_id;
+       std::string _save_vor_id;
        FGNavRecord* np;
 };
 
index 1c8a73885508996efde3230a33e244cb9bee3fef..7f4b0f283eabad4731a91cf2bdd73e3ec5191cca 100644 (file)
@@ -62,7 +62,7 @@ public:
     virtual void update(double dt);
 
 protected:
-    string _name;
+    std::string _name;
     int _num;
     double _time;
     double _updateInterval;
@@ -110,7 +110,7 @@ private:
     
     void updateFont();
     
-    string _texture_path;
+    std::string _texture_path;
 
 
     float _scale;   // factor to convert nm to display units
index 5b1b1667d5a8cbd8e0a1007f5cbf6d76d47356e7..c8f36e4ff5ad77085e1fb67a538aa6bf880f6b23 100644 (file)
@@ -63,7 +63,7 @@ private:
     void search (double frequency, double longitude_rad,
                  double latitude_rad, double altitude_m);
 
-    string _name;
+    std::string _name;
     unsigned int _num;
 
     SGPropertyNode_ptr _longitude_node;
index 41e544c66704228c89c5da84fef7fb4bdbf08eae..26dd15a525167c1b63c2a25e12289c07a1443741 100644 (file)
@@ -45,7 +45,7 @@ public:
 private:
     void computeMach(double ias);
 
-    string _name;
+    std::string _name;
     unsigned int _num;
     string _total_pressure;
     string _static_pressure;
index e5baae64c81f360312f6417b2bef37746bb58139..a2ad87969bba47dbde20c93ee070e91e6b65a539 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 private:
 
-    string _name;
+    std::string _name;
     int _num;
     string _static_pressure;
     double _tau;
index 54e7f24fc7269f02c8d2e251808ebfd90c252b0b..ca93cd15ae347d22af9e590c347812925ef27194 100644 (file)
@@ -18,6 +18,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
 
+using std::string;
 
 AttitudeIndicator::AttitudeIndicator ( SGPropertyNode *node )
     :
index fe278ddc0d859b1f176e412b811390f1d8eafbeb..4bdc48b90c51a9452f895e3dabad25bd2945a65c 100644 (file)
@@ -51,9 +51,9 @@ public:
 
 private:
 
-    string _name;
+    std::string _name;
     int _num;
-    string _suction;
+    std::string _suction;
 
     Gyro _gyro;
 
index 5d581e6f42de05cbb51174692a1a55d5d82bc413..86343cb47ebf0775cd52194365f8db62c88a3de2 100644 (file)
@@ -37,7 +37,7 @@ Clock::~Clock ()
 void
 Clock::init ()
 {
-    string branch;
+    std::string branch;
     branch = "/instrumentation/" + _name;
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
index 307fe469e4038b9304d43f109d541b56bc1edd7c..f4fcba84641a48d1e85fa79fb1ba6ee61ab26888 100644 (file)
@@ -35,7 +35,7 @@ public:
     virtual void update(double dt);
 
 private:
-    string _name;
+    std::string _name;
     unsigned int _num;
 
     bool _is_serviceable;
index e2b2ee269df6426d497bc2b7d39251a036740276..be3469aafc1f27dfd2119f29df2fe69d0c6c3648 100644 (file)
@@ -68,7 +68,7 @@ enum GPSAppWpType {
     GPS_APP_NONE    // Not part of the approach sequence - the default.
 };
 
-ostream& operator << (ostream& os, GPSAppWpType type);
+std::ostream& operator << (std::ostream& os, GPSAppWpType type);
 
 struct GPSWaypoint {
     GPSWaypoint();
@@ -78,23 +78,23 @@ struct GPSWaypoint {
   static GPSWaypoint* createFromPositioned(const FGPositioned* aFix);
   
     ~GPSWaypoint();
-       string GetAprId();      // Returns the id with i, f, m or h added if appropriate. (Initial approach fix, final approach fix, etc)
-       string id;
+  std::string GetAprId();      // Returns the id with i, f, m or h added if appropriate. (Initial approach fix, final approach fix, etc)
+  std::string id;
        float lat;      // Radians
        float lon;      // Radians
        GPSWpType type;
        GPSAppWpType appType;   // only used for waypoints that are part of an approach sequence
 };
 
-typedef vector < GPSWaypoint* > gps_waypoint_array;
+typedef std::vector < GPSWaypoint* > gps_waypoint_array;
 typedef gps_waypoint_array::iterator gps_waypoint_array_iterator;
-typedef map < string, gps_waypoint_array > gps_waypoint_map;
+typedef std::map < std::string, gps_waypoint_array > gps_waypoint_map;
 typedef gps_waypoint_map::iterator gps_waypoint_map_iterator;
 typedef gps_waypoint_map::const_iterator gps_waypoint_map_const_iterator;
 
 class GPSFlightPlan {
 public:
-       vector<GPSWaypoint*> waypoints;
+  std::vector<GPSWaypoint*> waypoints;
        inline bool IsEmpty() { return(waypoints.size() == 0); }
 };
 
@@ -106,10 +106,10 @@ public:
        virtual ~FGIAP() = 0;
 //protected:
 
-       string _aptIdent;       // The ident of the airport this approach is for
-       string _ident;  // The approach ident.
-       string _name;   // The full approach name.
-       string _rwyStr; // The string used to specify the rwy - eg "B" in this instance.
+       std::string _aptIdent;  // The ident of the airport this approach is for
+       std::string _ident;     // The approach ident.
+       std::string _name;      // The full approach name.
+       std::string _rwyStr;    // The string used to specify the rwy - eg "B" in this instance.
        bool _precision;        // True for precision approach, false for non-precision.
 };
 
@@ -120,14 +120,14 @@ public:
        ~FGNPIAP();
 //private:
 public:
-       vector<GPSFlightPlan*> _approachRoutes; // The approach route(s) from the IAF(s) to the IF.
+       std::vector<GPSFlightPlan*> _approachRoutes;    // The approach route(s) from the IAF(s) to the IF.
                                                                                        // NOTE: It is an assumption in the code that uses this that there is a unique IAF per approach route.
-       vector<GPSWaypoint*> _IAP;      // The compulsory waypoints of the approach procedure (may duplicate one of the above).
+       std::vector<GPSWaypoint*> _IAP; // The compulsory waypoints of the approach procedure (may duplicate one of the above).
                                                                // _IAP includes the FAF and MAF, and the missed approach waypoints.
 };
 
-typedef vector < FGIAP* > iap_list_type;
-typedef map < string, iap_list_type > iap_map_type;
+typedef std::vector < FGIAP* > iap_list_type;
+typedef std::map < std::string, iap_list_type > iap_map_type;
 typedef iap_map_type::iterator iap_map_iterator;
 
 //     A class to encapsulate hr:min representation of time. 
@@ -157,7 +157,7 @@ public:
         ClockTime t2(diff / 60, diff % 60);
         return(t2);
     }
-    friend ostream& operator<< (ostream& out, const ClockTime& t);
+    friend std::ostream& operator<< (std::ostream& out, const ClockTime& t);
 
 private:
     int _hr;
@@ -181,12 +181,12 @@ public:
        virtual void update(double dt);
        
        // Expand a SIAP ident to the full procedure name.
-       string ExpandSIAPIdent(const string& ident);
+       std::string ExpandSIAPIdent(const std::string& ident);
 
        // Render string s in display field field at position x, y
        // WHERE POSITION IS IN CHARACTER UNITS!
        // zero y at bottom?
-       virtual void DrawText(const string& s, int field, int px, int py, bool bold = false);
+       virtual void DrawText(const std::string& s, int field, int px, int py, bool bold = false);
        
        // Render a char at a given position as above
        virtual void DrawChar(char c, int field, int px, int py, bool bold = false);
@@ -214,7 +214,7 @@ public:
        // Returns -1 if no active waypoint.
        int GetActiveWaypointIndex();
        // Ditto for an arbitrary waypoint id
-       int GetWaypointIndex(const string& id);
+       int GetWaypointIndex(const std::string& id);
        
        // Returns meters
        float GetDistToActiveWaypoint();
@@ -232,7 +232,7 @@ public:
        // returns -1 if groundspeed is less than 30kts.
        // If the waypoint is an unreached part of the active flight plan the time will be via each leg.
        // otherwise it will be a direct-to time.
-       double GetTimeToWaypoint(const string& id);
+       double GetTimeToWaypoint(const std::string& id);
        
        // Return true if waypoint alerting is occuring
        inline bool GetWaypointAlert() const { return(_waypointAlert); }
@@ -253,7 +253,7 @@ public:
        inline bool GetToFlag() const { return(_headingBugTo); }
        
        // Initiate Direct To operation to the supplied ID.
-       virtual void DtoInitiate(const string& id);
+       virtual void DtoInitiate(const std::string& id);
        // Cancel Direct To operation
        void DtoCancel();
        
@@ -286,7 +286,7 @@ protected:
        // CDI full-scale deflection, specified either as an index into a vector of values (standard values) or as a double precision float (intermediate values).
        // This will influence how an externally driven CDI will display as well as the NAV1 page.
        // Hence the variables are located here, not in the nav page class.
-       vector<float> _cdiScales;
+       std::vector<float> _cdiScales;
        unsigned int _currentCdiScaleIndex;
        bool _cdiScaleTransition;               // Set true when the floating CDI value is used during transitions
        double _currentCdiScale;        // The floating value to use.
@@ -305,13 +305,13 @@ protected:
        void LoadApproachData();
 
        // Find first of any type of waypoint by id.  (TODO - Possibly we should return multiple waypoints here).
-       GPSWaypoint* FindFirstById(const string& id) const;
-       GPSWaypoint* FindFirstByExactId(const string& id) const;
+       GPSWaypoint* FindFirstById(const std::string& id) const;
+       GPSWaypoint* FindFirstByExactId(const std::string& id) const;
    
-       FGNavRecord* FindFirstVorById(const string& id, bool &multi, bool exact = false);
-       FGNavRecord* FindFirstNDBById(const string& id, bool &multi, bool exact = false);
-       const FGAirport* FindFirstAptById(const string& id, bool &multi, bool exact = false);
-       const FGFix* FindFirstIntById(const string& id, bool &multi, bool exact = false);
+       FGNavRecord* FindFirstVorById(const std::string& id, bool &multi, bool exact = false);
+       FGNavRecord* FindFirstNDBById(const std::string& id, bool &multi, bool exact = false);
+       const FGAirport* FindFirstAptById(const std::string& id, bool &multi, bool exact = false);
+       const FGFix* FindFirstIntById(const std::string& id, bool &multi, bool exact = false);
        // Find the closest VOR to a position in RADIANS.
        FGNavRecord* FindClosestVor(double lat_rad, double lon_rad);
 
@@ -388,7 +388,7 @@ protected:
        // Flightplans
        // GPS can have up to _maxFlightPlans flightplans stored, PLUS an active FP which may or my not be one of the stored ones.
        // This is from KLN89, but is probably not far off the mark for most if not all GPS.
-       vector<GPSFlightPlan*> _flightPlans;
+       std::vector<GPSFlightPlan*> _flightPlans;
        unsigned int _maxFlightPlans;
        GPSFlightPlan* _activeFP;
        
@@ -414,7 +414,7 @@ protected:
        bool _headingBugTo;             // Set true when the heading bug is TO, false when FROM.
        bool _waypointAlert;    // Set true when waypoint alerting is happening. (This is a variable NOT a user-setting).
        bool _departed;         // Set when groundspeed first exceeds 30kts.
-       string _departureTimeString;    // Ditto.
+       std::string _departureTimeString;       // Ditto.
        double _elapsedTime;    // Elapsed time in seconds since departure
        ClockTime _powerOnTime;         // Time (hr:min) of unit power-up.
        bool _powerOnTimerSet;          // Indicates that we have set the above following power-up.
@@ -437,9 +437,9 @@ protected:
        // Magvar stuff.  Might get some of this stuff (such as time) from FG in future.
        SGTime* _time;
        
-       list<string> _messageStack;
+  std::list<std::string> _messageStack;
        
-       virtual void CreateFlightPlan(GPSFlightPlan* fp, vector<string> ids, vector<GPSWpType> wps);
+       virtual void CreateFlightPlan(GPSFlightPlan* fp, std::vector<std::string> ids, std::vector<GPSWpType> wps);
        
        // Orientate the GPS unit to a flightplan - ie. figure out from current position
        // and possibly orientation which leg of the FP we are on.
@@ -460,10 +460,10 @@ protected:
                                                                // the scale change, but it's in the manual...
        bool _approachActive;   // Set true when in approach-active mode
        GPSFlightPlan* _approachFP;     // Current approach - not necessarily loaded.
-       string _approachID;             // ID of the airport we have an approach loaded for - bit of a hack that can hopefully be removed in future.
+       std::string _approachID;                // ID of the airport we have an approach loaded for - bit of a hack that can hopefully be removed in future.
        // More hackery since we aren't actually storing an approach class... Doh!
-       string _approachAbbrev;
-       string _approachRwyStr;
+       std::string _approachAbbrev;
+       std::string _approachRwyStr;
 };
 
 #endif  // _DCLGPS_HXX
index 6ec6edc6396dbec5e7fda958cd68cb5e64be1c9c..084fd8207569fc5e770258116112ee873d444ddd 100644 (file)
@@ -61,7 +61,7 @@ private:
 
     FGNavRecord * _navrecord;
 
-    string _name;
+    std::string _name;
     int _num;
 
     class AudioIdent * _audioIdent;
index acf11412d4cb50df3d1b769e080df5c96920a31e..7a5e45481c9a1eef4727dcfed7e5acca2b9181ad 100644 (file)
@@ -49,7 +49,7 @@ GSDI::~GSDI()
 
 void GSDI::init()
 {
-       string branch;
+  std::string branch;
        branch = "/instrumentation/" + _name;
        SGPropertyNode *n = fgGetNode(branch.c_str(), _num, true);
        _serviceableN = n->getNode("serviceable", true);
index 2fc8e2966441ba895bf4ff563cc32771be293a18..0d8ef2e368c9431ba57411b346d07d745e73c6ff 100644 (file)
@@ -51,7 +51,7 @@ public:
        virtual void update(double dt);
 
 private:
-       string _name;
+  std::string _name;
        unsigned int _num;
 
        SGPropertyNode_ptr _serviceableN;
index 53046480a5e1826155730e6d2f358f56c923cfc4..f7899b7bcb90294e76ee5bdd7351c885380adc3a 100644 (file)
@@ -29,7 +29,7 @@ HeadingIndicator::~HeadingIndicator ()
 void
 HeadingIndicator::init ()
 {
-    string branch;
+    std::string branch;
     branch = "/instrumentation/" + _name;
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
@@ -47,7 +47,7 @@ void
 HeadingIndicator::bind ()
 {
     std::ostringstream temp;
-    string branch;
+    std::string branch;
     temp << _num;
     branch = "/instrumentation/" + _name + "[" + temp.str() + "]";
 
@@ -61,7 +61,7 @@ void
 HeadingIndicator::unbind ()
 {
     std::ostringstream temp;
-    string branch;
+    std::string branch;
     temp << _num;
     branch = "/instrumentation/" + _name + "[" + temp.str() + "]";
 
index f3d6f5f155cb83c3a8f0851676ef228a7cef9824..ecd06fb1848dc6ebf1a9f3eb792c5fe59a0c2565 100644 (file)
@@ -51,9 +51,9 @@ private:
     Gyro _gyro;
     double _last_heading_deg;
 
-    string _name;
+    std::string _name;
     int _num;
-    string _suction;
+    std::string _suction;
 
     SGPropertyNode_ptr _offset_node;
     SGPropertyNode_ptr _heading_in_node;
index 0c4864912670168d9d8c3678b39e3f4bdb2f3efa..d44e0b036f283fccd6a0e3c514168bf5acb23738 100644 (file)
@@ -25,8 +25,8 @@ HeadingIndicatorDG::HeadingIndicatorDG ( SGPropertyNode *node ) :
     int i;
     for ( i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);
-        string cname = child->getName();
-        string cval = child->getStringValue();
+        std::string cname = child->getName();
+        std::string cval = child->getStringValue();
         if ( cname == "name" ) {
             name = cval;
         } else if ( cname == "number" ) {
@@ -51,7 +51,7 @@ HeadingIndicatorDG::~HeadingIndicatorDG ()
 void
 HeadingIndicatorDG::init ()
 {
-    string branch;
+    std::string branch;
     branch = "/instrumentation/" + name;
 
     _heading_in_node = fgGetNode("/orientation/heading-deg", true);
@@ -81,7 +81,7 @@ void
 HeadingIndicatorDG::bind ()
 {
     std::ostringstream temp;
-    string branch;
+    std::string branch;
     temp << num;
     branch = "/instrumentation/" + name + "[" + temp.str() + "]";
 
@@ -95,7 +95,7 @@ void
 HeadingIndicatorDG::unbind ()
 {
     std::ostringstream temp;
-    string branch;
+    std::string branch;
     temp << num;
     branch = "/instrumentation/" + name + "[" + temp.str() + "]";
 
index d016ca45b8bf4704a1c0acdc9259d7822ec6915a..f5035b15934b2515ccfeda4e26a21660f9aa77b9 100644 (file)
@@ -49,7 +49,7 @@ private:
     Gyro _gyro;\r
     double _last_heading_deg;\r
 \r
-    string name;\r
+    std::string name;\r
     int num;\r
     //string vacuum_system;\r
 \r
index 960bd98ab55570157b1b706c308a25dba3615f17..ba70da198709502ec52caba3d42b77765f5cde14 100644 (file)
@@ -14,6 +14,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>                           
 
+using std::string;
 
 HeadingIndicatorFG::HeadingIndicatorFG ( SGPropertyNode *node )
     :
index bb42824915c6b35fa307df6ea15c71481d68238a..cb31470d9adc62e16d8b8ad8f36f450bbfc3d816 100644 (file)
@@ -51,7 +51,7 @@ private:
     Gyro _gyro;
     double _last_heading_deg;
 
-    string name;
+    std::string name;
     int num;
     
     SGPropertyNode_ptr _offset_node;
index fd588f359237bc579e1ea2a7be8aad390da106a0..18e818604e80e19aa57d7731c7d033e53006270c 100644 (file)
@@ -62,7 +62,7 @@ public:
 
 private:
 
-    string _name;
+    std::string _name;
     int _num;
 
     double _internal_pressure_inhg;
index 83b8f6bcfe760818e2259667f48dfe0eb1b34070..5f32b1f5af7bfc6288da4223564b64ece403785b 100644 (file)
@@ -43,8 +43,8 @@ class FGKR_87 : public SGSubsystem
     bool need_update;
 
     // internal values
-    string ident;
-    string trans_ident;
+    std::string ident;
+    std::string trans_ident;
     bool valid;
     bool inrange;
     double stn_lon;
@@ -115,7 +115,7 @@ public:
     void search ();
 
     // internal values
-    inline const string& get_ident() const { return ident; }
+    inline const std::string& get_ident() const { return ident; }
     inline bool get_valid() const { return valid; }
     inline bool get_inrange() const { return inrange; }
     inline double get_stn_lon() const { return stn_lon; }
index 1f57f0791923154a44fd9e98301f3ec08225a268..1477228e99f3665755e8b93c0aba90cb9f571686 100644 (file)
@@ -32,7 +32,7 @@ MagCompass::~MagCompass ()
 void
 MagCompass::init ()
 {
-    string branch;
+    std::string branch;
     branch = "/instrumentation/" + _name;
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
index 919f26bc93269ab36402e0cc1e65bd27f73f8ffb..474babdafa0f26ddcdeb33a708bbe49831d6f000 100644 (file)
@@ -51,7 +51,7 @@ private:
     double _error_deg;
     double _rate_degps;
 
-    string _name;
+    std::string _name;
     int _num;
 
     SGPropertyNode_ptr _serviceable_node;
index 365447b45a99f45ce519b321d5c156d45ad6d56c..8146cd1f9747c82a31113a0978ef93f41c8ea781 100644 (file)
@@ -22,6 +22,8 @@
 
 const double MasterReferenceGyro::gravity = -32.1740485564;
 
+using std::string;
+
 MasterReferenceGyro::MasterReferenceGyro ( SGPropertyNode *node ) :
 _name(node->getStringValue("name", "master-reference-gyro")),
 _num(node->getIntValue("number", 0))
index b925353a5aa6737a22042ac3b81e8efe27f0997a..25be4d8e6923b8b454c577ce5b94c51650adcf71 100644 (file)
@@ -51,7 +51,7 @@ private:
 
     static const double gravity; //conversion factor
 
-    string _name;
+    std::string _name;
     int _num;
 
     double _last_roll;
index 51877284561a14126abecf3d219100eaa5ec6d33..54c2e531edd175f222a6325e4e65f3fd657a9dda 100644 (file)
@@ -137,7 +137,7 @@ class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener
     double xrate_ms;
     double _localizerWidth; // cached localizer width in degrees
     
-    string _name;
+    std::string _name;
     int _num;
 
     // internal periodic station search timer
index 9468e3f4da3e211f26eecc3584e365c9b59386d8..202fd24724fe431973a03012266e054c707a5edf 100755 (executable)
@@ -808,7 +808,7 @@ public:
   void valueChanged (SGPropertyNode * prop)
   {
     // format as fixed decimal "nnn.nn"
-    ostringstream buf;
+    std::ostringstream buf;
     buf << std::fixed 
         << std::setw(5) 
         << std::setfill('0') 
@@ -922,7 +922,7 @@ void NavRadioImpl::update( double dt )
   try {
     position = globals->get_aircraft_position();
   }
-  catch( exception & ) {
+  catch( std::exception & ) {
     return;
   }
 
index 4925e1fa94ca7b363c96295af9871ea410c1c41d..2ee3bb12c0cfba29e787ef73dc3621ff67fae998 100644 (file)
@@ -7,6 +7,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
 
+using std::string;
 
 SlipSkidBall::SlipSkidBall ( SGPropertyNode *node)
     :
index 3a95b115a6c0b679a071380cd51233744d217f71..1dc1c8916b6e492841f47b48605524e3ca9d9719 100644 (file)
@@ -43,7 +43,7 @@ private:
 
     double _last_pos;
 
-    string _name;
+    std::string _name;
     int _num;
 
     SGPropertyNode_ptr _serviceable_node;
index b17c8bb346386e06a01cc995085621808b966d48..21fc2f4935640adf69c70918ee43fe18efed5922 100644 (file)
@@ -18,7 +18,7 @@
 #include "tacan.hxx"
 
 using std::vector;
-
+using std::string;
 
 /**
  * Adjust the range.
index 7c8873aed438ffd2dc0fec3ab60b6144eb002b11..083efa665042b6fbf2d1081a88ce3acdcde9b653 100644 (file)
@@ -46,10 +46,10 @@ private:
 
     void search (double frequency, double longitude_rad,
                  double latitude_rad, double altitude_m);
-    double searchChannel (const string& channel);
+  double searchChannel (const std::string& channel);
     void valueChanged (SGPropertyNode *);
 
-    string _name;
+    std::string _name;
     unsigned int _num;
 
     SGPropertyNode_ptr _longitude_node;
@@ -85,7 +85,7 @@ private:
     SGPropertyNode_ptr _mp_callsign_node;              // FIXME
 
     bool _new_frequency;
-    string _channel;
+    std::string _channel;
     double _last_distance_nm;
     double _frequency_mhz;
     double _time_before_search_sec;
@@ -98,16 +98,16 @@ private:
     double _transmitter_range_nm;
     double _transmitter_bearing_deg;
     double _transmitter_bias;
-    string _transmitter_name;
-    string _transmitter_ident;
+    std::string _transmitter_name;
+    std::string _transmitter_ident;
 
     double _mobile_lat, _mobile_lon;
     double _mobile_elevation_ft;
     double _mobile_range_nm;
     double _mobile_bearing_deg;
     double _mobile_bias;
-    string _mobile_name;
-    string _mobile_ident;
+    std::string _mobile_name;
+    std::string _mobile_ident;
 
     int _listener_active;
 };
index 9fa5f13a34cc76d180357f6a407816225dc10839..01b34b6620ac12796625ec4710b93b5f38af7f65 100644 (file)
@@ -24,6 +24,8 @@
 
 #include "transponder.hxx"
 
+using std::string;
+
 Transponder::Transponder(SGPropertyNode *node)
     :
     _name(node->getStringValue("name", "transponder")),
index f0a58efd22b08e4722e11deabed63699184818a8..d41514e0849aee90f4712bd7768866872d9c9f6e 100644 (file)
@@ -50,9 +50,9 @@ private:
     SGPropertyNode_ptr flightLevelNode;
 
     // Internal
-    string _name;
+    std::string _name;
     int _num;
-    string _mode_c_altitude;
+    std::string _mode_c_altitude;
 };
 
 #endif // TRANSPONDER_HXX
index 973b4054aad99d6f46df5edf915ace15cf5f8536..25df4de4e71f6f5d67bdb4213d03ea506db8068c 100644 (file)
@@ -12,6 +12,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
 
+using std::string;
 
 // Use a bigger number to be more responsive, or a smaller number
 // to be more sluggish.
index b96873081b49ae6ebc2375ebe99c6fba89860972..04a8e6fcb10132a5d1968265629d42d5148aada3 100644 (file)
@@ -53,7 +53,7 @@ private:
     Gyro _gyro;
     double _last_rate;
 
-    string _name;
+    std::string _name;
     int _num;
 
     SGPropertyNode_ptr _roll_rate_node;
index e062db010087e8f3a646a5282c750a99d0999967..1ad62253b61a29ffff7d6aec4b940ef5a6e44ffe 100644 (file)
@@ -9,6 +9,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
 
+using std::string;
 
 VerticalSpeedIndicator::VerticalSpeedIndicator ( SGPropertyNode *node )
     : _internal_pressure_inhg(29.92),
index d40aa5693c7f6ede52ae2ce8a101a07d3c8e6872..56b4f0e18366a594f2c9eec5d3cc67798680bf30 100644 (file)
@@ -42,9 +42,9 @@ private:
 
     double _internal_pressure_inhg;
 
-    string _name;
+    std::string _name;
     int _num;
-    string _static_pressure;
+    std::string _static_pressure;
 
     SGPropertyNode_ptr _serviceable_node;
     SGPropertyNode_ptr _pressure_node;
index acbd1b6cfebf0c11afe378d1ed2aafd758df262f..d167f78d5719f097e6a7fedec8485e8dcabac463 100644 (file)
 
 #include <sstream>
 #include <iomanip>
+
 using std::stringstream;
 using std::endl;
 using std::setprecision;
 using std::fixed;
 using std::setw;
 using std::setfill;
+using std::string;
 
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
index 2b696430a7f8baf65d5f59ec8d8df3c5f3585dd1..639302bdc61ea94bb55dd06ec44ecd45e23658f9 100644 (file)
@@ -51,7 +51,7 @@ public:
     virtual void valueChanged(SGPropertyNode *);
 
 protected:
-    string _name;
+    std::string _name;
     int _num;
     double _time;
     double _interval;
@@ -90,7 +90,7 @@ protected:
     SGPropertyNode *getInstrumentNode(const char *name, DefaultType value);
 
 private:
-    string _texture_path;
+    std::string _texture_path;
 
     typedef enum { ARC, MAP, PLAN, ROSE, BSCAN} DisplayMode;
     DisplayMode _display_mode;
index 8f2e95f0f081def7f4caba1078a69718c8e52270..d4d7ef1c83ae3e15eb5ec6fc30eb5e79bbd552b8 100644 (file)
@@ -420,7 +420,7 @@ extern const char * fgGetString (const char * name,
  * @return The property's value as a string, or the default value provided.
  */
 inline const char * fgGetString (const std::string & name,
-                                const std::string & defaultValue = string(""))
+                                 const std::string & defaultValue = std::string(""))
 {
     return fgGetString( name.c_str(), defaultValue.c_str() );
 }
index c49904fa9e5da932b28e96ca20fa8485e2a730e0..31f0a59c7d54c6473c847fa8eb0bd05ab7902f2c 100644 (file)
@@ -38,7 +38,7 @@ FGLogger::init ()
   if (logging == 0)
     return;
 
-  vector<SGPropertyNode_ptr> children = logging->getChildren("log");
+  std::vector<SGPropertyNode_ptr> children = logging->getChildren("log");
   for (unsigned int i = 0; i < children.size(); i++) {
 
     SGPropertyNode * child = children[i];
@@ -64,7 +64,7 @@ FGLogger::init ()
     log.interval_ms = child->getLongValue("interval-ms");
     log.last_time_ms = globals->get_sim_time_sec() * 1000;
     log.delimiter = delimiter.c_str()[0];
-    log.output = new ofstream(filename.c_str());
+    log.output = new std::ofstream(filename.c_str());
     if (!log.output) {
       SG_LOG(SG_GENERAL, SG_ALERT, "Cannot write log to " << filename);
       continue;
index 1db151ad9059b58027160e00517f9e1138c18d66..75b0c448139e4235e58ed4876a27d5c421207fd5 100644 (file)
@@ -587,7 +587,7 @@ int fgMainInit( int argc, char **argv ) {
 #endif
     SG_LOG( SG_GENERAL, SG_INFO, "FlightGear:  Version "
             << version );
-    SG_LOG( SG_GENERAL, SG_INFO, "Built with " << SG_COMPILER_STR << endl );
+  SG_LOG( SG_GENERAL, SG_INFO, "Built with " << SG_COMPILER_STR << std::endl );
 
     // Allocate global data structures.  This needs to happen before
     // we parse command line options
index a21064cabadba863f19fe85cc87d02b5cce791e4..5708c72e159fa1acd6d3d4e4b96e8f38a98ad6e2 100644 (file)
@@ -146,8 +146,8 @@ public:
 
 char *genNameString()
 {
-    string website = "http://www.flightgear.org";
-    string programName = "FlightGear";
+    std::string website = "http://www.flightgear.org";
+    std::string programName = "FlightGear";
     char *name = new char[26];
     name[20] = 114;
     name[8] = 119;
index 2cd15b5b008a7fa9e10d339a7c17f7eafb4acecf..9b5b3da8b148076cb969b2755dc6d8b8d71037ba 100644 (file)
 //
 // $Id$
 
-#ifdef HAVE_CONFIG_H\r
-#  include <config.h>\r
-#endif\r
-\r
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <simgear/compiler.h>
 
 #include <math.h>
@@ -28,7 +28,6 @@
 #include <cstdlib>
 
 #include <vector>
-using std::vector;
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/SGLimits.hxx>
@@ -43,6 +42,8 @@ using std::vector;
 #include "osgDB/Registry"
 #endif
 
+using std::vector;
+
 // Originally written by Alex Perry.
 double
 fgGetLowPass (double current, double target, double timeratio)
@@ -71,10 +72,10 @@ fgGetLowPass (double current, double target, double timeratio)
 }
 
 
-string
+std::string
 fgUnescape (const char *s)
 {
-    string r;
+    std::string r;
     while (*s) {
         if (*s != '\\') {
             r += *s++;
index ea9fcd7a61d6eb09c4dcbba10238ac6912d3018a..bced660b5b3c274e9414583ce646ee611fd20782 100644 (file)
@@ -288,7 +288,7 @@ FGViewMgr::unbind ()
   fgUntie("/sim/current-view/viewer-y-m");
   fgUntie("/sim/current-view/viewer-z-m");
 
-  list<const char*>::const_iterator it;
+  std::list<const char*>::const_iterator it;
   for (it = tied_props.begin(); it != tied_props.end(); it++){
     fgUntie(*it);
   }
index 6461af11a90fdaad16b99e92ab235470d7610d67..4906f87f63be85aa77ea5ffc732daa835f1a9568 100644 (file)
@@ -76,7 +76,7 @@ public:
 private:
     void do_bind();
     
-    list<const char*> tied_props;
+    std::list<const char*> tied_props;
 
     double axis_long;
     double axis_lat;
@@ -140,7 +140,7 @@ private:
     
     bool inited;
     SGPropertyNode_ptr view_number;
-    vector<SGPropertyNode_ptr> config_list;
+    std::vector<SGPropertyNode_ptr> config_list;
     typedef std::vector<FGViewerPtr> viewer_list;
     viewer_list views;
     SGVec3d abs_viewer_position;
index b1a813d6173f61a4d9ddc1aaa901c9bd5eec24b7..36ccf9cdffa12335852bf9f16af6d0021b0cb245 100644 (file)
@@ -47,6 +47,7 @@
 #include <Main/fg_props.hxx>
 
 using std::string;
+using std::vector;
 
 typedef std::map<FGAirport*, SGPropertyNode_ptr> AirportPropertyMap;
 
index 2cd849b43573f774bd0872348dd479321f08aadb..f73ca6a3fd7193303c31649554dea0a70e4d8369 100644 (file)
@@ -49,7 +49,7 @@
 #include "ATC-Inputs.hxx"
 
 using std::string;
-
+using std::vector;
 
 
 // Constructor: The _board parameter specifies which board to
index bdaf70936f40313a5ffa1158357c7f007ad65e55..546f03ebee04cb92afac573f1c61903cb4bd13b6 100644 (file)
@@ -54,7 +54,9 @@
 #include "ATC-Main.hxx"
 
 using std::string;
-
+using std::cout;
+using std::endl;
+using std::vector;
 
 // Lock the ATC hardware
 static int fgATCMainLock( int fd ) {
index 190e952da891b638891d456d10f7c799854a795d..5d7821307587f6aeb03019837d4ab1276cf8b669 100644 (file)
@@ -209,7 +209,7 @@ void FGTileMgr::schedule_needed(const SGBucket& curr_bucket, double vis)
     // cout << "tile width = " << tile_width << "  tile_height = "
     //      << tile_height << endl;
 
-    double tileRangeM = min(vis,_maxTileRangeM->getDoubleValue());
+    double tileRangeM = std::min(vis,_maxTileRangeM->getDoubleValue());
     xrange = (int)(tileRangeM / tile_width) + 1;
     yrange = (int)(tileRangeM / tile_height) + 1;
     if ( xrange < 1 ) { xrange = 1; }
index 2c6648182e4a1714cac8f28216e43ffd337e86ec..87d1f1347872401f042d1689184d54548c24a56f 100644 (file)
@@ -117,7 +117,7 @@ public:
     bool schedule_scenery(const SGGeod& position, double range_m, double duration=0.0);
 
     // Load a model for a tile
-    osg::Node* loadTileModel(const string& modelPath, bool cacheModel);
+    osg::Node* loadTileModel(const std::string& modelPath, bool cacheModel);
 
     // Returns true if tiles around current view position have been loaded
     bool isSceneryLoaded();
index df85e1a986799d793a8bc28af500f7d67bdcd8c1..bcdecf8cf2c193ade4f24c26a09019b798074ff4 100644 (file)
@@ -28,6 +28,7 @@
 
 #define VOICE "/sim/sound/voices"
 
+using std::string;
 
 /// MANAGER ///
 
@@ -67,7 +68,7 @@ void FGVoiceMgr::init()
        try {
                for (unsigned int i = 0; i < voices.size(); i++)
                        _voices.push_back(new FGVoice(this, voices[i]));
-       } catch (const string& s) {
+       } catch (const std::string& s) {
                SG_LOG(SG_SOUND, SG_ALERT, "VOICE: " << s);
        }
 
index 39dae579ac1cac98f792c2416e92729923468f86..4bde11d1e931507ec43705dd60c2c3ee1d9ac052 100644 (file)
@@ -44,7 +44,6 @@
 #  include <simgear/threads/SGQueue.hxx>
 #else
 #  include <queue>
-   using std::queue;
 #endif // ENABLE_THREADS
 
 using std::vector;
@@ -66,12 +65,12 @@ private:
        FGVoiceThread *_thread;
 #endif
 
-       string _host;
-       string _port;
+  std::string _host;
+  std::string _port;
        bool _enabled;
        SGPropertyNode_ptr _pausedNode;
        bool _paused;
-       vector<FGVoice *> _voices;
+  std::vector<FGVoice *> _voices;
 };
 
 
@@ -102,7 +101,7 @@ public:
        void setVolume(double);
        void setPitch(double);
        void setSpeed(double);
-       void pushMessage(string);
+       void pushMessage(std::string);
 
 private:
        class FGVoiceListener;
@@ -117,9 +116,9 @@ private:
        FGVoiceMgr *_mgr;
 
 #if defined(ENABLE_THREADS)
-       SGLockedQueue<string> _msg;
+       SGLockedQueue<std::string> _msg;
 #else
-       queue<string> _msg;
+  std::queue<std::string> _msg;
 #endif
 
 };
index 9d97dee40a307f561b3938d39a000e82cd20ce21..1549c9eda5bf507af172f548d6cdeafe5abb475d 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 private:
 
-    string _name;
+    std::string _name;
     int _num;
     SGPropertyNode_ptr _serviceable_node;
     SGPropertyNode_ptr _pressure_node;
index d3cbbbf361d7090053355cdb91603f607179bd7d..b9b649e1e239839b4ba3abdd8895ef6e88e4b0f3 100644 (file)
@@ -4,6 +4,9 @@
 // This file is in the Public Domain and comes with no warranty.
 
 #include "static.hxx"
+
+#include <string>
+
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
 
@@ -24,8 +27,7 @@ StaticSystem::~StaticSystem ()
 void
 StaticSystem::init ()
 {
-    string branch;
-    branch = "/systems/" + _name;
+    std::string branch = "/systems/" + _name;
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
     _serviceable_node = node->getChild("serviceable", 0, true);
index d62ff7f330ef3cb376806902fb170a4bea80c4e9..b4853d1ea26f405151027606e750605a74738ce0 100644 (file)
@@ -46,7 +46,7 @@ public:
 
 private:
 
-    string _name;
+    std::string _name;
     int _num;
     double _tau;
     SGPropertyNode_ptr _serviceable_node;
index a776d9a493d246a36561c57356a784fb1775fdc5..b7f91e0ec29dd2f8dbb2aced1c4bb1cb78b4f1b6 100644 (file)
@@ -35,7 +35,7 @@ void
 VacuumSystem::init()
 {
     unsigned int i;
-    string branch;
+    std::string branch;
     branch = "/systems/" + _name;
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
index fd69135963801ccba8c4f69035e78a5abb780c83..3b47132699f8b0fea6d8372690bece43352db515 100644 (file)
@@ -49,12 +49,12 @@ public:
 
 private:
 
-    string _name;
+    std::string _name;
     int _num;
     string_list _rpms;
     double _scale;
     SGPropertyNode_ptr _serviceable_node;
-    vector<SGPropertyNode_ptr> _rpm_nodes;
+    std::vector<SGPropertyNode_ptr> _rpm_nodes;
     SGPropertyNode_ptr _pressure_node;
     SGPropertyNode_ptr _suction_node;
     
index 856ee7599964b104883f4b5e0b5a5a557c0eadc1..52b385e378fd3662f2da9cd3a3f069520e4bdd23 100644 (file)
@@ -41,6 +41,8 @@
 #include <Main/globals.hxx>
 #include <Time/sunsolver.hxx>
 
+using std::string;
+
 static bool do_timeofday (const SGPropertyNode * arg)
 {
     const string &offset_type = arg->getStringValue("timeofday", "noon");
index b23bf947f44ef7a0befc36647da1eef00464caae..710b0c2de490ee488ee2bc672cacfa070cd43e5c 100644 (file)
@@ -23,7 +23,7 @@
 #include <simgear/io/iochannel.hxx>
 class PropertySetter;
 
-typedef vector<PropertySetter*> PropertySetterVector;
+typedef std::vector<PropertySetter*> PropertySetterVector;
 class FGPanelProtocol : public SGSubsystem {
 public:
   FGPanelProtocol( SGPropertyNode_ptr root );