header cleanups
This commit is contained in:
parent
7f49272e5e
commit
14885374de
24 changed files with 58 additions and 64 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/structure/exception.hxx>
|
||||
#include <simgear/props/props_io.hxx>
|
||||
|
||||
#include <Main/fg_props.hxx>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -25,29 +25,21 @@
|
|||
#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;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// 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 {
|
||||
|
|
|
@ -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 <iosfwd>
|
||||
|
||||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
|
||||
#include "globals.hxx"
|
||||
|
||||
#include <Main/globals.hxx>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// 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);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -24,23 +24,14 @@
|
|||
#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; }
|
||||
|
|
|
@ -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;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// 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];
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
|
||||
#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
|
||||
|
@ -46,6 +42,11 @@
|
|||
#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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue