]> git.mxchange.org Git - flightgear.git/blob - src/ATCDCL/ATISmgr.hxx
Fix ATIS output.
[flightgear.git] / src / ATCDCL / ATISmgr.hxx
1 // ATISmgr.hxx - definition of FGATISMgr
2 // - a global management class for FlightGear generated ATIS
3 //
4 // Written by David Luff, started February 2002.
5 //
6 // Copyright (C) 2002  David C Luff - david.luff@nottingham.ac.uk
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21
22 #ifndef _FG_ATISMGR_HXX
23 #define _FG_ATISMGR_HXX
24
25 #include <vector>
26
27 #include <simgear/structure/subsystem_mgr.hxx>
28
29 #include "ATC.hxx"
30
31 class FGATISMgr : public SGSubsystem
32 {
33 private:
34     // A vector containing all comm radios
35     std::vector<FGATC*> radios;
36
37     unsigned int _currentUnit;
38     unsigned int _maxCommRadios;
39
40 #ifdef ENABLE_AUDIO_SUPPORT
41     bool useVoice;  // Flag - true if we are using voice
42     FGATCVoice* voice;
43 #endif
44
45 public:
46     FGATISMgr();
47     ~FGATISMgr();
48
49     void init();
50     void update(double dt);
51
52     // Return a pointer to an appropriate voice for a given type of ATC
53     // creating the voice if necessary - i.e. make sure exactly one copy
54     // of every voice in use exists in memory.
55     //
56     // TODO - in the future this will get more complex and dole out country/airport
57     // specific voices, and possible make sure that the same voice doesn't get used
58     // at different airports in quick succession if a large enough selection are available.
59     FGATCVoice* GetVoicePointer(const atc_type& type);
60
61 private:
62 };
63
64 #endif  // _FG_ATISMGR_HXX