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"
10 #include "heading_indicator.hxx"
11 #include "vertical_speed_indicator.hxx"
14 FGInstrumentMgr::FGInstrumentMgr ()
19 FGInstrumentMgr::~FGInstrumentMgr ()
21 for (unsigned int i = 0; i < _instruments.size(); i++) {
22 delete _instruments[i];
28 FGInstrumentMgr::init ()
30 // TODO: replace with XML configuration
31 _instruments.push_back(new Altimeter);
32 _instruments.push_back(new AttitudeIndicator);
33 _instruments.push_back(new HeadingIndicator);
34 _instruments.push_back(new VerticalSpeedIndicator);
36 // Initialize the individual instruments
37 for (unsigned int i = 0; i < _instruments.size(); i++)
38 _instruments[i]->init();
42 FGInstrumentMgr::bind ()
48 FGInstrumentMgr::unbind ()
54 FGInstrumentMgr::update (double dt)
56 for (unsigned int i = 0; i < _instruments.size(); i++)
57 _instruments[i]->update(dt);
60 // end of instrument_manager.cxx