1 // ---------------------------------------------------------------------------- 2 // states.h 3 // 4 // Copyright (C) 2006-2010 5 // Dave Freese, W1HKJ 6 // Copyright (C) 2008-2009 7 // Stelios Bounanos, M0GLD 8 // 9 // This file is part of fldigi. 10 // 11 // Fldigi is free software: you can redistribute it and/or modify 12 // it under the terms of the GNU General Public License as published by 13 // the Free Software Foundation, either version 3 of the License, or 14 // (at your option) any later version. 15 // 16 // Fldigi is distributed in the hope that it will be useful, 17 // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 // GNU General Public License for more details. 20 // 21 // You should have received a copy of the GNU General Public License 22 // along with fldigi. If not, see <http://www.gnu.org/licenses/>. 23 // ---------------------------------------------------------------------------- 24 25 // Extracted from FIPS 2010 census data 26 27 #ifndef _COUNTIES_H 28 #define _COUNTIES_H 29 30 #include <string> 31 #include <vector> 32 33 using namespace std; 34 35 struct STATE_COUNTY_QUAD { 36 std::string state; // state long name 37 std::string ST; // state abbreviated 38 std::string county; // county long name 39 std::string CTY; // county abbreviated 40 }; 41 42 class Cstates { 43 private: 44 size_t next; 45 public: Cstates()46 Cstates() {} ~Cstates()47 ~Cstates(){} 48 49 // static struct STATE_COUNTY_QUAD vec_SQSO[]; 50 51 bool valid_county( string st, string cty ); 52 const string names(); 53 const string counties(string st); 54 const string county(string st, string cnty); 55 const string cnty_short(string st, string cnty); 56 const string state(string ST); 57 const string state_short(string ST); 58 }; 59 60 extern Cstates states; 61 62 extern const std::string counties(); 63 //extern const std::string six_qp_counties(); 64 //extern const std::string seven_qp_counties(); 65 66 extern void load_counties(); 67 extern void save_counties(); 68 69 extern std::vector<STATE_COUNTY_QUAD> vec_SQSO; 70 extern std::vector<STATE_COUNTY_QUAD> vec_6QP; 71 extern std::vector<STATE_COUNTY_QUAD> vec_7QP; 72 73 extern const char *szSQSO; 74 extern const char *sz7QP; 75 extern const char *szNEQP; 76 77 #endif 78