OpenTREP Logo  0.07.9
C++ Open Travel Request Parsing Library
PORParserHelper.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 #include <vector>
7 #include <fstream>
8 // Boost
9 #include <boost/lexical_cast.hpp>
10 //#define BOOST_SPIRIT_DEBUG
11 #define BOOST_SPIRIT_UNICODE
12 // OpenTREP
16 
17 namespace OPENTREP {
18 
20  namespace bsq = boost::spirit::qi;
21  //namespace bsa = boost::spirit::ascii;
22  namespace bsu = boost::spirit::unicode;
23  namespace bsc = boost::spirit::classic;
24 
25  namespace PorParserHelper {
26 
27  // //////////////////////////////////////////////////////////////////
28  // Semantic actions
29  // //////////////////////////////////////////////////////////////////
30 
32  : _location (ioLocation) {
33  }
34 
35  // //////////////////////////////////////////////////////////////////
37  : ParserSemanticAction (ioLocation) {
38  }
39 
40  // //////////////////////////////////////////////////////////////////
41  void storeIataCode::operator() (std::vector<uchar_t> iChar,
42  bsq::unused_type, bsq::unused_type) const {
43 
44  const std::string lIataCodeStr (iChar.begin(), iChar.end());
45  const OPENTREP::IATACode_T lIataCode (lIataCodeStr);
46  _location.setIataCode (lIataCode);
47 
48  // Reset the values
49  //_location.resetMatrix();
50  //_location._itAltNameShortList.clear();
51 
52  // DEBUG
53  //OPENTREP_LOG_DEBUG ("IATA code: " << _location.getIataCode());
54  }
55 
56  // //////////////////////////////////////////////////////////////////
58  : ParserSemanticAction (ioLocation) {
59  }
60 
61  // //////////////////////////////////////////////////////////////////
62  void storeIcaoCode::operator() (std::vector<uchar_t> iChar,
63  bsq::unused_type, bsq::unused_type) const {
64 
65  const std::string lIcaoCodeStr (iChar.begin(), iChar.end());
66  const OPENTREP::ICAOCode_T lIcaoCode (lIcaoCodeStr);
67  _location.setIcaoCode (lIcaoCode);
68 
69  // DEBUG
70  //OPENTREP_LOG_DEBUG ("ICAO code: " << _location.getIcaoCode());
71  }
72 
73  // //////////////////////////////////////////////////////////////////
75  : ParserSemanticAction (ioLocation) {
76  }
77 
78  // //////////////////////////////////////////////////////////////////
79  void storeFaaCode::operator() (std::vector<uchar_t> iChar,
80  bsq::unused_type, bsq::unused_type) const {
81 
82  const std::string lFaaCodeStr (iChar.begin(), iChar.end());
83  const OPENTREP::FAACode_T lFaaCode (lFaaCodeStr);
84  _location.setFaaCode (lFaaCode);
85 
86  // DEBUG
87  //OPENTREP_LOG_DEBUG ("FAA code: " << _location.getFaaCode());
88  }
89 
90  // //////////////////////////////////////////////////////////////////
92  : ParserSemanticAction (ioLocation) {
93  }
94 
95  // //////////////////////////////////////////////////////////////////
96  void storeUNLOCode::operator() (std::vector<uchar_t> iChar,
97  bsq::unused_type, bsq::unused_type) const {
98 
99  const std::string lUNLOCodeStr (iChar.begin(), iChar.end());
100  const OPENTREP::UNLOCode_T lUNLOCode (lUNLOCodeStr);
101  _location.addUNLOCode (lUNLOCode);
102 
103  // DEBUG
104  //OPENTREP_LOG_DEBUG ("UN/LOCODE codes: " << _location.describeUNLOCodeList());
105  }
106 
107  // //////////////////////////////////////////////////////////////////
109  : ParserSemanticAction (ioLocation) {
110  }
111 
112  // //////////////////////////////////////////////////////////////////
113  void storeUICCode::operator() (unsigned int iUICCode,
114  bsq::unused_type, bsq::unused_type) const {
115 
116  _location.addUICCode (iUICCode);
117 
118  // DEBUG
119  //OPENTREP_LOG_DEBUG ("UIC codes: " << _location.describeUICCodeList());
120  }
121 
122  // //////////////////////////////////////////////////////////////////
124  : ParserSemanticAction (ioLocation) {
125  }
126 
127  // //////////////////////////////////////////////////////////////////
128  void storeGeonamesID::operator() (unsigned int iPorId,
129  bsq::unused_type, bsq::unused_type) const {
130  _location.setGeonamesID (iPorId);
131 
132  // DEBUG
133  //OPENTREP_LOG_DEBUG ("POR ID: " << _location.getPorID());
134  }
135 
136  // //////////////////////////////////////////////////////////////////
138  : ParserSemanticAction (ioLocation) {
139  }
140 
141  // //////////////////////////////////////////////////////////////////
142  void storeEnvelopeID::operator() (unsigned int iEnvelopeID,
143  bsq::unused_type, bsq::unused_type) const {
144  _location.setEnvelopeID (iEnvelopeID);
145 
146  // DEBUG
147  //OPENTREP_LOG_DEBUG ("Envelope ID: " << _location.getEnvelopeID());
148  }
149 
150  // //////////////////////////////////////////////////////////////////
152  : ParserSemanticAction (ioLocation) {
153  }
154 
155  // //////////////////////////////////////////////////////////////////
156  void storeCommonName::operator() (std::vector<uchar_t> iChar,
157  bsq::unused_type, bsq::unused_type) const {
158 
159  const std::string lCommonNameStr (iChar.begin(), iChar.end());
160  const OPENTREP::CommonName_T lCommonName (lCommonNameStr);
161  _location.setCommonName (lCommonName);
162  // DEBUG
163  //OPENTREP_LOG_DEBUG ("Common name: " << _location.getCommonName());
164  }
165 
166  // //////////////////////////////////////////////////////////////////
168  : ParserSemanticAction (ioLocation) {
169  }
170 
171  // //////////////////////////////////////////////////////////////////
172  void storeAsciiName::operator() (std::vector<uchar_t> iChar,
173  bsq::unused_type, bsq::unused_type) const {
174 
175  const std::string lAsciiNameStr (iChar.begin(), iChar.end());
176  const OPENTREP::ASCIIName_T lAsciiName (lAsciiNameStr);
177  _location.setAsciiName (lAsciiName);
178  // DEBUG
179  //OPENTREP_LOG_DEBUG ("ASCII name: " << _location.getAsciiName());
180  }
181 
182  // //////////////////////////////////////////////////////////////////
184  : ParserSemanticAction (ioLocation) {
185  }
186 
187  // //////////////////////////////////////////////////////////////////
189  operator() (bsq::unused_type, bsq::unused_type, bsq::unused_type) const {
191  // DEBUG
192  //OPENTREP_LOG_DEBUG ("List of served cities: " << _location.describeCityDetailsList());
193  }
194 
195  // //////////////////////////////////////////////////////////////////
197  : ParserSemanticAction (ioLocation) {
198  }
199 
200  // //////////////////////////////////////////////////////////////////
201  void storeAltNameShort::operator() (std::vector<uchar_t> iChar,
202  bsq::unused_type,
203  bsq::unused_type)const {
204 
205  const std::string lAltNameShortStr (iChar.begin(), iChar.end());
206  const OPENTREP::AltNameShortListString_T lAltNameShort (lAltNameShortStr);
207  _location._itAltNameShortList.push_back (lAltNameShort);
208  // DEBUG
209  //OPENTREP_LOG_DEBUG ("Alt name short: " << lAltNameShortStr);
210  }
211 
212  // //////////////////////////////////////////////////////////////////
215  : ParserSemanticAction (ioLocation) {
216  }
217 
218  // //////////////////////////////////////////////////////////////////
220  operator() (bsq::unused_type, bsq::unused_type, bsq::unused_type) const {
222  // DEBUG
223  //OPENTREP_LOG_DEBUG ("Alternative name short list: " << _location.getAltNameShortListString());
224  }
225 
226  // //////////////////////////////////////////////////////////////////
228  : ParserSemanticAction (ioLocation) {
229  }
230 
231  // //////////////////////////////////////////////////////////////////
232  void storeTvlPORCode::operator() (std::vector<uchar_t> iChar,
233  bsq::unused_type,
234  bsq::unused_type)const {
235 
236  const std::string lTvlPORCodeStr (iChar.begin(), iChar.end());
237  const OPENTREP::IATACode_T lTvlPORCode (lTvlPORCodeStr);
238  _location._itTvlPORList.push_back (lTvlPORCode);
239  // DEBUG
240  //OPENTREP_LOG_DEBUG ("Travel-related IATA code: " << lTvlPORCodeStr);
241  }
242 
243  // //////////////////////////////////////////////////////////////////
245  : ParserSemanticAction (ioLocation) {
246  }
247 
248  // //////////////////////////////////////////////////////////////////
249  void storeTvlPORListString::operator() (bsq::unused_type, bsq::unused_type,
250  bsq::unused_type)const {
252  // DEBUG
253  //OPENTREP_LOG_DEBUG ("Travel-related POR list: " << _location.getTvlPORListString());
254  }
255 
256  // //////////////////////////////////////////////////////////////////
258  : ParserSemanticAction (ioLocation) {
259  }
260 
261  // //////////////////////////////////////////////////////////////////
262  void storeLatitude::operator() (double iLatitude,
263  bsq::unused_type, bsq::unused_type) const {
264  _location.setLatitude (iLatitude);
265  // DEBUG
266  //OPENTREP_LOG_DEBUG ("Latitude: " << _location.getLatitude());
267  }
268 
269  // //////////////////////////////////////////////////////////////////
271  : ParserSemanticAction (ioLocation) {
272  }
273 
274  // //////////////////////////////////////////////////////////////////
275  void storeLongitude::operator() (double iLongitude,
276  bsq::unused_type, bsq::unused_type) const {
277  _location.setLongitude (iLongitude);
278 
279  // DEBUG
280  //OPENTREP_LOG_DEBUG ("Longitude: " << _location.getLongitude());
281  }
282 
283  // //////////////////////////////////////////////////////////////////
285  : ParserSemanticAction (ioLocation) {
286  }
287 
288  // //////////////////////////////////////////////////////////////////
289  void storeFeatureClass::operator() (std::vector<uchar_t> iChar,
290  bsq::unused_type,
291  bsq::unused_type) const {
292  const std::string lFeatClassStr (iChar.begin(), iChar.end());
293  const OPENTREP::FeatureClass_T lFeatClass (lFeatClassStr);
294  _location.setFeatureClass (lFeatClass);
295 
296  // DEBUG
297  //OPENTREP_LOG_DEBUG ("Feature class: " << _location.getFeatureClass());
298  }
299 
300  // //////////////////////////////////////////////////////////////////
302  : ParserSemanticAction (ioLocation) {
303  }
304 
305  // //////////////////////////////////////////////////////////////////
306  void storeFeatureCode::operator() (std::vector<uchar_t> iChar,
307  bsq::unused_type,
308  bsq::unused_type) const {
309  const std::string lFeatCodeStr (iChar.begin(), iChar.end());
310  const OPENTREP::FeatureClass_T lFeatCode (lFeatCodeStr);
311  _location.setFeatureCode (lFeatCode);
312 
313  // DEBUG
314  //OPENTREP_LOG_DEBUG ("Feature code: " << _location.getFeatureCode());
315  }
316 
317  // //////////////////////////////////////////////////////////////////
319  : ParserSemanticAction (ioLocation) {
320  }
321 
322  // //////////////////////////////////////////////////////////////////
323  void storePageRank::operator() (double iPageRank,
324  bsq::unused_type, bsq::unused_type) const {
325  _location.setPageRank (100.0 * iPageRank);
326 
327  // DEBUG
328  //OPENTREP_LOG_DEBUG ("PageRank: " << _location.getPageRank());
329  }
330 
331  // //////////////////////////////////////////////////////////////////
333  : ParserSemanticAction (ioLocation) {
334  }
335 
336  // //////////////////////////////////////////////////////////////////
337  void storeDateFrom::operator() (bsq::unused_type,
338  bsq::unused_type, bsq::unused_type) const {
339  const OPENTREP::Date_T& lDateFrom = _location.calculateDate();
340  _location.setDateFrom (lDateFrom);
341 
342  // DEBUG
343  //OPENTREP_LOG_DEBUG ("Date from: " << _location.getDateFrom());
344  }
345 
346  // //////////////////////////////////////////////////////////////////
348  : ParserSemanticAction (ioLocation) {
349  }
350 
351  // //////////////////////////////////////////////////////////////////
352  void storeDateEnd::operator() (bsq::unused_type,
353  bsq::unused_type, bsq::unused_type) const {
354  const OPENTREP::Date_T& lDateEnd = _location.calculateDate();
355  _location.setDateEnd (lDateEnd);
356 
357  // DEBUG
358  //OPENTREP_LOG_DEBUG ("Date end: " << _location.getDateEnd());
359  }
360 
361  // //////////////////////////////////////////////////////////////////
363  : ParserSemanticAction (ioLocation) {
364  }
365 
366  // //////////////////////////////////////////////////////////////////
367  void storeComments::operator() (std::vector<uchar_t> iChar,
368  bsq::unused_type, bsq::unused_type) const {
369  /*
370  const std::string lCommentsStr (iChar.begin(), iChar.end());
371  const CountryCode_T lComments (lCommentsStr);
372  _location.setComments (lComments);
373  */
374 
375  // DEBUG
376  //OPENTREP_LOG_DEBUG ("Comments: " << _location.getComments());
377  }
378 
379  // //////////////////////////////////////////////////////////////////
381  : ParserSemanticAction (ioLocation) {
382  }
383 
384  // //////////////////////////////////////////////////////////////////
385  void storeCountryCode::operator() (std::vector<uchar_t> iChar,
386  bsq::unused_type,
387  bsq::unused_type) const {
388  const std::string lCountryCodeStr (iChar.begin(), iChar.end());
389  const OPENTREP::CountryCode_T lCountryCode (lCountryCodeStr);
390  _location.setCountryCode (lCountryCode);
391  // DEBUG
392  //OPENTREP_LOG_DEBUG ("Country code: " << _location.getCountryCode());
393  }
394 
395  // //////////////////////////////////////////////////////////////////
397  : ParserSemanticAction (ioLocation) {
398  }
399 
400  // //////////////////////////////////////////////////////////////////
401  void storeAltCountryCode::operator() (std::vector<uchar_t> iChar,
402  bsq::unused_type,
403  bsq::unused_type) const {
404  const std::string lCountryCodeStr (iChar.begin(), iChar.end());
405  const CountryCode_T lCountryCode (lCountryCodeStr);
406  _location.setAltCountryCode (lCountryCode);
407  // DEBUG
408  //OPENTREP_LOG_DEBUG ("Alt country code: " << _location.getAltCountryCode());
409  }
410 
411  // //////////////////////////////////////////////////////////////////
413  : ParserSemanticAction (ioLocation) {
414  }
415 
416  // //////////////////////////////////////////////////////////////////
417  void storeCountryName::operator() (std::vector<uchar_t> iChar,
418  bsq::unused_type,
419  bsq::unused_type) const {
420  const std::string lCountryNameStr (iChar.begin(), iChar.end());
421  const CountryName_T lCountryName (lCountryNameStr);
422  _location.setCountryName (lCountryName);
423  // DEBUG
424  //OPENTREP_LOG_DEBUG ("Country name: " << _location.getCountryName());
425  }
426 
427  // //////////////////////////////////////////////////////////////////
429  : ParserSemanticAction (ioLocation) {
430  }
431 
432  // //////////////////////////////////////////////////////////////////
433  void storeContinentName::operator() (std::vector<uchar_t> iChar,
434  bsq::unused_type,
435  bsq::unused_type) const {
436  const std::string lContinentNameStr (iChar.begin(), iChar.end());
437  const ContinentName_T lContinentName (lContinentNameStr);
438  _location.setContinentName (lContinentName);
439  // DEBUG
440  //OPENTREP_LOG_DEBUG ("Continent name: " << _location.getContinentName());
441  }
442 
443  // //////////////////////////////////////////////////////////////////
445  : ParserSemanticAction (ioLocation) {
446  }
447 
448  // //////////////////////////////////////////////////////////////////
449  void storeAdm1Code::operator() (std::vector<uchar_t> iChar,
450  bsq::unused_type,
451  bsq::unused_type) const {
452  const std::string lAdmCodeStr (iChar.begin(), iChar.end());
453  const Admin1Code_T lAdmCode (lAdmCodeStr);
454  _location.setAdmin1Code (lAdmCode);
455  // DEBUG
456  //OPENTREP_LOG_DEBUG ("Adm1 code: " << _location.getAdmin1Code());
457  }
458 
459  // //////////////////////////////////////////////////////////////////
461  : ParserSemanticAction (ioLocation) {
462  }
463 
464  // //////////////////////////////////////////////////////////////////
465  void storeAdm1UtfName::operator() (std::vector<uchar_t> iChar,
466  bsq::unused_type,
467  bsq::unused_type) const {
468  const std::string lAdmNameStr (iChar.begin(), iChar.end());
469  const Admin1UTFName_T lAdmName (lAdmNameStr);
470  _location.setAdmin1UtfName (lAdmName);
471  // DEBUG
472  //OPENTREP_LOG_DEBUG ("Adm1 UTF8 name: " << _location.getAdmin1UtfName());
473  }
474 
475  // //////////////////////////////////////////////////////////////////
477  : ParserSemanticAction (ioLocation) {
478  }
479 
480  // //////////////////////////////////////////////////////////////////
481  void storeAdm1AsciiName::operator() (std::vector<uchar_t> iChar,
482  bsq::unused_type,
483  bsq::unused_type) const {
484  const std::string lAdmNameStr (iChar.begin(), iChar.end());
485  const Admin1ASCIIName_T lAdmName (lAdmNameStr);
486  _location.setAdmin1AsciiName (lAdmName);
487  // DEBUG
488  //OPENTREP_LOG_DEBUG("Adm1 ASCII name: "<< _location.getAdmin1AsciiName());
489  }
490 
491  // //////////////////////////////////////////////////////////////////
493  : ParserSemanticAction (ioLocation) {
494  }
495 
496  // //////////////////////////////////////////////////////////////////
497  void storeAdm2Code::operator() (std::vector<uchar_t> iChar,
498  bsq::unused_type,
499  bsq::unused_type) const {
500  const std::string lAdmCodeStr (iChar.begin(), iChar.end());
501  const Admin2Code_T lAdmCode (lAdmCodeStr);
502  _location.setAdmin2Code (lAdmCode);
503  // DEBUG
504  //OPENTREP_LOG_DEBUG ("Adm2 code: " << _location.getAdmin2Code());
505  }
506 
507  // //////////////////////////////////////////////////////////////////
509  : ParserSemanticAction (ioLocation) {
510  }
511 
512  // //////////////////////////////////////////////////////////////////
513  void storeAdm2UtfName::operator() (std::vector<uchar_t> iChar,
514  bsq::unused_type,
515  bsq::unused_type) const {
516  const std::string lAdmNameStr (iChar.begin(), iChar.end());
517  const Admin2UTFName_T lAdmName (lAdmNameStr);
518  _location.setAdmin2UtfName (lAdmName);
519  // DEBUG
520  //OPENTREP_LOG_DEBUG ("Adm2 UTF8 name: " << _location.getAdmin2UtfName());
521  }
522 
523  // //////////////////////////////////////////////////////////////////
525  : ParserSemanticAction (ioLocation) {
526  }
527 
528  // //////////////////////////////////////////////////////////////////
529  void storeAdm2AsciiName::operator() (std::vector<uchar_t> iChar,
530  bsq::unused_type,
531  bsq::unused_type) const {
532  const std::string lAdmNameStr (iChar.begin(), iChar.end());
533  const Admin2ASCIIName_T lAdmName (lAdmNameStr);
534  _location.setAdmin2AsciiName (lAdmName);
535  // DEBUG
536  //OPENTREP_LOG_DEBUG("Adm2 ASCII name: "<< _location.getAdmin2AsciiName());
537  }
538 
539  // //////////////////////////////////////////////////////////////////
541  : ParserSemanticAction (ioLocation) {
542  }
543 
544  // //////////////////////////////////////////////////////////////////
545  void storeAdm3Code::operator() (std::vector<uchar_t> iChar,
546  bsq::unused_type,
547  bsq::unused_type) const {
548  const std::string lAdmCodeStr (iChar.begin(), iChar.end());
549  const Admin3Code_T lAdmCode (lAdmCodeStr);
550  _location.setAdmin3Code (lAdmCode);
551  // DEBUG
552  //OPENTREP_LOG_DEBUG ("Adm3 code: " << _location.getAdmin3Code());
553  }
554 
555  // //////////////////////////////////////////////////////////////////
557  : ParserSemanticAction (ioLocation) {
558  }
559 
560  // //////////////////////////////////////////////////////////////////
561  void storeAdm4Code::operator() (std::vector<uchar_t> iChar,
562  bsq::unused_type,
563  bsq::unused_type) const {
564  const std::string lAdmCodeStr (iChar.begin(), iChar.end());
565  const Admin4Code_T lAdmCode (lAdmCodeStr);
566  _location.setAdmin4Code (lAdmCode);
567  // DEBUG
568  //OPENTREP_LOG_DEBUG ("Adm4 code: " << _location.getAdmin4Code());
569  }
570 
571  // //////////////////////////////////////////////////////////////////
573  : ParserSemanticAction (ioLocation) {
574  }
575 
576  // //////////////////////////////////////////////////////////////////
577  void storePopulation::operator() (unsigned int iPopulation,
578  bsq::unused_type, bsq::unused_type) const {
579  _location.setPopulation (iPopulation);
580  // DEBUG
581  //OPENTREP_LOG_DEBUG ("Population: " << _location.getPopulation());
582  }
583 
584  // //////////////////////////////////////////////////////////////////
586  : ParserSemanticAction (ioLocation) {
587  }
588 
589  // //////////////////////////////////////////////////////////////////
590  void storeElevation::operator() (int iElevation,
591  bsq::unused_type, bsq::unused_type) const {
592  _location.setElevation (iElevation);
593  // DEBUG
594  //OPENTREP_LOG_DEBUG ("Elevation: " << _location.getElevation());
595  }
596 
597  // //////////////////////////////////////////////////////////////////
599  : ParserSemanticAction (ioLocation) {
600  }
601 
602  // //////////////////////////////////////////////////////////////////
603  void storeGTopo30::operator() (int iGTopo30,
604  bsq::unused_type, bsq::unused_type) const {
605  _location.setGTopo30 (iGTopo30);
606  // DEBUG
607  //OPENTREP_LOG_DEBUG ("GTopo30: " << _location.getGTopo30());
608  }
609 
610  // //////////////////////////////////////////////////////////////////
612  : ParserSemanticAction (ioLocation) {
613  }
614 
615  // //////////////////////////////////////////////////////////////////
616  void storeTimeZone::operator() (std::vector<uchar_t> iChar,
617  bsq::unused_type,
618  bsq::unused_type) const {
619  const std::string lTimeZoneStr (iChar.begin(), iChar.end());
620  const TimeZone_T lTimeZone (lTimeZoneStr);
621  _location.setTimeZone (lTimeZone);
622  // DEBUG
623  //OPENTREP_LOG_DEBUG ("Time-zone code: " << _location.getTimeZone());
624  }
625 
626  // //////////////////////////////////////////////////////////////////
628  : ParserSemanticAction (ioLocation) {
629  }
630 
631  // //////////////////////////////////////////////////////////////////
632  void storeGMTOffset::operator() (float iOffset,
633  bsq::unused_type, bsq::unused_type) const {
634  _location.setGMTOffset (iOffset);
635  // DEBUG
636  //OPENTREP_LOG_DEBUG ("GMT offset: " << _location.getGMTOffset());
637  }
638 
639  // //////////////////////////////////////////////////////////////////
641  : ParserSemanticAction (ioLocation) {
642  }
643 
644  // //////////////////////////////////////////////////////////////////
645  void storeDSTOffset::operator() (float iOffset,
646  bsq::unused_type, bsq::unused_type) const {
647  _location.setDSTOffset (iOffset);
648  // DEBUG
649  //OPENTREP_LOG_DEBUG ("DST offset: " << _location.getDSTOffset());
650  }
651 
652  // //////////////////////////////////////////////////////////////////
654  : ParserSemanticAction (ioLocation) {
655  }
656 
657  // //////////////////////////////////////////////////////////////////
658  void storeRawOffset::operator() (float iOffset,
659  bsq::unused_type, bsq::unused_type) const {
660  _location.setRawOffset (iOffset);
661  // DEBUG
662  //OPENTREP_LOG_DEBUG ("Raw offset: " << _location.getRawOffset());
663  }
664 
665  // //////////////////////////////////////////////////////////////////
667  : ParserSemanticAction (ioLocation) {
668  }
669 
670  // //////////////////////////////////////////////////////////////////
671  void storeModDate::operator() (bsq::unused_type,
672  bsq::unused_type, bsq::unused_type) const {
673  const OPENTREP::Date_T& lModDate = _location.calculateDate();
674  _location.setModificationDate (lModDate);
675  // DEBUG
676  //OPENTREP_LOG_DEBUG ("Modification date: " << _location.getModificationDate());
677  }
678 
679  // //////////////////////////////////////////////////////////////////
681  : ParserSemanticAction (ioLocation) {
682  }
683 
684  // //////////////////////////////////////////////////////////////////
685  void storeCityCode::operator() (std::vector<uchar_t> iChar,
686  bsq::unused_type, bsq::unused_type) const {
687 
688  const std::string lCityCodeStr (iChar.begin(), iChar.end());
689  const OPENTREP::CityCode_T lCityCode (lCityCodeStr);
690  _location._itCityIataCode = lCityCode;
691  // DEBUG
692  //OPENTREP_LOG_DEBUG ("City code: " << _location._itCityIataCode);
693  }
694 
695  // //////////////////////////////////////////////////////////////////
697  : ParserSemanticAction (ioLocation) {
698  }
699 
700  // //////////////////////////////////////////////////////////////////
701  void storeCityGeonamesID::operator() (unsigned int iCtyId,
702  bsq::unused_type,
703  bsq::unused_type) const {
704  _location._itCityGeonamesID = iCtyId;
705  // DEBUG
706  //OPENTREP_LOG_DEBUG("City Geonames ID: " << _location._itCityGeonamesID);
707  }
708 
709  // //////////////////////////////////////////////////////////////////
711  : ParserSemanticAction (ioLocation) {
712  }
713 
714  // //////////////////////////////////////////////////////////////////
715  void storeCityUtfName::operator() (std::vector<uchar_t> iChar,
716  bsq::unused_type,
717  bsq::unused_type) const {
718 
719  const std::string lCityUtfNameStr (iChar.begin(), iChar.end());
720  const OPENTREP::CityUTFName_T lCityUtfName (lCityUtfNameStr);
721  _location._itCityUtfName = lCityUtfName;
722  // DEBUG
723  //OPENTREP_LOG_DEBUG ("City UTF8 name: " << _location._itCityUtfName);
724  }
725 
726  // //////////////////////////////////////////////////////////////////
728  : ParserSemanticAction (ioLocation) {
729  }
730 
731  // //////////////////////////////////////////////////////////////////
732  void storeCityAsciiName::operator() (std::vector<uchar_t> iChar,
733  bsq::unused_type,
734  bsq::unused_type) const {
735 
736  const std::string lCityAsciiNameStr (iChar.begin(), iChar.end());
737  const OPENTREP::CityASCIIName_T lCityAsciiName (lCityAsciiNameStr);
738  _location._itCityAsciiName = lCityAsciiName;
739  // DEBUG
740  //OPENTREP_LOG_DEBUG("City ASCII name: " << _location._itCityAsciiName);
741  }
742 
743  // //////////////////////////////////////////////////////////////////
745  : ParserSemanticAction (ioLocation) {
746  }
747 
748  // //////////////////////////////////////////////////////////////////
749  void storeCityCountryCode::operator() (std::vector<uchar_t> iChar,
750  bsq::unused_type,
751  bsq::unused_type) const {
752 
753  const std::string lCityCountryCodeStr (iChar.begin(), iChar.end());
754  const OPENTREP::CountryCode_T lCityCountryCode (lCityCountryCodeStr);
755  _location._itCityCountryCode = lCityCountryCode;
756  // DEBUG
757  //OPENTREP_LOG_DEBUG("City country code: "<< _location._itCityCountryCode);
758  }
759 
760  // //////////////////////////////////////////////////////////////////
762  : ParserSemanticAction (ioLocation) {
763  }
764 
765  // //////////////////////////////////////////////////////////////////
766  void storeCityStateCode::operator() (std::vector<uchar_t> iChar,
767  bsq::unused_type,
768  bsq::unused_type) const {
769 
770  const std::string lCityStateCodeStr (iChar.begin(), iChar.end());
771  const OPENTREP::StateCode_T lCityStateCode (lCityStateCodeStr);
772  _location._itCityStateCode = lCityStateCode;
773  // DEBUG
774  //OPENTREP_LOG_DEBUG ("City state code: " << _location._itCityStateCode);
775  }
776 
777  // //////////////////////////////////////////////////////////////////
779  : ParserSemanticAction (ioLocation) {
780  }
781 
782  // //////////////////////////////////////////////////////////////////
783  void storeStateCode::operator() (std::vector<uchar_t> iChar,
784  bsq::unused_type, bsq::unused_type) const {
785 
786  const std::string lStateCodeStr (iChar.begin(), iChar.end());
787  const OPENTREP::StateCode_T lStateCode (lStateCodeStr);
788  _location.setStateCode (lStateCode);
789  // DEBUG
790  //OPENTREP_LOG_DEBUG ("State code: " << _location.getStateCode());
791  }
792 
793  // //////////////////////////////////////////////////////////////////
795  : ParserSemanticAction (ioLocation) {
796  }
797 
798  // //////////////////////////////////////////////////////////////////
799  void storeWAC::operator() (unsigned int iWAC,
800  bsq::unused_type, bsq::unused_type) const {
801  _location.setWAC (iWAC);
802  // DEBUG
803  //OPENTREP_LOG_DEBUG ("WAC: " << _location.getWAC());
804  }
805 
806  // //////////////////////////////////////////////////////////////////
808  : ParserSemanticAction (ioLocation) {
809  }
810 
811  // //////////////////////////////////////////////////////////////////
812  void storeWACName::operator() (std::vector<uchar_t> iChar,
813  bsq::unused_type, bsq::unused_type) const {
814  const std::string lWACNameStr (iChar.begin(), iChar.end());
815  const OPENTREP::WACName_T lWACName (lWACNameStr);
816  _location.setWACName (lWACName);
817  // DEBUG
818  //OPENTREP_LOG_DEBUG ("WAC name: " << _location.getWACName());
819  }
820 
821  // //////////////////////////////////////////////////////////////////
823  : ParserSemanticAction (ioLocation) {
824  }
825 
826  // //////////////////////////////////////////////////////////////////
827  void storeCurrencyCode::operator() (std::vector<uchar_t> iChar,
828  bsq::unused_type,
829  bsq::unused_type) const {
830  const std::string lCurrencyCodeStr (iChar.begin(), iChar.end());
831  const OPENTREP::CurrencyCode_T lCurrencyCode (lCurrencyCodeStr);
832  _location.setCurrencyCode (lCurrencyCode);
833  // DEBUG
834  //OPENTREP_LOG_DEBUG ("Currency code: " << _location.getCurrencyCode());
835  }
836 
837  // //////////////////////////////////////////////////////////////////
839  : ParserSemanticAction (ioLocation) {
840  }
841 
842  // //////////////////////////////////////////////////////////////////
843  void storePORType::operator() (std::vector<uchar_t> iChar,
844  bsq::unused_type, bsq::unused_type) const {
845  const std::string lIATATypeStr (iChar.begin(), iChar.end());
846  const IATAType lIATAType (lIATATypeStr);
847  _location.setIataType (lIATAType);
848  // DEBUG
849  //OPENTREP_LOG_DEBUG ("IATA type: " << _location.getIataType());
850  }
851 
852  // //////////////////////////////////////////////////////////////////
854  : ParserSemanticAction (ioLocation) {
855  }
856 
857  // //////////////////////////////////////////////////////////////////
858  void storeWikiLink::operator() (std::vector<uchar_t> iChar,
859  bsq::unused_type, bsq::unused_type) const {
860 
861  const std::string lWikiLinkStr (iChar.begin(), iChar.end());
862  const OPENTREP::WikiLink_T lWikiLink (lWikiLinkStr);
863  _location.setWikiLink (lWikiLink);
864  // DEBUG
865  // OPENTREP_LOG_DEBUG ("Wiki link: " << _location.getWikiLink());
866  }
867 
868  // //////////////////////////////////////////////////////////////////
870  : ParserSemanticAction (ioLocation) {
871  }
872 
873  // //////////////////////////////////////////////////////////////////
874  void storeGeonameLatitude::operator() (double iLatitude,
875  bsq::unused_type,
876  bsq::unused_type) const {
877  _location.setGeonameLatitude (iLatitude);
878  // DEBUG
879  //OPENTREP_LOG_DEBUG ("Geoname latitude: " << _location.getGeonameLatitude());
880  }
881 
882  // //////////////////////////////////////////////////////////////////
884  : ParserSemanticAction (ioLocation) {
885  }
886 
887  // //////////////////////////////////////////////////////////////////
888  void storeGeonameLongitude::operator() (double iLongitude,
889  bsq::unused_type,
890  bsq::unused_type) const {
891  _location.setGeonameLongitude (iLongitude);
892 
893  // DEBUG
894  //OPENTREP_LOG_DEBUG ("Geoname longitude: " << _location.getGeonameLongitude());
895  }
896 
897  // //////////////////////////////////////////////////////////////////
899  : ParserSemanticAction (ioLocation) {
900  }
901 
902  // //////////////////////////////////////////////////////////////////
903  void storeAltLangCodeFull::operator() (std::vector<uchar_t> iChar,
904  bsq::unused_type, bsq::unused_type) const {
905 
906  const std::string lAltLangCodeStr (iChar.begin(), iChar.end());
907  const OPENTREP::LanguageCode_T lAltLangCode (lAltLangCodeStr);
908  _location._itLanguageCode = lAltLangCode;
909  // DEBUG
910  //OPENTREP_LOG_DEBUG ("Alt lang full code: " << _location._itLanguageCode);
911  }
912 
913  // //////////////////////////////////////////////////////////////////
915  : ParserSemanticAction (ioLocation) {
916  }
917 
918  // //////////////////////////////////////////////////////////////////
919  void storeAltLangCode2Char::operator() (std::vector<uchar_t> iChar,
920  bsq::unused_type, bsq::unused_type) const {
921 
922  const std::string lAltLangCodeStr (iChar.begin(), iChar.end());
923  _location._itLangCode2Char = lAltLangCodeStr;
926  // DEBUG
927  //OPENTREP_LOG_DEBUG ("Alt lang 2-char code: " << _location._itLangCode2Char);
928  }
929 
930  // //////////////////////////////////////////////////////////////////
932  : ParserSemanticAction (ioLocation) {
933  }
934 
935  // //////////////////////////////////////////////////////////////////
936  void storeAltLangCodeExt::operator() (std::vector<uchar_t> iChar,
937  bsq::unused_type, bsq::unused_type) const {
938 
939  const std::string lAltLangCodeStr (iChar.begin(), iChar.end());
940  std::ostringstream oStr;
941  oStr << _location._itLangCode2Char << "-" << lAltLangCodeStr;
942  _location._itLangCodeExt = oStr.str();
943  // DEBUG
944  //OPENTREP_LOG_DEBUG ("Alt lang 2-char code: " << _location._itLangCodeExt);
945  }
946 
947  // //////////////////////////////////////////////////////////////////
949  : ParserSemanticAction (ioLocation) {
950  }
951 
952  // //////////////////////////////////////////////////////////////////
953  void storeAltLangCodeHist::operator() (std::vector<uchar_t> iChar,
954  bsq::unused_type, bsq::unused_type) const {
955 
956  const std::string lAltLangCodeStr (iChar.begin(), iChar.end());
957  std::ostringstream oStr;
958  oStr << _location._itLangCode2Char << "_" << lAltLangCodeStr;
959  _location._itLangCodeHist = oStr.str();
960  // DEBUG
961  //OPENTREP_LOG_DEBUG ("Alt lang 2-char code: " << _location._itLangCodeHist);
962  }
963 
964  // //////////////////////////////////////////////////////////////////
966  : ParserSemanticAction (ioLocation) {
967  }
968 
969  // //////////////////////////////////////////////////////////////////
970  void storeAltName::operator() (std::vector<uchar_t> iChar,
971  bsq::unused_type, bsq::unused_type) const {
972 
973  const std::string lAltNameStr (iChar.begin(), iChar.end());
974  const OPENTREP::AltNameShortListString_T lAltName (lAltNameStr);
975  //_location.addName (_location._itLanguageCodeNum, lAltName);
977  // Reset the values
978  //_location._itLanguageCodeNum = OPENTREP::Language::LAST_VALUE;
980  // DEBUG
981  //OPENTREP_LOG_DEBUG ("Alt name: " << _location.getAltNameShortList());
982  }
983 
984 
985  // //////////////////////////////////////////////////////////////////
987  : ParserSemanticAction (ioLocation) {
988  }
989 
990  // //////////////////////////////////////////////////////////////////
991  void doEndPor::operator() (bsq::unused_type,
992  bsq::unused_type, bsq::unused_type) const {
993  // DEBUG
994  //OPENTREP_LOG_DEBUG ("Do End. Location structure: " << _location);
995  }
996 
997  // ///////////////////////////////////////////////////////////////////
998  //
999  // Utility Parsers
1000  //
1001  // ///////////////////////////////////////////////////////////////////
1002 
1005 
1008 
1011 
1014 
1018 
1021 
1025 
1030 
1035 
1038 
1040  //
1041  // (Boost Spirit) Grammar Definition
1042  //
1044 
1232  template <typename Iterator>
1233  struct LocationParser : public bsq::grammar<Iterator, bsu::blank_type> {
1234 
1235  LocationParser (Location& ioPORRule) :
1236  LocationParser::base_type(start), _location(ioPORRule) {
1237 
1238  start = bsq::eps
1239  >> *(header | por_rule);
1240 
1241  header = bsq::lit("iata_code") >> +(bsu::char_ - bsq::eoi - bsq::eol)
1242  >> (bsq::eoi | bsq::eol);
1243 
1244  por_rule = por_key
1245  >> '^' >> por_details
1246  >> '^' >> -alt_name_section
1247  >> '^' >> por_details_additional
1249 
1250  por_rule_end = bsq::eps;
1251 
1252  por_key = -iata_code
1253  >> '^' >> -icao_code
1254  >> '^' >> -faa_code
1255  >> '^' >> is_geonames
1256  >> '^' >> geoname_id
1257  >> '^' >> -envelope_id
1258  ;
1259 
1261  >> '^' >> ascii_name
1262  >> '^' >> -latitude
1263  >> '^' >> -longitude
1264  >> '^' >> feat_class
1265  >> '^' >> feat_code
1266  >> '^' >> -page_rank
1267  >> '^' >> -date_from
1268  >> '^' >> -date_end
1269  >> '^' >> -comments
1270  >> '^' >> country_code
1271  >> '^' >> -country_code2
1272  >> '^' >> country_name
1273  >> '^' >> -continent_name
1274  >> '^' >> -adm1_code
1275  >> '^' >> -adm1_name_utf
1276  >> '^' >> -adm1_name_ascii
1277  >> '^' >> -adm2_code
1278  >> '^' >> -adm2_name_utf
1279  >> '^' >> -adm2_name_ascii
1280  >> '^' >> -adm3_code
1281  >> '^' >> -adm4_code
1282  >> '^' >> -population
1283  >> '^' >> -elevation
1284  >> '^' >> -gtopo30
1285  >> '^' >> -time_zone
1286  >> '^' >> -gmt_offset
1287  >> '^' >> -dst_offset
1288  >> '^' >> -raw_offset
1289  >> '^' >> (mod_date | bsq::lit("-1"))
1290  >> '^' >> -city_code_list
1291  >> '^' >> -city_name_list
1292  >> '^' >> -city_detail_list
1294  >> '^' >> -state_code
1295  >> '^' >> por_type
1296  >> '^' >> -wiki_link
1297  ;
1298  // >> '^' >> -alt_name_short_list[storeAltNameShortListString(_location)]
1299 
1301  wac >> '^' >> wac_name >> '^' >> -ccy_code
1302  >> '^' >> -unlc_section >> '^' >> -uic_section
1303  >> '^' >> -geoname_lat >> '^' >> -geoname_lon
1304  ;
1305 
1306  iata_code =
1307  bsq::repeat(3)[bsu::char_('A', 'Z')][storeIataCode(_location)];
1308 
1309  icao_code =
1310  bsq::repeat(4)[bsu::char_("A-Z0-9")][storeIcaoCode(_location)];
1311 
1312  faa_code =
1313  bsq::repeat(1,4)[bsu::char_("A-Z0-9")][storeFaaCode(_location)];
1314 
1316 
1318 
1320 
1321  common_name =
1322  (bsq::no_skip[+~bsu::char_('^')]
1323  - (bsq::eoi|bsq::eol))[storeCommonName(_location)]
1324  ;
1325 
1326  ascii_name =
1327  (bsq::no_skip[+~bsu::char_('^')]
1328  - (bsq::eoi|bsq::eol))[storeAsciiName(_location)]
1329  ;
1330 
1332 
1333  alt_name_short =
1334  (bsq::no_skip[+~bsu::char_("^,")]
1335  - (bsq::eoi|bsq::eol))[storeAltNameShort(_location)]
1336  ;
1337 
1339 
1340  tvl_por_code =
1341  (bsq::no_skip[+~bsu::char_("^,")]
1342  - (bsq::eoi|bsq::eol))[storeTvlPORCode(_location)]
1343  ;
1344 
1345  latitude = bsq::double_[storeLatitude(_location)];
1346 
1347  longitude = bsq::double_[storeLongitude(_location)];
1348 
1349  feat_class =
1350  bsq::repeat(1)[bsu::char_("A-Z")][storeFeatureClass(_location)]
1351  ;
1352 
1353  feat_code =
1354  bsq::repeat(2,5)[bsu::char_("A-Z1-5")][storeFeatureCode(_location)]
1355  ;
1356 
1357  page_rank = bsq::double_[storePageRank(_location)];
1358 
1360 
1362 
1363  comments =
1364  (bsq::no_skip[+~bsu::char_('^')]
1365  - (bsq::eoi|bsq::eol))[storeComments(_location)]
1366  ;
1367 
1368  country_code =
1369  bsq::repeat(2,3)[bsu::char_("A-Z")][storeCountryCode(_location)]
1370  ;
1371 
1372  country_code2 =
1373  (bsq::no_skip[+~bsu::char_('^')]
1374  - (bsq::eoi|bsq::eol))[storeAltCountryCode(_location)]
1375  ;
1376 
1377  country_name =
1378  (bsq::no_skip[+~bsu::char_('^')]
1379  - (bsq::eoi|bsq::eol))[storeCountryName(_location)]
1380  ;
1381 
1382  continent_name =
1383  (bsq::no_skip[+~bsu::char_('^')]
1384  - (bsq::eoi|bsq::eol))[storeContinentName(_location)]
1385  ;
1386 
1387  adm1_code =
1388  (bsq::no_skip[+~bsu::char_('^')]
1389  - (bsq::eoi|bsq::eol))[storeAdm1Code(_location)]
1390  ;
1391 
1392  adm1_name_utf =
1393  (bsq::no_skip[+~bsu::char_('^')]
1394  - (bsq::eoi|bsq::eol))[storeAdm1UtfName(_location)]
1395  ;
1396 
1397  adm1_name_ascii =
1398  (bsq::no_skip[+~bsu::char_('^')]
1399  - (bsq::eoi|bsq::eol))[storeAdm1AsciiName(_location)]
1400  ;
1401 
1402  adm2_code =
1403  (bsq::no_skip[+~bsu::char_('^')]
1404  - (bsq::eoi|bsq::eol))[storeAdm2Code(_location)]
1405  ;
1406 
1407  adm2_name_utf =
1408  (bsq::no_skip[+~bsu::char_('^')]
1409  - (bsq::eoi|bsq::eol))[storeAdm2UtfName(_location)]
1410  ;
1411 
1412  adm2_name_ascii =
1413  (bsq::no_skip[+~bsu::char_('^')]
1414  - (bsq::eoi|bsq::eol))[storeAdm2AsciiName(_location)]
1415  ;
1416 
1417  adm3_code =
1418  (bsq::no_skip[+~bsu::char_('^')]
1419  - (bsq::eoi|bsq::eol))[storeAdm3Code(_location)]
1420  ;
1421 
1422  adm4_code =
1423  (bsq::no_skip[+~bsu::char_('^')]
1424  - (bsq::eoi|bsq::eol))[storeAdm4Code(_location)]
1425  ;
1426 
1428 
1430 
1432 
1433  time_zone =
1434  (bsq::no_skip[+~bsu::char_('^')]
1435  - (bsq::eoi|bsq::eol))[storeTimeZone(_location)]
1436  ;
1437 
1438  gmt_offset = bsq::float_[storeGMTOffset(_location)];
1439 
1440  dst_offset = bsq::float_[storeDSTOffset(_location)];
1441 
1442  raw_offset = bsq::float_[storeRawOffset(_location)];
1443 
1445 
1446  date = bsq::lexeme
1447  [year_p[boost::phoenix::ref(_location._itYear) = bsq::labels::_1]
1448  >> '-'
1449  >> month_p[boost::phoenix::ref(_location._itMonth) = bsq::labels::_1]
1450  >> '-'
1451  >> day_p[boost::phoenix::ref(_location._itDay) = bsq::labels::_1] ];
1452 
1453  city_code_list = city_code % ',';
1454 
1455  city_code =
1456  bsq::repeat(3)[bsu::char_('A', 'Z')][storeCityCode(_location)]
1457  ;
1458 
1459  city_name_list = city_name_utf % '=';
1460 
1461  city_name_utf =
1462  (bsq::no_skip[+~bsu::char_("^|=")]
1463  - (bsq::eoi|bsq::eol))[storeCityUtfName(_location)]
1464  ;
1465 
1466  city_name_ascii =
1467  (bsq::no_skip[+~bsu::char_("^|=")]
1468  - (bsq::eoi|bsq::eol))[storeCityAsciiName(_location)]
1469  ;
1470 
1472  bsq::repeat(2,3)[bsu::char_("A-Z")][storeCityCountryCode(_location)]
1473  ;
1474 
1475  city_state_code =
1476  (bsq::no_skip[+~bsu::char_('^')]
1477  - (bsq::eoi|bsq::eol))[storeCityStateCode(_location)]
1478  ;
1479 
1481 
1482  city_details =
1483  city_code
1484  >> '|' >> city_geoname_id
1485  >> '|' >> city_name_utf
1486  >> '|' >> city_name_ascii
1487  >> '|' >> -city_country_code
1488  >> '|' >> -city_state_code
1489  ;
1490 
1492 
1493  state_code =
1494  (bsq::no_skip[+~bsu::char_('^')]
1495  - (bsq::eoi|bsq::eol))[storeStateCode(_location)]
1496  ;
1497 
1499 
1500  wac_name =
1501  (bsq::no_skip[+~bsu::char_('^')]
1502  - (bsq::eoi|bsq::eol))[storeWACName(_location)]
1503  ;
1504 
1505  ccy_code =
1506  (bsq::no_skip[+~bsu::char_('^')]
1507  - (bsq::eoi|bsq::eol))[storeCurrencyCode(_location)]
1508  ;
1509 
1510  unlc_section = unlc_details % '=';
1511 
1512  unlc_details =
1513  unlocode_code >> '|' >> -unlc_qualifiers
1514  ;
1515 
1516  unlocode_code =
1517  bsq::repeat(5)[bsu::char_("A-Z0-9")][storeUNLOCode(_location)];
1518 
1519  unlc_qualifiers =
1520  bsq::repeat(1,2)[bsu::char_("hp")]
1521  ;
1522 
1523  uic_section = uic_details % '=';
1524 
1525  uic_details =
1526  uic_code >> '|' >> -uic_qualifiers
1527  ;
1528 
1530 
1531  uic_qualifiers =
1532  bsq::repeat(1,2)[bsu::char_("hp")]
1533  ;
1534 
1535  geoname_lat = bsq::double_[storeGeonameLatitude(_location)];
1536 
1537  geoname_lon = bsq::double_[storeGeonameLongitude(_location)];
1538 
1539  por_type =
1540  bsq::repeat(1,3)[bsu::char_("ABCGHOPRZ")][storePORType(_location)]
1541  ;
1542 
1543  wiki_link =
1544  (bsq::no_skip[+~bsu::char_('^')]
1545  - (bsq::eoi|bsq::eol))[storeWikiLink(_location)]
1546  ;
1547 
1549 
1551  -alt_lang_code
1552  >> '|' >> alt_name
1553  >> '|' >> -alt_name_qualifiers
1554  ;
1555 
1556  alt_lang_code =
1557  (+~bsu::char_("|=")
1558  - (bsq::eoi|bsq::eol))[storeAltLangCodeFull(_location)]
1559  ;
1560 
1562 
1564 
1565  lang_code_2char =
1566  bsq::repeat(2,4)[bsu::char_("a-z")][storeAltLangCode2Char(_location)]
1567  ;
1568 
1569  lang_code_ext =
1570  '-' >> bsq::repeat(1,4)[bsu::char_('A', 'Z')][storeAltLangCodeExt(_location)];
1571 
1572  lang_code_hist =
1573  '_' >> bsq::repeat(1,4)[bsu::char_("a-z0-9")][storeAltLangCodeHist(_location)];
1574 
1575  alt_name =
1576  (bsq::no_skip[+~bsu::char_("|=")]
1577  - (bsq::eoi|bsq::eol))[storeAltName(_location)]
1578  ;
1579 
1581  bsq::repeat(1,4)[bsu::char_("shpc")]
1582  ;
1583 
1584  //BOOST_SPIRIT_DEBUG_NODE (LocationParser);
1585  BOOST_SPIRIT_DEBUG_NODE (start);
1586  BOOST_SPIRIT_DEBUG_NODE (header);
1587  BOOST_SPIRIT_DEBUG_NODE (por_rule);
1588  BOOST_SPIRIT_DEBUG_NODE (por_rule_end);
1589  BOOST_SPIRIT_DEBUG_NODE (por_key);
1590  BOOST_SPIRIT_DEBUG_NODE (por_details);
1591  BOOST_SPIRIT_DEBUG_NODE (iata_code);
1592  BOOST_SPIRIT_DEBUG_NODE (icao_code);
1593  BOOST_SPIRIT_DEBUG_NODE (faa_code);
1594  BOOST_SPIRIT_DEBUG_NODE (geoname_id);
1595  BOOST_SPIRIT_DEBUG_NODE (envelope_id);
1596  BOOST_SPIRIT_DEBUG_NODE (is_geonames);
1597  BOOST_SPIRIT_DEBUG_NODE (common_name);
1598  BOOST_SPIRIT_DEBUG_NODE (ascii_name);
1599  BOOST_SPIRIT_DEBUG_NODE (alt_name_short_list);
1600  BOOST_SPIRIT_DEBUG_NODE (alt_name_short);
1601  BOOST_SPIRIT_DEBUG_NODE (alt_name_sep);
1602  BOOST_SPIRIT_DEBUG_NODE (tvl_por_code_list);
1603  BOOST_SPIRIT_DEBUG_NODE (tvl_por_code);
1604  BOOST_SPIRIT_DEBUG_NODE (tvl_por_sep);
1605  BOOST_SPIRIT_DEBUG_NODE (latitude);
1606  BOOST_SPIRIT_DEBUG_NODE (longitude);
1607  BOOST_SPIRIT_DEBUG_NODE (feat_class);
1608  BOOST_SPIRIT_DEBUG_NODE (feat_code);
1609  BOOST_SPIRIT_DEBUG_NODE (page_rank);
1610  BOOST_SPIRIT_DEBUG_NODE (date_from);
1611  BOOST_SPIRIT_DEBUG_NODE (date_end);
1612  BOOST_SPIRIT_DEBUG_NODE (comments);
1613  BOOST_SPIRIT_DEBUG_NODE (country_code);
1614  BOOST_SPIRIT_DEBUG_NODE (country_code2);
1615  BOOST_SPIRIT_DEBUG_NODE (country_name);
1616  BOOST_SPIRIT_DEBUG_NODE (continent_name);
1617  BOOST_SPIRIT_DEBUG_NODE (adm1_code);
1618  BOOST_SPIRIT_DEBUG_NODE (adm1_name_utf);
1619  BOOST_SPIRIT_DEBUG_NODE (adm1_name_ascii);
1620  BOOST_SPIRIT_DEBUG_NODE (adm2_code);
1621  BOOST_SPIRIT_DEBUG_NODE (adm2_name_utf);
1622  BOOST_SPIRIT_DEBUG_NODE (adm2_name_ascii);
1623  BOOST_SPIRIT_DEBUG_NODE (adm3_code);
1624  BOOST_SPIRIT_DEBUG_NODE (adm4_code);
1625  BOOST_SPIRIT_DEBUG_NODE (population);
1626  BOOST_SPIRIT_DEBUG_NODE (elevation);
1627  BOOST_SPIRIT_DEBUG_NODE (gtopo30);
1628  BOOST_SPIRIT_DEBUG_NODE (time_zone);
1629  BOOST_SPIRIT_DEBUG_NODE (gmt_offset);
1630  BOOST_SPIRIT_DEBUG_NODE (raw_offset);
1631  BOOST_SPIRIT_DEBUG_NODE (dst_offset);
1632  BOOST_SPIRIT_DEBUG_NODE (mod_date);
1633  BOOST_SPIRIT_DEBUG_NODE (date);
1634  BOOST_SPIRIT_DEBUG_NODE (city_code_list);
1635  BOOST_SPIRIT_DEBUG_NODE (city_name_list);
1636  BOOST_SPIRIT_DEBUG_NODE (city_detail_list);
1637  BOOST_SPIRIT_DEBUG_NODE (city_details);
1638  BOOST_SPIRIT_DEBUG_NODE (city_geoname_id);
1639  BOOST_SPIRIT_DEBUG_NODE (city_code);
1640  BOOST_SPIRIT_DEBUG_NODE (city_name_utf);
1641  BOOST_SPIRIT_DEBUG_NODE (city_name_ascii);
1642  BOOST_SPIRIT_DEBUG_NODE (city_country_code);
1643  BOOST_SPIRIT_DEBUG_NODE (city_state_code);
1644  BOOST_SPIRIT_DEBUG_NODE (state_code);
1645  BOOST_SPIRIT_DEBUG_NODE (por_type);
1646  BOOST_SPIRIT_DEBUG_NODE (wiki_link);
1647  BOOST_SPIRIT_DEBUG_NODE (alt_name_section);
1648  BOOST_SPIRIT_DEBUG_NODE (alt_name_details);
1649  BOOST_SPIRIT_DEBUG_NODE (alt_lang_code);
1650  BOOST_SPIRIT_DEBUG_NODE (alt_lang_code_ftd);
1651  BOOST_SPIRIT_DEBUG_NODE (alt_name);
1652  BOOST_SPIRIT_DEBUG_NODE (alt_name_qualifiers);
1653  BOOST_SPIRIT_DEBUG_NODE (lang_code_opt);
1654  BOOST_SPIRIT_DEBUG_NODE (lang_code_2char);
1655  BOOST_SPIRIT_DEBUG_NODE (lang_code_ext);
1656  BOOST_SPIRIT_DEBUG_NODE (lang_code_hist);
1657  BOOST_SPIRIT_DEBUG_NODE (por_details_additional);
1658  BOOST_SPIRIT_DEBUG_NODE (wac);
1659  BOOST_SPIRIT_DEBUG_NODE (wac_name);
1660  BOOST_SPIRIT_DEBUG_NODE (ccy_code);
1661  BOOST_SPIRIT_DEBUG_NODE (unlc_section);
1662  BOOST_SPIRIT_DEBUG_NODE (unlc_details);
1663  BOOST_SPIRIT_DEBUG_NODE (unlocode_code);
1664  BOOST_SPIRIT_DEBUG_NODE (unlc_qualifiers);
1665  BOOST_SPIRIT_DEBUG_NODE (uic_section);
1666  BOOST_SPIRIT_DEBUG_NODE (uic_details);
1667  BOOST_SPIRIT_DEBUG_NODE (uic_code);
1668  BOOST_SPIRIT_DEBUG_NODE (uic_qualifiers);
1669  BOOST_SPIRIT_DEBUG_NODE (geoname_lat);
1670  BOOST_SPIRIT_DEBUG_NODE (geoname_lon);
1671  }
1672 
1673  // Instantiation of rules
1674  bsq::rule<Iterator, bsu::blank_type>
1701 
1702  // Parser Context
1704  };
1705  }
1706 
1707 
1709  //
1710  // Entry class for the string parser
1711  //
1713 
1714  // //////////////////////////////////////////////////////////////////////
1715  PORStringParser::PORStringParser (const std::string& iString)
1716  : _string (iString) {
1717  init();
1718  }
1719 
1720  // //////////////////////////////////////////////////////////////////////
1721  void PORStringParser::init() {
1722  // Store the raw data string
1723  _location.setRawDataString (_string);
1724  }
1725 
1726  // //////////////////////////////////////////////////////////////////////
1728  }
1729 
1730  // //////////////////////////////////////////////////////////////////////
1732  // DEBUG
1733  // OPENTREP_LOG_DEBUG ("Parsing POR string: '" << _string << "'");
1734 
1735  // String to be parsed
1736  std::istringstream stringToBeParsed (_string);
1737 
1738  // Create an input iterator
1739  OPENTREP::base_iterator_t iStr (stringToBeParsed);
1740 
1741  // Convert input iterator to an iterator usable by spirit parser
1742  OPENTREP::iterator_t fwd_start(boost::spirit::make_default_multi_pass(iStr));
1743  OPENTREP::iterator_t fwd_end;
1744 
1745  // Initialise the positional iterators
1746  OPENTREP::pos_iterator_t pos_start (fwd_start, fwd_end, _string);
1747  OPENTREP::pos_iterator_t pos_end;
1748 
1749  // Initialise the parser (grammar) with the helper/staging structure.
1751 
1752  // Launch the parsing of the file and, thanks to the doEndPor
1753  // call-back structure, the building of the whole BomRoot BOM
1754  bool hasParsingBeenSuccesful = false;
1755  try {
1756 
1757  hasParsingBeenSuccesful = bsq::phrase_parse (fwd_start, fwd_end,
1758  lPORParser, bsu::blank);
1759 
1760  } catch (const bsq::expectation_failure<pos_iterator_t>& e) {
1761  const bsc::file_position_base<std::string>& pos = e.first.get_position();
1762  std::ostringstream oStr;
1763  oStr << "Parse error on POR string '" << _string
1764  << "', position " << pos.column << std::endl
1765  << "'" << e.first.get_currentline() << "'" << std::endl
1766  << std::setw(pos.column) << " " << "^- here";
1767  OPENTREP_LOG_ERROR (oStr.str());
1768  throw PorFileParsingException (oStr.str());
1769  }
1770 
1771  if (hasParsingBeenSuccesful == false) {
1772  OPENTREP_LOG_ERROR ("Parsing of POR input string: '" << _string
1773  << "' failed");
1774  throw PorFileParsingException ("Parsing of POR input string: '"
1775  + _string + "' failed");
1776  }
1777 
1778  if (fwd_start != fwd_end) {
1779  OPENTREP_LOG_ERROR ("Parsing of POR input string: '" << _string
1780  << "' failed");
1781  throw PorFileParsingException ("Parsing of POR input file: '"
1782  + _string + "' failed");
1783  }
1784 
1785  //
1786  if (hasParsingBeenSuccesful == true && fwd_start == fwd_end) {
1787  // DEBUG
1788  /*
1789  OPENTREP_LOG_DEBUG ("Parsing of POR input string: '" << _string
1790  << "' succeeded");
1791  */
1792  }
1793 
1794  return _location;
1795  }
1796 
1797 
1799  //
1800  // Entry class for the file parser
1801  //
1803 
1804  // //////////////////////////////////////////////////////////////////////
1806  : _filename (iFilename) {
1807  init();
1808  }
1809 
1810  // //////////////////////////////////////////////////////////////////////
1811  void PORFileParser::init() {
1812  }
1813 
1814  // //////////////////////////////////////////////////////////////////////
1816 
1817  OPENTREP_LOG_DEBUG ("Parsing the POR input file: " << _filename);
1818 
1819  // File to be parsed
1820  const char* lFilenameStr = _filename.c_str();
1821  std::ifstream fileToBeParsed (lFilenameStr, std::ios_base::in);
1822 
1823  // Check if the filename exist and can be open
1824  if (fileToBeParsed.is_open() == false) {
1825  OPENTREP_LOG_ERROR ("The POR file ('" << _filename << "') can not be open."
1826  << std::endl);
1827 
1828  throw FileNotFoundException ("The '" + _filename
1829  + "' file does not exist or can not be read");
1830  }
1831 
1832  // Create an input iterator
1833  OPENTREP::base_iterator_t iStr (fileToBeParsed);
1834 
1835  // Convert input iterator to an iterator usable by spirit parser
1836  OPENTREP::iterator_t start (boost::spirit::make_default_multi_pass (iStr));
1838 
1839  // Initialise the parser (grammar) with the helper/staging structure.
1841 
1842  // Launch the parsing of the file and, thanks to the doEndPor
1843  // call-back structure, the building of the whole BomRoot BOM
1844  const bool hasParsingBeenSuccesful =
1845  bsq::phrase_parse (start, end, lPORParser, bsu::blank);
1846 
1847  if (hasParsingBeenSuccesful == false) {
1848  OPENTREP_LOG_ERROR ("Parsing of POR input file ('" << _filename
1849  << "') failed");
1850  throw PorFileParsingException ("Parsing of POR input file ('"
1851  + _filename + "') failed");
1852  }
1853 
1854  if (start != end) {
1855  OPENTREP_LOG_ERROR ("Parsing of POR input file ('" << _filename
1856  << "') failed");
1857  throw PorFileParsingException ("Parsing of POR input file ('"
1858  + _filename + "') failed");
1859  }
1860 
1861  if (hasParsingBeenSuccesful == true && start == end) {
1862  OPENTREP_LOG_DEBUG ("Parsing of POR input file ('" << _filename
1863  << "') succeeded");
1864  }
1865  }
1866 
1867 }
#define OPENTREP_LOG_ERROR(iToBeLogged)
Definition: Logger.hpp:24
#define OPENTREP_LOG_DEBUG(iToBeLogged)
Definition: Logger.hpp:33
PORFileParser(const PORFilePath_T &iFilename)
PORStringParser(const std::string &iString)
const Location & generateLocation()
OPENTREP::uint1_p_t uint1_p
OPENTREP::int1_2_p_t int1_2_p
OPENTREP::minute_p_t minute_p
OPENTREP::uint4_p_t uint4_p
OPENTREP::month_p_t month_p
OPENTREP::int1_5_p_t int1_5_p
OPENTREP::second_p_t second_p
OPENTREP::uint1_9_p_t uint1_9_p
OPENTREP::uint2_p_t uint2_p
OPENTREP::boolean_p_t boolean_p
OPENTREP::uint1_4_p_t uint1_4_p
OPENTREP::uint0_9_p_t uint0_9_p
OPENTREP::int0_5_p_t int0_5_p
boost::spirit::qi::uint_parser< int, 10, 1, 4 > uint1_4_p_t
boost::spirit::qi::uint_parser< hour_t, 10, 2, 2 > hour_p_t
boost::spirit::qi::uint_parser< int, 10, 1, 1 > uint1_p_t
boost::spirit::qi::uint_parser< int, 10, 0, 9 > uint0_9_p_t
boost::spirit::qi::uint_parser< int, 10, 2, 2 > uint2_p_t
boost::spirit::multi_pass< base_iterator_t > iterator_t
boost::spirit::qi::uint_parser< month_t, 10, 2, 2 > month_p_t
boost::spirit::qi::int_parser< int, 10, 0, 5 > int0_5_p_t
boost::spirit::qi::uint_parser< int, 10, 1, 9 > uint1_9_p_t
boost::spirit::qi::uint_parser< minute_t, 10, 2, 2 > minute_p_t
boost::spirit::qi::uint_parser< int, 10, 4, 4 > uint4_p_t
boost::spirit::qi::uint_parser< year_t, 10, 4, 4 > year_p_t
boost::gregorian::date Date_T
boost::spirit::qi::uint_parser< day_t, 10, 2, 2 > day_p_t
std::istreambuf_iterator< char > base_iterator_t
boost::spirit::qi::uint_parser< second_t, 10, 2, 2 > second_p_t
boost::spirit::qi::bool_parser< bool, short_bool_policies > boolean_p_t
boost::spirit::classic::position_iterator2< iterator_t > pos_iterator_t
boost::spirit::qi::uint_parser< int, 10, 1, 2 > int1_2_p_t
boost::spirit::qi::int_parser< int, 10, 1, 5 > int1_5_p_t
Enumeration of place/location types with respect to their use for transportation purposes.
Definition: IATAType.hpp:42
Structure modelling a (geographical) location.
Definition: Location.hpp:25
void consolidateAltNameShortListString()
Definition: Location.cpp:385
void setCommonName(const std::string &iName)
Definition: Location.hpp:527
Date_T calculateDate() const
Definition: Location.cpp:320
void setPopulation(const Population_T &iPopulation)
Definition: Location.hpp:765
void setCountryCode(const std::string &iCountryCode)
Definition: Location.hpp:590
LanguageCode_T _itLanguageCode
Definition: Location.hpp:1431
void setAdmin2AsciiName(const std::string &iAdminName)
Definition: Location.hpp:744
void setIataType(const IATAType &iIATAType)
Definition: Location.hpp:484
void setIataCode(const std::string &iIataCode)
Definition: Location.hpp:477
AltNameShortList_T _itAltNameShortList
Definition: Location.hpp:1435
void setFaaCode(const std::string &iFaaCode)
Definition: Location.hpp:505
void setDSTOffset(const DSTOffset_T &iOffset)
Definition: Location.hpp:667
void setLongitude(const Longitude_T &iLongitude)
Definition: Location.hpp:688
void setAdmin2UtfName(const std::string &iAdminName)
Definition: Location.hpp:737
void setGTopo30(const GTopo30_T &iGTopo30)
Definition: Location.hpp:779
void setDateEnd(const Date_T &iDate)
Definition: Location.hpp:569
void setModificationDate(const Date_T &iModDate)
Definition: Location.hpp:793
void setRawDataString(const std::string &iRawDataString)
Definition: Location.hpp:889
void setFeatureCode(const std::string &iFeatCode)
Definition: Location.hpp:702
void setAdmin3Code(const std::string &iAdminCode)
Definition: Location.hpp:751
void setStateCode(const std::string &iStateCode)
Definition: Location.hpp:611
IATACodeList_T _itTvlPORList
Definition: Location.hpp:1440
std::string _itCityIataCode
Definition: Location.hpp:1445
void addUNLOCode(const UNLOCode_T &iUNLOCode)
Definition: Location.hpp:512
void setAdmin4Code(const std::string &iAdminCode)
Definition: Location.hpp:758
void setFeatureClass(const std::string &iFeatClass)
Definition: Location.hpp:695
std::string _itCityUtfName
Definition: Location.hpp:1447
void setElevation(const Elevation_T &iElevation)
Definition: Location.hpp:772
GeonamesID_T _itCityGeonamesID
Definition: Location.hpp:1446
void setIcaoCode(const std::string &iIcaoCode)
Definition: Location.hpp:498
void setCurrencyCode(const std::string &iCurrencyCode)
Definition: Location.hpp:632
void setGeonameLatitude(const Latitude_T &iLatitude)
Definition: Location.hpp:807
std::string _itLangCodeExt
Definition: Location.hpp:1433
std::string _itLangCodeHist
Definition: Location.hpp:1434
void setWikiLink(const std::string &iWikiLink)
Definition: Location.hpp:800
void setAdmin1AsciiName(const std::string &iAdminName)
Definition: Location.hpp:723
std::string _itLangCode2Char
Definition: Location.hpp:1432
void setCountryName(const std::string &iCountryName)
Definition: Location.hpp:604
void setAdmin1UtfName(const std::string &iAdminName)
Definition: Location.hpp:716
void setGeonameLongitude(const Longitude_T &iLongitude)
Definition: Location.hpp:814
void setTimeZone(const std::string &iTimeZone)
Definition: Location.hpp:653
void addUICCode(const UICCode_T &iUICCode)
Definition: Location.hpp:519
void setAdmin1Code(const std::string &iAdminCode)
Definition: Location.hpp:709
std::string _itCityAsciiName
Definition: Location.hpp:1448
void consolidateCityDetailsList()
Definition: Location.cpp:374
void consolidateTvlPORListString()
Definition: Location.cpp:403
void setAltCountryCode(const std::string &iCountryCode)
Definition: Location.hpp:597
void setEnvelopeID(const EnvelopeID_T &iEnvelopeID)
Definition: Location.hpp:555
void setPageRank(const PageRank_T &iPageRank)
Definition: Location.hpp:786
void setGeonamesID(const GeonamesID_T &iGeonamesID)
Definition: Location.hpp:491
void setDateFrom(const Date_T &iDate)
Definition: Location.hpp:562
void setWACName(const std::string &iWACName)
Definition: Location.hpp:625
void setAsciiName(const std::string &iName)
Definition: Location.hpp:534
void setAdmin2Code(const std::string &iAdminCode)
Definition: Location.hpp:730
void setRawOffset(const RawOffset_T &iOffset)
Definition: Location.hpp:674
void setContinentName(const std::string &iContinentName)
Definition: Location.hpp:646
std::string _itCityCountryCode
Definition: Location.hpp:1449
void setWAC(const WAC_T &iWAC)
Definition: Location.hpp:618
std::string _itCityStateCode
Definition: Location.hpp:1450
void setGMTOffset(const GMTOffset_T &iOffset)
Definition: Location.hpp:660
void addName(const LanguageCode_T &iLanguageCode, const std::string &iName)
Definition: Location.hpp:824
void setLatitude(const Latitude_T &iLatitude)
Definition: Location.hpp:681
bsq::rule< Iterator, bsu::blank_type > time_zone
bsq::rule< Iterator, bsu::blank_type > uic_code
bsq::rule< Iterator, bsu::blank_type > lang_code_2char
bsq::rule< Iterator, bsu::blank_type > wac
bsq::rule< Iterator, bsu::blank_type > por_type
bsq::rule< Iterator, bsu::blank_type > city_geoname_id
bsq::rule< Iterator, bsu::blank_type > mod_date
bsq::rule< Iterator, bsu::blank_type > lang_code_ext
bsq::rule< Iterator, bsu::blank_type > elevation
bsq::rule< Iterator, bsu::blank_type > gtopo30
bsq::rule< Iterator, bsu::blank_type > comments
bsq::rule< Iterator, bsu::blank_type > uic_section
bsq::rule< Iterator, bsu::blank_type > is_geonames
bsq::rule< Iterator, bsu::blank_type > por_details_additional
bsq::rule< Iterator, bsu::blank_type > adm1_code
bsq::rule< Iterator, bsu::blank_type > latitude
bsq::rule< Iterator, bsu::blank_type > alt_name_sep
bsq::rule< Iterator, bsu::blank_type > city_name_list
bsq::rule< Iterator, bsu::blank_type > geoname_lon
bsq::rule< Iterator, bsu::blank_type > unlocode_code
bsq::rule< Iterator, bsu::blank_type > por_details
bsq::rule< Iterator, bsu::blank_type > iata_code
bsq::rule< Iterator, bsu::blank_type > ascii_name
bsq::rule< Iterator, bsu::blank_type > feat_code
bsq::rule< Iterator, bsu::blank_type > tvl_por_sep
bsq::rule< Iterator, bsu::blank_type > page_rank
bsq::rule< Iterator, bsu::blank_type > city_country_code
bsq::rule< Iterator, bsu::blank_type > country_code2
bsq::rule< Iterator, bsu::blank_type > wiki_link
bsq::rule< Iterator, bsu::blank_type > city_state_code
bsq::rule< Iterator, bsu::blank_type > tvl_por_code_list
bsq::rule< Iterator, bsu::blank_type > lang_code_hist
bsq::rule< Iterator, bsu::blank_type > country_name
bsq::rule< Iterator, bsu::blank_type > alt_name
bsq::rule< Iterator, bsu::blank_type > unlc_section
bsq::rule< Iterator, bsu::blank_type > state_code
bsq::rule< Iterator, bsu::blank_type > adm1_name_ascii
bsq::rule< Iterator, bsu::blank_type > city_details
bsq::rule< Iterator, bsu::blank_type > country_code
bsq::rule< Iterator, bsu::blank_type > longitude
bsq::rule< Iterator, bsu::blank_type > geoname_lat
bsq::rule< Iterator, bsu::blank_type > alt_lang_code
bsq::rule< Iterator, bsu::blank_type > date_end
bsq::rule< Iterator, bsu::blank_type > common_name
bsq::rule< Iterator, bsu::blank_type > alt_lang_code_ftd
bsq::rule< Iterator, bsu::blank_type > feat_class
bsq::rule< Iterator, bsu::blank_type > alt_name_short_list
bsq::rule< Iterator, bsu::blank_type > alt_name_short
bsq::rule< Iterator, bsu::blank_type > wac_name
bsq::rule< Iterator, bsu::blank_type > alt_name_details
bsq::rule< Iterator, bsu::blank_type > city_name_utf
bsq::rule< Iterator, bsu::blank_type > lang_code_opt
bsq::rule< Iterator, bsu::blank_type > adm2_code
bsq::rule< Iterator, bsu::blank_type > por_rule_end
bsq::rule< Iterator, bsu::blank_type > city_name_ascii
bsq::rule< Iterator, bsu::blank_type > adm3_code
bsq::rule< Iterator, bsu::blank_type > gmt_offset
bsq::rule< Iterator, bsu::blank_type > envelope_id
bsq::rule< Iterator, bsu::blank_type > continent_name
bsq::rule< Iterator, bsu::blank_type > city_detail_list
bsq::rule< Iterator, bsu::blank_type > adm4_code
bsq::rule< Iterator, bsu::blank_type > unlc_qualifiers
bsq::rule< Iterator, bsu::blank_type > raw_offset
bsq::rule< Iterator, bsu::blank_type > por_rule
bsq::rule< Iterator, bsu::blank_type > date_from
bsq::rule< Iterator, bsu::blank_type > ccy_code
bsq::rule< Iterator, bsu::blank_type > adm1_name_utf
bsq::rule< Iterator, bsu::blank_type > uic_qualifiers
bsq::rule< Iterator, bsu::blank_type > tvl_por_code
bsq::rule< Iterator, bsu::blank_type > geoname_id
bsq::rule< Iterator, bsu::blank_type > population
bsq::rule< Iterator, bsu::blank_type > header
bsq::rule< Iterator, bsu::blank_type > faa_code
bsq::rule< Iterator, bsu::blank_type > adm2_name_utf
bsq::rule< Iterator, bsu::blank_type > icao_code
bsq::rule< Iterator, bsu::blank_type > por_key
bsq::rule< Iterator, bsu::blank_type > date
bsq::rule< Iterator, bsu::blank_type > adm2_name_ascii
bsq::rule< Iterator, bsu::blank_type > city_code
bsq::rule< Iterator, bsu::blank_type > city_code_list
bsq::rule< Iterator, bsu::blank_type > alt_name_qualifiers
bsq::rule< Iterator, bsu::blank_type > dst_offset
bsq::rule< Iterator, bsu::blank_type > alt_name_section
bsq::rule< Iterator, bsu::blank_type > start
bsq::rule< Iterator, bsu::blank_type > unlc_details
bsq::rule< Iterator, bsu::blank_type > uic_details
void operator()(boost::spirit::qi::unused_type, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< boost::uint32_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< boost::uint32_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< boost::uint32_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< boost::uint32_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(boost::spirit::qi::unused_type, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< boost::uint32_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(boost::spirit::qi::unused_type, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(unsigned int, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(float, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(boost::spirit::qi::unused_type, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(boost::spirit::qi::unused_type, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(int, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(unsigned int, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(float, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(int, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(double, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(double, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(unsigned int, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(double, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(double, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(boost::spirit::qi::unused_type, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(double, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(unsigned int, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(float, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(boost::spirit::qi::unused_type, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(unsigned int iUICCode, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(std::vector< uchar_t >, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const
void operator()(unsigned int, boost::spirit::qi::unused_type, boost::spirit::qi::unused_type) const