Progress towards testing
- remove route-manager from global variables
This commit is contained in:
parent
76c6665af4
commit
43fcbd2246
7 changed files with 10 additions and 11 deletions
|
@ -48,6 +48,8 @@ public:
|
|||
static FGAirportDynamicsRef find(const FGAirportRef& apt);
|
||||
|
||||
FGAirportDynamicsRef dynamicsForICAO(const std::string& icao);
|
||||
|
||||
static const char* subsystemName() { return "airport-dynamics"; }
|
||||
private:
|
||||
typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict;
|
||||
ICAODynamicsDict m_dynamics;
|
||||
|
|
|
@ -100,6 +100,7 @@ public:
|
|||
|
||||
flightgear::WayptRef waypointFromString(const std::string& target);
|
||||
|
||||
static const char* subsystemName() { return "route-manager"; }
|
||||
private:
|
||||
bool commandDefineUserWaypoint(const SGPropertyNode* arg);
|
||||
bool commandDeleteUserWaypoint(const SGPropertyNode* arg);
|
||||
|
|
|
@ -779,7 +779,7 @@ void fgCreateSubsystems(bool duringReset) {
|
|||
|
||||
globals->add_subsystem( "xml-autopilot", FGXMLAutopilotGroup::createInstance("autopilot"), SGSubsystemMgr::FDM );
|
||||
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
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
#include <Autopilot/route_mgr.hxx>
|
||||
#include <GUI/FGFontCache.hxx>
|
||||
#include <GUI/gui.h>
|
||||
#include <MultiPlayer/multiplaymgr.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
#include <Scenery/tilemgr.hxx>
|
||||
#include <Navaids/navlist.hxx>
|
||||
|
@ -159,7 +158,6 @@ FGGlobals::FGGlobals() :
|
|||
fg_home( "" ),
|
||||
time_params( NULL ),
|
||||
ephem( NULL ),
|
||||
route_mgr( NULL ),
|
||||
viewmgr( NULL ),
|
||||
commands( SGCommandMgr::instance() ),
|
||||
channel_options_list( NULL ),
|
||||
|
@ -252,7 +250,7 @@ FGGlobals::~FGGlobals()
|
|||
|
||||
delete time_params;
|
||||
set_matlib(NULL);
|
||||
delete route_mgr;
|
||||
|
||||
delete channel_options_list;
|
||||
delete initial_waypoints;
|
||||
delete fontcache;
|
||||
|
@ -529,10 +527,7 @@ FGGlobals::add_subsystem (const char * name,
|
|||
SGSoundMgr *
|
||||
FGGlobals::get_soundmgr () const
|
||||
{
|
||||
if (subsystem_mgr)
|
||||
return (SGSoundMgr*) subsystem_mgr->get_subsystem("sound");
|
||||
|
||||
return NULL;
|
||||
return get_subsystem<SGSoundMgr>();
|
||||
}
|
||||
|
||||
SGEventMgr *
|
||||
|
|
|
@ -120,9 +120,6 @@ private:
|
|||
// Material properties library
|
||||
SGSharedPtr<SGMaterialLib> matlib;
|
||||
|
||||
// Global autopilot "route"
|
||||
FGRouteMgr *route_mgr;
|
||||
|
||||
// viewer manager
|
||||
FGViewMgr *viewmgr;
|
||||
|
||||
|
|
|
@ -126,6 +126,8 @@ public:
|
|||
static void resetPagerSingleton();
|
||||
|
||||
flightgear::SceneryPager* getPager() { return _pager.get(); }
|
||||
|
||||
static const char* subsystemName() { return "scenery"; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -116,6 +116,8 @@ public:
|
|||
// notify the tile manahger the material library was reloaded,
|
||||
// so it can pass this through to its options object
|
||||
void materialLibChanged();
|
||||
|
||||
static const char* subsystemName() { return "tile-mgr"; }
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue