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