]> git.mxchange.org Git - flightgear.git/commitdiff
header cleanups
authorehofman <ehofman>
Thu, 31 Jul 2008 12:04:32 +0000 (12:04 +0000)
committerehofman <ehofman>
Thu, 31 Jul 2008 12:04:32 +0000 (12:04 +0000)
24 files changed:
src/AIModel/AIFlightPlan.cxx
src/AIModel/AIManager.cxx
src/AIModel/submodel.cxx
src/ATCDCL/ATCDialog.cxx
src/Autopilot/xmlauto.cxx
src/Cockpit/hud.cxx
src/Environment/fgclouds.cxx
src/GUI/new_gui.cxx
src/Input/fgjs.cxx
src/Main/fg_commands.cxx
src/Main/fg_props.cxx
src/Main/fg_props.hxx
src/Main/globals.cxx
src/Main/globals.hxx
src/Main/logger.cxx
src/Main/logger.hxx
src/Main/main.cxx
src/Main/options.cxx
src/Network/ATC-Inputs.cxx
src/Network/ATC-Main.cxx
src/Network/ATC-Outputs.cxx
src/Scripting/NasalSys.cxx
src/Systems/electrical.cxx
src/Systems/system_mgr.cxx

index abb49de4389db587d117ed083e7d88afc573999b..6f3f3dc41d0f0378515c4f3454873bab31e712a0 100644 (file)
@@ -27,6 +27,8 @@
 #include <simgear/structure/exception.hxx>
 #include <simgear/constants.h>
 #include <simgear/props/props.hxx>
+#include <simgear/props/props_io.hxx>
+
 #include <Main/globals.hxx>
 #include <Main/fg_props.hxx>
 #include <Main/fg_init.hxx>
index 01bef48f21ac1ece71a9573d8b757eaf09812370..aac54ab9bfd6f31c5079f63a84d2f70192241f76 100644 (file)
@@ -18,6 +18,9 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
+#include <simgear/math/sg_geodesy.hxx>
+#include <simgear/props/props_io.hxx>
+
 #include <Main/globals.hxx>
 
 #include <Airports/simple.hxx>
@@ -35,9 +38,6 @@
 #include "AITanker.hxx"
 #include "AIWingman.hxx"
 
-#include <simgear/math/sg_geodesy.hxx>
-
-
 FGAIManager::FGAIManager() {
     _dt = 0.0;
     mNumAiModels = 0;
index af67c1d5a1f7cc6cc5d0edbef0f36d55cf8ed56c..a7c79f4a46028292ff8ba08fef7329ab8156a454 100644 (file)
@@ -13,6 +13,7 @@
 #include <simgear/structure/exception.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/math/sg_geodesy.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
index 80d7edce0ca0dd371a5f41079282deb06069be05..4902947bc995b01a924fc54381ee70215dec0f33 100644 (file)
@@ -25,6 +25,7 @@
 #include <simgear/compiler.h>
 
 #include <simgear/structure/commands.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/globals.hxx>
 #include <GUI/gui.h>           // mkDialog
index c18234160803e93b35bcf439527bf792a0e3770b..17ea68cbaf949a4a7ee28f4f1488fea24a084a1d 100644 (file)
@@ -29,6 +29,7 @@
 #include <simgear/structure/exception.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/sg_inlines.h>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
index 617909b2ae95f611469a3cc9a7440502545e5893..bee7a6011d64cd63ad01acda58b090cc66af6f99 100644 (file)
@@ -38,6 +38,8 @@
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props_io.hxx>
+
 #include <osg/GLU>
 
 #include <Aircraft/aircraft.hxx>
index 1104f76788a4658a1edfa09a72a615c75c213821..5129c08d8421d1c6347119cdf763cb36140b569b 100644 (file)
@@ -33,6 +33,8 @@
 #include <simgear/scene/sky/cloudfield.hxx>
 #include <simgear/scene/sky/newcloud.hxx>
 #include <simgear/math/sg_random.h>
+#include <simgear/props/props_io.hxx>
+
 #include <Main/globals.hxx>
 #include <Airports/simple.hxx>
 #include <Main/util.hxx>
index 3ac483abcb246dff0266658b8b83be4fbae67e92..ff9c7ad3c337c370a9ed1d79f66e50589fb83778 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <simgear/compiler.h>
 #include <simgear/structure/exception.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 
index 6f0176b4bce223e3de652c84daca475bc57423de..918d9df5d3232c7d39b6e9cf883459cfd19d14bb 100644 (file)
@@ -50,6 +50,7 @@ using std::string;
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/misc/sgstream.hxx>
 #include <simgear/structure/exception.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_io.hxx>
 #include <Main/fg_props.hxx>
index ba47d0bfde6bbb69f2dc96280d72b907692ce320..9b0fd0f40a5535795d250ae0a35d78a3d492ce15 100644 (file)
@@ -18,6 +18,7 @@
 #include <simgear/structure/exception.hxx>
 #include <simgear/structure/commands.hxx>
 #include <simgear/props/props.hxx>
+#include <simgear/structure/event_mgr.hxx>
 
 #include <Cockpit/panel.hxx>
 #include <Cockpit/panel_io.hxx>
index 8ed56f001ef2fa47f225dabb173c9db320e9d4b8..6d0cb799afcd040d0dc84b0ed0325abff211e78e 100644 (file)
 #endif
 
 #include <simgear/compiler.h>
-
 #include <simgear/structure/exception.hxx>
+#include <simgear/props/props_io.hxx>
+
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/timing/sg_time.hxx>
 #include <simgear/misc/sg_path.hxx>
-#include <simgear/scene/material/matlib.hxx>
 #include <simgear/sound/soundmgr_openal.hxx>
 
-#include <iostream>
-
 #include <Aircraft/aircraft.hxx>
 #include <FDM/flight.hxx>
-
-#include <Time/tmp.hxx>
-#include <Environment/environment.hxx>
-
 #include <GUI/gui.h>
 
 #include "globals.hxx"
 #include "fg_props.hxx"
 
-using std::istream;
-using std::ostream;
 
 static bool winding_ccw = true; // FIXME: temporary
 
@@ -55,7 +47,7 @@ static bool fdm_data_logging = false; // FIXME: temporary
 
 static bool frozen = false;    // FIXME: temporary
 
-
+using std::string;
 \f
 ////////////////////////////////////////////////////////////////////////
 // Default property bindings (not yet handled by any module).
@@ -592,7 +584,7 @@ FGProperties::update (double dt)
  * Save the current state of the simulator to a stream.
  */
 bool
-fgSaveFlight (ostream &output, bool write_all)
+fgSaveFlight (std::ostream &output, bool write_all)
 {
 
   fgSetBool("/sim/presets/onground", false);
@@ -616,7 +608,7 @@ fgSaveFlight (ostream &output, bool write_all)
  * Restore the current state of the simulator from a stream.
  */
 bool
-fgLoadFlight (istream &input)
+fgLoadFlight (std::istream &input)
 {
   SGPropertyNode props;
   try {
index 4025b185dfc424a2298ddeacdd879ed031d6f619..ef6ed69d906430a274ac073ee26afc0c5ece7179 100644 (file)
@@ -6,13 +6,11 @@
 #ifndef __FG_PROPS_HXX
 #define __FG_PROPS_HXX 1
 
-#include <simgear/debug/logstream.hxx>
-#include <simgear/props/props.hxx>
-#include <simgear/props/props_io.hxx>
-#include <simgear/structure/subsystem_mgr.hxx>
+#include <iosfwd>
 
-#include "globals.hxx"
+#include <simgear/structure/subsystem_mgr.hxx>
 
+#include <Main/globals.hxx>
 \f
 ////////////////////////////////////////////////////////////////////////
 // Property management.
@@ -42,7 +40,7 @@ public:
  *        just the ones flagged as archivable.
  * @return true if the flight was saved successfully.
  */
-extern bool fgSaveFlight (ostream &output, bool write_all = false);
+extern bool fgSaveFlight (std::ostream &output, bool write_all = false);
 
 
 /**
@@ -54,7 +52,7 @@ extern bool fgSaveFlight (ostream &output, bool write_all = false);
  * @param input The input stream to read the XML from.
  * @return true if the flight was restored successfully.
  */
-extern bool fgLoadFlight (istream &input);
+extern bool fgLoadFlight (std::istream &input);
 
 
 /**
index ac4e72541b28710e621c6ee9188d3f2f64a97ac7..30e3585feef3f9353e20bee5585c507d423ad6db 100644 (file)
@@ -31,6 +31,8 @@
 #include <simgear/ephemeris/ephemeris.hxx>
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/scene/material/matlib.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/structure/event_mgr.hxx>
 
 #include <Aircraft/controls.hxx>
 #include <Airports/runways.hxx>
index c815548e13ccf1798b395d76681cfc6badc29a2b..0c3de7f8aa6d3985ba42782e188e3cad6fc64045 100644 (file)
 #ifndef _GLOBALS_HXX
 #define _GLOBALS_HXX
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
 #include <simgear/compiler.h>
-#include <simgear/structure/callback.hxx>
+#include <simgear/props/props.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
-#include <simgear/structure/event_mgr.hxx>
 
 #include <vector>
 #include <string>
 
-using std::vector;
-using std::string;
-
-typedef vector<string> string_list;
-
+typedef std::vector<std::string> string_list;
 
 // Forward declarations
 
@@ -53,14 +44,15 @@ typedef vector<string> string_list;
 // anyway.
 
 class SGEphemeris;
-
 class SGCommandMgr;
 class SGMagVar;
 class SGMaterialLib;
 class SGPropertyNode;
 class SGTime;
 class SGSoundMgr;
-
+class SGEventMgr;
+class SGSubsystemMgr;
+class SGSubsystem;
 
 class FGAirportList;
 class FGRunwayList;
@@ -111,12 +103,12 @@ private:
     double sim_time_sec;
 
     // Root of FlightGear data tree
-    string fg_root;
+    std::string fg_root;
 
     // Roots of FlightGear scenery tree
     string_list fg_scenery;
 
-    string browser;
+    std::string browser;
 
     // An offset in seconds from the true time.  Allows us to adjust
     // the effective time of day.
@@ -229,14 +221,14 @@ public:
     inline void inc_sim_time_sec (double dt) { sim_time_sec += dt; }
     inline void set_sim_time_sec (double t) { sim_time_sec = t; }
 
-    inline const string &get_fg_root () const { return fg_root; }
-    void set_fg_root (const string &root);
+    inline const std::string &get_fg_root () const { return fg_root; }
+    void set_fg_root (const std::string &root);
 
     inline const string_list &get_fg_scenery () const { return fg_scenery; }
-    void set_fg_scenery (const string &scenery);
+    void set_fg_scenery (const std::string &scenery);
 
-    inline const string &get_browser () const { return browser; }
-    void set_browser (const string &b) { browser = b; }
+    inline const std::string &get_browser () const { return browser; }
+    void set_browser (const std::string &b) { browser = b; }
 
     inline long int get_warp() const { return warp; }
     inline void set_warp( long int w ) { warp = w; }
index 71ee3f5546c7801be888b1fdbebb3b49d1aae742..95e0a5dbe0bc950210c5559ad17611e7b9fbe5b3 100644 (file)
@@ -3,20 +3,21 @@
 //
 // This file is in the Public Domain, and comes with no warranty.
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include "logger.hxx"
 
 #include <fstream>
 #include <string>
 
-using std::ofstream;
-using std::endl;
-using std::string;
-
 #include <simgear/debug/logstream.hxx>
 
 #include "fg_props.hxx"
 
-
+using std::string;
+using std::endl;
 \f
 ////////////////////////////////////////////////////////////////////////
 // Implementation of FGLogger
@@ -72,7 +73,7 @@ FGLogger::init ()
     //
     // Process the individual entries (Time is automatic).
     //
-    vector<SGPropertyNode_ptr> entries = child->getChildren("entry");
+    std::vector<SGPropertyNode_ptr> entries = child->getChildren("entry");
     (*log.output) << "Time";
     for (unsigned int j = 0; j < entries.size(); j++) {
       SGPropertyNode * entry = entries[j];
index 184af4425110a5d7697d3b88224240aae38558c0..1f99cd9102c66bfe235267a9b8de83839b341448 100644 (file)
@@ -6,22 +6,11 @@
 #ifndef __LOGGER_HXX
 #define __LOGGER_HXX 1
 
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
 #include <iosfwd>
 #include <vector>
 
 #include <simgear/compiler.h>
-#include <simgear/debug/logstream.hxx>
-#include <simgear/structure/exception.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
-#include <simgear/props/props.hxx>
 
 /**
  * Log any property values to any number of CSV files.
index 27c9e49dc909bd3beafa2216816b47204b7b6eb5..d2d6787614c3dd51a183f41868df979f5d71841c 100644 (file)
 
 #include <plib/netSocket.h>
 
-#include <simgear/props/props.hxx>
-#include <simgear/timing/sg_time.hxx>
-#include <simgear/math/sg_random.h>
-
 #include <osgDB/Registry>
 
 // Class references
 #include <simgear/scene/material/matlib.hxx>
 #include <simgear/scene/model/animation.hxx>
 #include <simgear/scene/sky/sky.hxx>
+#include <simgear/structure/event_mgr.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/timing/sg_time.hxx>
+#include <simgear/math/sg_random.h>
+
 #include <Time/light.hxx>
 #include <Include/general.hxx>
 #include <Aircraft/replay.hxx>
index a36ad671d2fe20bcaf537e565d08557f499fc337..6286578af3d6fa355e57e2cbb0020ade8e7d8729 100644 (file)
@@ -40,6 +40,7 @@
 #include <plib/ul.h>
 
 #include <simgear/math/sg_random.h>
+#include <simgear/props/props_io.hxx>
 #include <simgear/misc/sgstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/scene/material/mat.hxx>
index 378f215c8df4fabc8bdc2115375cd1c7a29401e7..ebf00871940fe24f64fdbff7bb9ba74c87a92a77 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 
index 962996d62bc661fc43c2fc93432d07019f142ffe..8e1b81cda401e517552cfb4b8345c6fe28d78f2a 100644 (file)
@@ -41,6 +41,7 @@
 #include <plib/ul.h>
 
 #include <simgear/debug/logstream.hxx>
+#include <simgear/props/props_io.hxx>
 #include <simgear/io/iochannel.hxx>
 #include <simgear/math/sg_types.hxx>
 #include <simgear/misc/sg_path.hxx>
index 79a9dcb26df3b1b74c2df84bb8d9d5bb25f11d8b..f4b3dbae27cc8be4ca90473629ce7cc6b275f1d6 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 
index e7fefb46e22054319ef3e56b668629c3b27cbc88..1177b21028347afbdb507d11284ce14528dd6386 100644 (file)
@@ -23,6 +23,7 @@
 #include <simgear/scene/material/mat.hxx>
 #include <simgear/structure/commands.hxx>
 #include <simgear/math/sg_geodesy.hxx>
+#include <simgear/structure/event_mgr.hxx>
 
 #include <Airports/runways.hxx>
 #include <Airports/simple.hxx>
index e015487b1aea6ace09cc6e3d60e1d953c4907338..2bd473c09456e0959e3c5f5148a64f664cbcfb76 100644 (file)
@@ -27,6 +27,7 @@
 #include <simgear/structure/exception.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/debug/logstream.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
index 682293ef67c00504c72be5f4adc61e1ba2fdf691..3a706d8ca9cb2724415b2efddc34472c07775940 100644 (file)
@@ -10,6 +10,7 @@
 #include <simgear/structure/exception.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/sg_inlines.h>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>