| 
									
										
										
										
											2018-10-26 03:24:36 +01:00
										 |  |  | #ifndef AD1C_CTY_HPP_
 | 
					
						
							|  |  |  | #define AD1C_CTY_HPP_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QObject>
 | 
					
						
							| 
									
										
										
										
											2019-05-29 23:35:18 +01:00
										 |  |  | #include <QDebug>
 | 
					
						
							| 
									
										
										
										
											2018-10-26 03:24:36 +01:00
										 |  |  | #include "pimpl_h.hpp"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-29 23:35:18 +01:00
										 |  |  | class QString; | 
					
						
							|  |  |  | class Configuration; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-26 03:24:36 +01:00
										 |  |  | //
 | 
					
						
							|  |  |  | // AD1CCty  - Fast  access database  of Jim  Reisert, AD1C's,  cty.dat
 | 
					
						
							|  |  |  | // 						entity and entity override information file.
 | 
					
						
							|  |  |  | // 
 | 
					
						
							|  |  |  | class AD1CCty final | 
					
						
							|  |  |  |   : public QObject | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   Q_OBJECT | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |   //
 | 
					
						
							|  |  |  |   // Continent enumeration
 | 
					
						
							|  |  |  |   // 
 | 
					
						
							|  |  |  |   enum class Continent {UN, AF, AN, AS, EU, NA, OC, SA}; | 
					
						
							|  |  |  |   static Continent continent (QString const& continent_id); | 
					
						
							|  |  |  |   static char const * continent (Continent); | 
					
						
							|  |  |  |   Q_ENUM (Continent) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   struct Record | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     explicit Record (); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Continent continent; | 
					
						
							|  |  |  |     int CQ_zone; | 
					
						
							|  |  |  |     int ITU_zone; | 
					
						
							|  |  |  |     QString entity_name; | 
					
						
							|  |  |  |     bool WAE_only; | 
					
						
							|  |  |  |     float latitude; | 
					
						
							|  |  |  |     float longtitude; | 
					
						
							|  |  |  |     int UTC_offset; | 
					
						
							|  |  |  |     QString primary_prefix; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-29 23:35:18 +01:00
										 |  |  |   explicit AD1CCty (Configuration const *); | 
					
						
							| 
									
										
										
										
											2018-10-26 03:24:36 +01:00
										 |  |  |   ~AD1CCty (); | 
					
						
							|  |  |  |   Record lookup (QString const& call) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |   class impl; | 
					
						
							|  |  |  |   pimpl<impl> m_; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #if !defined (QT_NO_DEBUG_STREAM)
 | 
					
						
							|  |  |  | QDebug operator << (QDebug, AD1CCty::Record const&); | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |