1
0
Fork 0

Progress towards testing

- remove route-manager from global variables
This commit is contained in:
James Turner 2015-12-10 16:30:26 -06:00
parent 76c6665af4
commit 43fcbd2246
7 changed files with 10 additions and 11 deletions

View file

@ -48,6 +48,8 @@ public:
static FGAirportDynamicsRef find(const FGAirportRef& apt); static FGAirportDynamicsRef find(const FGAirportRef& apt);
FGAirportDynamicsRef dynamicsForICAO(const std::string& icao); FGAirportDynamicsRef dynamicsForICAO(const std::string& icao);
static const char* subsystemName() { return "airport-dynamics"; }
private: private:
typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict; typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict;
ICAODynamicsDict m_dynamics; ICAODynamicsDict m_dynamics;

View file

@ -100,6 +100,7 @@ public:
flightgear::WayptRef waypointFromString(const std::string& target); flightgear::WayptRef waypointFromString(const std::string& target);
static const char* subsystemName() { return "route-manager"; }
private: private:
bool commandDefineUserWaypoint(const SGPropertyNode* arg); bool commandDefineUserWaypoint(const SGPropertyNode* arg);
bool commandDeleteUserWaypoint(const SGPropertyNode* arg); bool commandDeleteUserWaypoint(const SGPropertyNode* arg);

View file

@ -779,7 +779,7 @@ void fgCreateSubsystems(bool duringReset) {
globals->add_subsystem( "xml-autopilot", FGXMLAutopilotGroup::createInstance("autopilot"), SGSubsystemMgr::FDM ); globals->add_subsystem( "xml-autopilot", FGXMLAutopilotGroup::createInstance("autopilot"), SGSubsystemMgr::FDM );
globals->add_subsystem( "xml-proprules", FGXMLAutopilotGroup::createInstance("property-rule"), SGSubsystemMgr::GENERAL ); globals->add_subsystem( "xml-proprules", FGXMLAutopilotGroup::createInstance("property-rule"), SGSubsystemMgr::GENERAL );
globals->add_subsystem( "route-manager", new FGRouteMgr ); globals->add_new_subsystem<FGRouteMgr>();
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Initialize the Input-Output subsystem // Initialize the Input-Output subsystem

View file

@ -50,7 +50,6 @@
#include <Autopilot/route_mgr.hxx> #include <Autopilot/route_mgr.hxx>
#include <GUI/FGFontCache.hxx> #include <GUI/FGFontCache.hxx>
#include <GUI/gui.h> #include <GUI/gui.h>
#include <MultiPlayer/multiplaymgr.hxx>
#include <Scenery/scenery.hxx> #include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx> #include <Scenery/tilemgr.hxx>
#include <Navaids/navlist.hxx> #include <Navaids/navlist.hxx>
@ -159,7 +158,6 @@ FGGlobals::FGGlobals() :
fg_home( "" ), fg_home( "" ),
time_params( NULL ), time_params( NULL ),
ephem( NULL ), ephem( NULL ),
route_mgr( NULL ),
viewmgr( NULL ), viewmgr( NULL ),
commands( SGCommandMgr::instance() ), commands( SGCommandMgr::instance() ),
channel_options_list( NULL ), channel_options_list( NULL ),
@ -252,7 +250,7 @@ FGGlobals::~FGGlobals()
delete time_params; delete time_params;
set_matlib(NULL); set_matlib(NULL);
delete route_mgr;
delete channel_options_list; delete channel_options_list;
delete initial_waypoints; delete initial_waypoints;
delete fontcache; delete fontcache;
@ -529,10 +527,7 @@ FGGlobals::add_subsystem (const char * name,
SGSoundMgr * SGSoundMgr *
FGGlobals::get_soundmgr () const FGGlobals::get_soundmgr () const
{ {
if (subsystem_mgr) return get_subsystem<SGSoundMgr>();
return (SGSoundMgr*) subsystem_mgr->get_subsystem("sound");
return NULL;
} }
SGEventMgr * SGEventMgr *

View file

@ -120,9 +120,6 @@ private:
// Material properties library // Material properties library
SGSharedPtr<SGMaterialLib> matlib; SGSharedPtr<SGMaterialLib> matlib;
// Global autopilot "route"
FGRouteMgr *route_mgr;
// viewer manager // viewer manager
FGViewMgr *viewmgr; FGViewMgr *viewmgr;

View file

@ -126,6 +126,8 @@ public:
static void resetPagerSingleton(); static void resetPagerSingleton();
flightgear::SceneryPager* getPager() { return _pager.get(); } flightgear::SceneryPager* getPager() { return _pager.get(); }
static const char* subsystemName() { return "scenery"; }
}; };

View file

@ -116,6 +116,8 @@ public:
// notify the tile manahger the material library was reloaded, // notify the tile manahger the material library was reloaded,
// so it can pass this through to its options object // so it can pass this through to its options object
void materialLibChanged(); void materialLibChanged();
static const char* subsystemName() { return "tile-mgr"; }
}; };