1 // instrument_mgr.cxx - manage aircraft instruments.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain and comes with no warranty.
7 #include "instrument_mgr.hxx"
8 #include "altimeter.hxx"
9 #include "attitude_indicator.hxx"
12 FGInstrumentMgr::FGInstrumentMgr ()
17 FGInstrumentMgr::~FGInstrumentMgr ()
19 for (unsigned int i = 0; i < _instruments.size(); i++) {
20 delete _instruments[i];
26 FGInstrumentMgr::init ()
28 // TODO: replace with XML configuration
29 _instruments.push_back(new Altimeter);
30 _instruments.push_back(new AttitudeIndicator);
32 // Initialize the individual instruments
33 for (unsigned int i = 0; i < _instruments.size(); i++)
34 _instruments[i]->init();
38 FGInstrumentMgr::bind ()
44 FGInstrumentMgr::unbind ()
50 FGInstrumentMgr::update (double dt)
52 for (unsigned int i = 0; i < _instruments.size(); i++)
53 _instruments[i]->update(dt);
56 // end of instrument_manager.cxx