diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index 8deb5a763..cb7406f98 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -13,48 +13,14 @@ FGSystemMgr::FGSystemMgr () { - // NO-OP + set_subsystem("electrical", new FGElectricalSystem); + set_subsystem("pitot", new PitotSystem); + set_subsystem("static", new StaticSystem); + set_subsystem("vacuum", new VacuumSystem); } FGSystemMgr::~FGSystemMgr () { - for (unsigned int i = 0; i < _systems.size(); i++) { - delete _systems[i]; - _systems[i] = 0; - } -} - -void -FGSystemMgr::init () -{ - // TODO: replace with XML configuration - _systems.push_back(new FGElectricalSystem); - _systems.push_back(new PitotSystem); - _systems.push_back(new StaticSystem); - _systems.push_back(new VacuumSystem); - - // Initialize the individual systems - for (unsigned int i = 0; i < _systems.size(); i++) - _systems[i]->init(); -} - -void -FGSystemMgr::bind () -{ - // NO-OP -} - -void -FGSystemMgr::unbind () -{ - // NO-OP -} - -void -FGSystemMgr::update (double dt) -{ - for (unsigned int i = 0; i < _systems.size(); i++) - _systems[i]->update(dt); } // end of system_manager.cxx diff --git a/src/Systems/system_mgr.hxx b/src/Systems/system_mgr.hxx index c16201424..544b1e30a 100644 --- a/src/Systems/system_mgr.hxx +++ b/src/Systems/system_mgr.hxx @@ -19,10 +19,6 @@ #include
-#include - -SG_USING_STD(vector); - /** * Manage aircraft systems. @@ -30,21 +26,12 @@ SG_USING_STD(vector); * In the initial draft, the systems present are hard-coded, but they * will soon be configurable for individual aircraft. */ -class FGSystemMgr : public FGSubsystem +class FGSystemMgr : public FGSubsystemGroup { public: FGSystemMgr (); virtual ~FGSystemMgr (); - - virtual void init (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); - -private: - vector _systems; - }; #endif // __SYSTEM_MGR_HXX