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;
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);
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
#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>
fg_home( "" ),
time_params( NULL ),
ephem( NULL ),
- route_mgr( NULL ),
viewmgr( NULL ),
commands( SGCommandMgr::instance() ),
channel_options_list( NULL ),
delete time_params;
set_matlib(NULL);
- delete route_mgr;
+
delete channel_options_list;
delete initial_waypoints;
delete fontcache;
SGSoundMgr *
FGGlobals::get_soundmgr () const
{
- if (subsystem_mgr)
- return (SGSoundMgr*) subsystem_mgr->get_subsystem("sound");
-
- return NULL;
+ return get_subsystem<SGSoundMgr>();
}
SGEventMgr *
// Material properties library
SGSharedPtr<SGMaterialLib> matlib;
- // Global autopilot "route"
- FGRouteMgr *route_mgr;
-
// viewer manager
FGViewMgr *viewmgr;
static void resetPagerSingleton();
flightgear::SceneryPager* getPager() { return _pager.get(); }
+
+ static const char* subsystemName() { return "scenery"; }
};
// 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"; }
};