X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATCDCL%2FATISmgr.hxx;h=29aaef4722e60b569c0650fe33245a732202ed9e;hb=0a879d3c6579f715dd8d247b8e20b00d7f2f64d9;hp=75ef3a30f98ef255b98742ca054714c4515423c2;hpb=9fa790bcac7e535bb06cd228ae15178f1b10b26f;p=flightgear.git diff --git a/src/ATCDCL/ATISmgr.hxx b/src/ATCDCL/ATISmgr.hxx index 75ef3a30f..29aaef472 100644 --- a/src/ATCDCL/ATISmgr.hxx +++ b/src/ATCDCL/ATISmgr.hxx @@ -19,55 +19,28 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#ifndef _FG_ATCMGR_HXX -#define _FG_ATCMGR_HXX +#ifndef _FG_ATISMGR_HXX +#define _FG_ATISMGR_HXX -#include +#include -#include -#include -#include +#include #include "ATC.hxx" -namespace flightgear -{ - class CommStation; -} - -typedef struct -{ - SGPropertyNode_ptr freq; - FGATC* station; -} CommRadioData; - class FGATISMgr : public SGSubsystem { - private: // A vector containing all comm radios - typedef std::vector radio_list_type; - radio_list_type radios; - - // Any member function of FGATISMgr is permitted to leave this iterator pointing - // at any point in or at the end of the list. - // Hence any new access must explicitly first check for atc_list.end() before dereferencing. - - // Position of the Users Aircraft - SGGeod _aircraftPos; - - // Pointers to current users position - SGPropertyNode_ptr lon_node; - SGPropertyNode_ptr lat_node; - SGPropertyNode_ptr elev_node; + std::vector radios; unsigned int _currentUnit; unsigned int _maxCommRadios; - - // Voice related stuff - bool voice; // Flag - true if we are using voice + #ifdef ENABLE_AUDIO_SUPPORT - FGATCVoice* voice1; + bool useVoice; // Flag - true if we are using voice + FGATCVoice* voice; + std::string voiceName; // currently loaded voice name #endif public: @@ -75,11 +48,7 @@ public: ~FGATISMgr(); void init(); - - void bind(); - - void unbind(); - + void reinit(); void update(double dt); // Return a pointer to an appropriate voice for a given type of ATC @@ -92,8 +61,6 @@ public: FGATCVoice* GetVoicePointer(const atc_type& type); private: - // Search the specified radio for stations on the same frequency and in range. - void FreqSearch(const unsigned int unit); }; -#endif // _FG_ATCMGR_HXX +#endif // _FG_ATISMGR_HXX