<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta name="robots" content="index,follow"/> <title>airrac/command/YieldParserHelper.cpp Source File</title> <link rel="shortcut icon" href="favicon.ico"> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="airrac.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-24983440-1']); _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table width="100%"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname"><a href="http://airrac.sourceforge.net"><img height="45px" alt="AirRAC Logo" src="airrac_logo.png"></a>  <span id="projectnumber">0.2.3</span> </div> <div id="projectbrief">C++ Simulated Revenue Accounting (RAC) System Library</div> </td> <!-- begin SOURCEFORGE_CUSTOM--> <td> <div id="sflogo"><a href="http://airrac.sourceforge.net"><img height="45px" alt="SourceForge Logo" src="sfx_logo.png"></a></div> </td> <!-- end SOURCEFORGE_CUSTOM--> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="dynsections.js"></script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('YieldParserHelper_8cpp.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">YieldParserHelper.cpp</div> </div> </div> <div class="contents"> <a href="YieldParserHelper_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// //////////////////////////////////////////////////////////////////////</span> <a name="l00002"></a>00002 <span class="comment">// Import section</span> <a name="l00003"></a>00003 <span class="comment">// //////////////////////////////////////////////////////////////////////</span> <a name="l00004"></a>00004 <span class="comment">// STL</span> <a name="l00005"></a>00005 <span class="preprocessor">#include <cassert></span> <a name="l00006"></a>00006 <span class="preprocessor">#include <fstream></span> <a name="l00007"></a>00007 <span class="preprocessor">#include <vector></span> <a name="l00008"></a>00008 <span class="comment">// StdAir</span> <a name="l00009"></a>00009 <span class="preprocessor">#include <stdair/basic/BasFileMgr.hpp></span> <a name="l00010"></a>00010 <span class="preprocessor">#include <stdair/basic/BasConst_Request.hpp></span> <a name="l00011"></a>00011 <span class="preprocessor">#include <stdair/bom/BomRoot.hpp></span> <a name="l00012"></a>00012 <span class="preprocessor">#include <stdair/service/Logger.hpp></span> <a name="l00013"></a>00013 <span class="comment">//#define BOOST_SPIRIT_DEBUG</span> <a name="l00014"></a>00014 <span class="preprocessor">#include <stdair/basic/BasParserTypes.hpp></span> <a name="l00015"></a>00015 <span class="comment">// Airrac</span> <a name="l00016"></a>00016 <span class="preprocessor">#include <<a class="code" href="YieldParserHelper_8hpp.html">airrac/command/YieldParserHelper.hpp</a>></span> <a name="l00017"></a>00017 <span class="preprocessor">#include <<a class="code" href="YieldRuleGenerator_8hpp.html">airrac/command/YieldRuleGenerator.hpp</a>></span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="keyword">namespace </span>AIRRAC { <a name="l00020"></a>00020 <a name="l00021"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html">00021</a> <span class="keyword">namespace </span>YieldParserHelper { <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00024"></a>00024 <span class="comment">// Semantic actions</span> <a name="l00025"></a>00025 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00026"></a>00026 <a name="l00027"></a>00027 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a16be569bf11e363cbbe9a7d73aadd73d">ParserSemanticAction::</a> <a name="l00028"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a16be569bf11e363cbbe9a7d73aadd73d">00028</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a16be569bf11e363cbbe9a7d73aadd73d"> ParserSemanticAction</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00029"></a>00029 : _yieldRule (ioYieldRule) { <a name="l00030"></a>00030 } <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00033"></a>00033 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYieldId.html#a40aa759704b42ede86f704d1431425a2">storeYieldId::</a> <a name="l00034"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYieldId.html#a40aa759704b42ede86f704d1431425a2">00034</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYieldId.html#a40aa759704b42ede86f704d1431425a2"> storeYieldId</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00035"></a>00035 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00036"></a>00036 } <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00039"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYieldId.html#ad7903c17b314a6a83dc884a5591c522f">00039</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYieldId.html#ad7903c17b314a6a83dc884a5591c522f">storeYieldId::operator() </a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> iYieldId, <a name="l00040"></a>00040 boost::spirit::qi::unused_type, <a name="l00041"></a>00041 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00042"></a>00042 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a3ce22f19da2c77a6700c070650e7b887">setYieldID</a> (iYieldId); <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="comment">// DEBUG</span> <a name="l00045"></a>00045 <span class="comment">//STDAIR_LOG_DEBUG ( "Yield Id: " << _yieldRule.getYieldID ());</span> <a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="keyword">const</span> stdair::AirlineCode_T lEmptyAirlineCode (<span class="stringliteral">""</span>); <a name="l00048"></a>00048 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#abcfc6331bb59e1ab8decf29ad8b06f4e">setAirlineCode</a>(lEmptyAirlineCode); <a name="l00049"></a>00049 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a5f57396deea840c5106f3a67f810a4d7">clearAirlineCodeList</a>(); <a name="l00050"></a>00050 <span class="keyword">const</span> stdair::ClassCode_T lEmptyClassCode (<span class="stringliteral">""</span>); <a name="l00051"></a>00051 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#aaf83a1b596211040a5d9b7ae51a037d9">setClassCode</a>(lEmptyClassCode); <a name="l00052"></a>00052 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a96f6a57105c3444fc8f6568ad23fea2c">clearClassCodeList</a>(); <a name="l00053"></a>00053 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ab633d46930b58ce41175180346365c29">_itSeconds</a> = 0; <a name="l00054"></a>00054 <a name="l00055"></a>00055 } <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00058"></a>00058 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeOrigin.html#a1759b8b32bf0bc7c6046d0aa059873ed">storeOrigin ::</a> <a name="l00059"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeOrigin.html#a1759b8b32bf0bc7c6046d0aa059873ed">00059</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeOrigin.html#a1759b8b32bf0bc7c6046d0aa059873ed"> storeOrigin</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00060"></a>00060 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00061"></a>00061 } <a name="l00062"></a>00062 <a name="l00063"></a>00063 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00064"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeOrigin.html#a870cefaad54eace6381664343f7205cb">00064</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeOrigin.html#a870cefaad54eace6381664343f7205cb">storeOrigin::operator() </a>(<a class="code" href="classstd_1_1vector.html" title="STL class.">std::vector<char></a> iChar, <a name="l00065"></a>00065 boost::spirit::qi::unused_type, <a name="l00066"></a>00066 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00067"></a>00067 <span class="keyword">const</span> stdair::AirportCode_T lOrigin (iChar.begin(), iChar.end()); <a name="l00068"></a>00068 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a2ee47bc321c49953e040384f27bceda4">setOrigin</a> (lOrigin); <a name="l00069"></a>00069 <span class="comment">// DEBUG</span> <a name="l00070"></a>00070 <span class="comment">//STDAIR_LOG_DEBUG ( "Origin: " << _yieldRule.getOrigin ());</span> <a name="l00071"></a>00071 } <a name="l00072"></a>00072 <a name="l00073"></a>00073 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00074"></a>00074 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDestination.html#ab6634962316691f50648e20eb9663b07">storeDestination ::</a> <a name="l00075"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDestination.html#ab6634962316691f50648e20eb9663b07">00075</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDestination.html#ab6634962316691f50648e20eb9663b07"> storeDestination</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00076"></a>00076 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00077"></a>00077 } <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00080"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDestination.html#ac92007b9daece4ec354cb6db3fc1ae26">00080</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDestination.html#ac92007b9daece4ec354cb6db3fc1ae26">storeDestination::operator() </a>(<a class="code" href="classstd_1_1vector.html" title="STL class.">std::vector<char></a> iChar, <a name="l00081"></a>00081 boost::spirit::qi::unused_type, <a name="l00082"></a>00082 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00083"></a>00083 <span class="keyword">const</span> stdair::AirportCode_T lDestination (iChar.begin(), iChar.end()); <a name="l00084"></a>00084 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#adffc0dffac56a5ce90499b64245e0062">setDestination</a> (lDestination); <a name="l00085"></a>00085 <span class="comment">// DEBUG</span> <a name="l00086"></a>00086 <span class="comment">//STDAIR_LOG_DEBUG ( "Destination: " << _yieldRule.getDestination ());</span> <a name="l00087"></a>00087 } <a name="l00088"></a>00088 <a name="l00089"></a>00089 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00090"></a>00090 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeTripType.html#af0e14e7683403d06631340e289f11329">storeTripType ::</a> <a name="l00091"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeTripType.html#af0e14e7683403d06631340e289f11329">00091</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeTripType.html#af0e14e7683403d06631340e289f11329"> storeTripType</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00092"></a>00092 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00093"></a>00093 } <a name="l00094"></a>00094 <a name="l00095"></a>00095 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00096"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeTripType.html#a9267d77a68848bb72cf398b3a8543e77">00096</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeTripType.html#a9267d77a68848bb72cf398b3a8543e77">storeTripType::operator() </a>(<a class="code" href="classstd_1_1vector.html" title="STL class.">std::vector<char></a> iChar, <a name="l00097"></a>00097 boost::spirit::qi::unused_type, <a name="l00098"></a>00098 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00099"></a>00099 <span class="keyword">const</span> stdair::TripType_T lTripType (iChar.begin(), iChar.end()); <a name="l00100"></a>00100 <span class="keywordflow">if</span> (lTripType == <span class="stringliteral">"OW"</span> || lTripType == <span class="stringliteral">"RT"</span>) { <a name="l00101"></a>00101 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a97df14aa40cd734375038941cdb6105b">setTripType</a> (lTripType); <a name="l00102"></a>00102 } <span class="keywordflow">else</span> { <a name="l00103"></a>00103 <span class="comment">// ERROR</span> <a name="l00104"></a>00104 STDAIR_LOG_ERROR (<span class="stringliteral">"Invalid trip type "</span> << lTripType); <a name="l00105"></a>00105 } <a name="l00106"></a>00106 <span class="comment">// DEBUG</span> <a name="l00107"></a>00107 <span class="comment">//STDAIR_LOG_DEBUG ("TripType: " << _yieldRule.getTripType ());</span> <a name="l00108"></a>00108 } <a name="l00109"></a>00109 <a name="l00110"></a>00110 <a name="l00111"></a>00111 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00112"></a>00112 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeStart.html#af1ed70aaaa1c1592e4260e46c8fcc349">storeDateRangeStart::</a> <a name="l00113"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeStart.html#af1ed70aaaa1c1592e4260e46c8fcc349">00113</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeStart.html#af1ed70aaaa1c1592e4260e46c8fcc349"> storeDateRangeStart</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00114"></a>00114 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00115"></a>00115 } <a name="l00116"></a>00116 <a name="l00117"></a>00117 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00118"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeStart.html#a7d1e291365659b61026f0659d9779ba8">00118</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeStart.html#a7d1e291365659b61026f0659d9779ba8">storeDateRangeStart::operator() </a>(boost::spirit::qi::unused_type, <a name="l00119"></a>00119 boost::spirit::qi::unused_type, <a name="l00120"></a>00120 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00121"></a>00121 <span class="keyword">const</span> stdair::Date_T& lDateStart = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a6b3e562bd56db86d0ebf9039b9f5bdff">calculateDate</a> (); <a name="l00122"></a>00122 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a1974fb22931ad1fc03be876121097e17">setDateRangeStart</a> (lDateStart); <a name="l00123"></a>00123 <span class="comment">// DEBUG</span> <a name="l00124"></a>00124 <span class="comment">//STDAIR_LOG_DEBUG ("Date Range Start: "<< _yieldRule.getDateRangeStart ());</span> <a name="l00125"></a>00125 } <a name="l00126"></a>00126 <a name="l00127"></a>00127 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00128"></a>00128 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeEnd.html#a5e38d15330faf1dc2622db13b118fa5a">storeDateRangeEnd::</a> <a name="l00129"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeEnd.html#a5e38d15330faf1dc2622db13b118fa5a">00129</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeEnd.html#a5e38d15330faf1dc2622db13b118fa5a"> storeDateRangeEnd</a>(<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00130"></a>00130 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00131"></a>00131 } <a name="l00132"></a>00132 <a name="l00133"></a>00133 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00134"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeEnd.html#ab160074f120a506f7aaee253584be294">00134</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeEnd.html#ab160074f120a506f7aaee253584be294">storeDateRangeEnd::operator() </a>(boost::spirit::qi::unused_type, <a name="l00135"></a>00135 boost::spirit::qi::unused_type, <a name="l00136"></a>00136 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00137"></a>00137 <span class="keyword">const</span> stdair::Date_T& lDateEnd = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a6b3e562bd56db86d0ebf9039b9f5bdff">calculateDate</a> (); <a name="l00138"></a>00138 <span class="comment">// As a Boost date period (DatePeriod_T) defines the last day of</span> <a name="l00139"></a>00139 <span class="comment">// the period to be end-date - one day, we have to add one day to that</span> <a name="l00140"></a>00140 <span class="comment">// end date before.</span> <a name="l00141"></a>00141 <span class="keyword">const</span> stdair::DateOffset_T oneDay (1); <a name="l00142"></a>00142 <span class="keyword">const</span> stdair::Date_T lBoostDateEnd = lDateEnd + oneDay; <a name="l00143"></a>00143 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a8f79d7ce67a33204b3dddf20a9a6466c">setDateRangeEnd</a> (lBoostDateEnd); <a name="l00144"></a>00144 <span class="comment">// DEBUG</span> <a name="l00145"></a>00145 <span class="comment">//STDAIR_LOG_DEBUG ("Date Range End: " << _yieldRule.getDateRangeEnd ());</span> <a name="l00146"></a>00146 } <a name="l00147"></a>00147 <a name="l00148"></a>00148 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00149"></a>00149 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeStartRangeTime.html#ad6023a105348413795a420e1b17dde84">storeStartRangeTime::</a> <a name="l00150"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeStartRangeTime.html#ad6023a105348413795a420e1b17dde84">00150</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeStartRangeTime.html#ad6023a105348413795a420e1b17dde84"> storeStartRangeTime</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00151"></a>00151 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00152"></a>00152 } <a name="l00153"></a>00153 <a name="l00154"></a>00154 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00155"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeStartRangeTime.html#af1ec65e7b973ea5ac0522bf764b6974b">00155</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeStartRangeTime.html#af1ec65e7b973ea5ac0522bf764b6974b">storeStartRangeTime::operator() </a>(boost::spirit::qi::unused_type, <a name="l00156"></a>00156 boost::spirit::qi::unused_type, <a name="l00157"></a>00157 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00158"></a>00158 <span class="keyword">const</span> stdair::Duration_T& lTimeStart = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a198539723f383fdc5f3a7cc236c3d963">calculateTime</a> (); <a name="l00159"></a>00159 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a553f2a44e5be1ef6ba7c0db3f0f206ec">setTimeRangeStart</a> (lTimeStart); <a name="l00160"></a>00160 <span class="comment">// DEBUG</span> <a name="l00161"></a>00161 <span class="comment">//STDAIR_LOG_DEBUG ("Time Range Start: " << _yieldRule.getTimeRangeStart ());</span> <a name="l00162"></a>00162 <span class="comment">// Reset the number of seconds</span> <a name="l00163"></a>00163 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ab633d46930b58ce41175180346365c29">_itSeconds</a> = 0; <a name="l00164"></a>00164 } <a name="l00165"></a>00165 <a name="l00166"></a>00166 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00167"></a>00167 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeEndRangeTime.html#a69621143044ae061550b1e0cc7371ff5">storeEndRangeTime::</a> <a name="l00168"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeEndRangeTime.html#a69621143044ae061550b1e0cc7371ff5">00168</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeEndRangeTime.html#a69621143044ae061550b1e0cc7371ff5"> storeEndRangeTime</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00169"></a>00169 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00170"></a>00170 } <a name="l00171"></a>00171 <a name="l00172"></a>00172 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00173"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeEndRangeTime.html#a9236c52fec32076dca66528c7f00dae5">00173</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeEndRangeTime.html#a9236c52fec32076dca66528c7f00dae5">storeEndRangeTime::operator() </a>(boost::spirit::qi::unused_type, <a name="l00174"></a>00174 boost::spirit::qi::unused_type, <a name="l00175"></a>00175 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00176"></a>00176 <span class="keyword">const</span> stdair::Duration_T& lTimeEnd = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a198539723f383fdc5f3a7cc236c3d963">calculateTime</a> (); <a name="l00177"></a>00177 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ae88c338249dacbdd2e7d56405b75b9ea">setTimeRangeEnd</a> (lTimeEnd); <a name="l00178"></a>00178 <span class="comment">// DEBUG</span> <a name="l00179"></a>00179 <span class="comment">//STDAIR_LOG_DEBUG ("Time Range End: " << _yieldRule.getTimeRangeEnd ());</span> <a name="l00180"></a>00180 <span class="comment">// Reset the number of seconds</span> <a name="l00181"></a>00181 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ab633d46930b58ce41175180346365c29">_itSeconds</a> = 0; <a name="l00182"></a>00182 } <a name="l00183"></a>00183 <a name="l00184"></a>00184 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00185"></a>00185 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storePOS.html#ae781a07193eacb14e6c7af8418624985">storePOS ::</a> <a name="l00186"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storePOS.html#ae781a07193eacb14e6c7af8418624985">00186</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storePOS.html#ae781a07193eacb14e6c7af8418624985"> storePOS</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00187"></a>00187 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00188"></a>00188 } <a name="l00189"></a>00189 <a name="l00190"></a>00190 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00191"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storePOS.html#afbc2a8ebb5bfedd1a75d79f92e289432">00191</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storePOS.html#afbc2a8ebb5bfedd1a75d79f92e289432">storePOS::operator() </a>(<a class="code" href="classstd_1_1vector.html" title="STL class.">std::vector<char></a> iChar, <a name="l00192"></a>00192 boost::spirit::qi::unused_type, <a name="l00193"></a>00193 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00194"></a>00194 <span class="keyword">const</span> stdair::CityCode_T lPOS (iChar.begin(), iChar.end()); <a name="l00195"></a>00195 <span class="keywordflow">if</span> (lPOS == <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a6066b08f046f73cad241c42e88b28936">getOrigin</a>() || lPOS == <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ae95efd7712d48c39171ff3b9a3cf24ec">getDestination</a>() ) { <a name="l00196"></a>00196 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ac48f223a890dd53a2a5388bcaeddaee0">setPOS</a> (lPOS); <a name="l00197"></a>00197 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lPOS == <span class="stringliteral">"ROW"</span>) { <a name="l00198"></a>00198 <span class="keyword">const</span> stdair::CityCode_T lPOSROW (<span class="stringliteral">"ROW"</span>); <a name="l00199"></a>00199 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ac48f223a890dd53a2a5388bcaeddaee0">setPOS</a> (lPOSROW); <a name="l00200"></a>00200 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lPOS == stdair::DEFAULT_POS) { <a name="l00201"></a>00201 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ac48f223a890dd53a2a5388bcaeddaee0">setPOS</a> (stdair::DEFAULT_POS); <a name="l00202"></a>00202 } <span class="keywordflow">else</span> { <a name="l00203"></a>00203 <span class="comment">// ERROR</span> <a name="l00204"></a>00204 STDAIR_LOG_ERROR (<span class="stringliteral">"Invalid point of sale "</span> << lPOS); <a name="l00205"></a>00205 } <a name="l00206"></a>00206 <span class="comment">// DEBUG</span> <a name="l00207"></a>00207 <span class="comment">//STDAIR_LOG_DEBUG ("POS: " << _yieldRule.getPOS ());</span> <a name="l00208"></a>00208 } <a name="l00209"></a>00209 <a name="l00210"></a>00210 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00211"></a>00211 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeCabinCode.html#a9e5e47cda38b3f9ea68359a69d89caf2">storeCabinCode ::</a> <a name="l00212"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeCabinCode.html#a9e5e47cda38b3f9ea68359a69d89caf2">00212</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeCabinCode.html#a9e5e47cda38b3f9ea68359a69d89caf2"> storeCabinCode</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00213"></a>00213 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00214"></a>00214 } <a name="l00215"></a>00215 <a name="l00216"></a>00216 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00217"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeCabinCode.html#a85abf77e163dacdacf05af8214e7ed2b">00217</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeCabinCode.html#a85abf77e163dacdacf05af8214e7ed2b">storeCabinCode::operator() </a>(<span class="keywordtype">char</span> iChar, <a name="l00218"></a>00218 boost::spirit::qi::unused_type, <a name="l00219"></a>00219 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00220"></a>00220 std::ostringstream ostr; <a name="l00221"></a>00221 ostr << iChar; <a name="l00222"></a>00222 <span class="keyword">const</span> std::string& cabinCodeStr = ostr.str(); <a name="l00223"></a>00223 <span class="keyword">const</span> stdair::CabinCode_T lCabinCode (cabinCodeStr); <a name="l00224"></a>00224 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a8301f7cd1dce06895a1f8801e48ed99e">setCabinCode</a> (lCabinCode); <a name="l00225"></a>00225 <a name="l00226"></a>00226 <span class="comment">// DEBUG</span> <a name="l00227"></a>00227 <span class="comment">//STDAIR_LOG_DEBUG ("Cabin Code: " << _yieldRule.getCabinCode ()); </span> <a name="l00228"></a>00228 <a name="l00229"></a>00229 } <a name="l00230"></a>00230 <a name="l00231"></a>00231 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00232"></a>00232 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeChannel.html#a186100d28bb690d991d2aa60fe987fc5">storeChannel ::</a> <a name="l00233"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeChannel.html#a186100d28bb690d991d2aa60fe987fc5">00233</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeChannel.html#a186100d28bb690d991d2aa60fe987fc5"> storeChannel</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00234"></a>00234 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00235"></a>00235 } <a name="l00236"></a>00236 <a name="l00237"></a>00237 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00238"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeChannel.html#a2b836b8613b7450e7390659afacdace7">00238</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeChannel.html#a2b836b8613b7450e7390659afacdace7">storeChannel::operator() </a>(<a class="code" href="classstd_1_1vector.html" title="STL class.">std::vector<char></a> iChar, <a name="l00239"></a>00239 boost::spirit::qi::unused_type, <a name="l00240"></a>00240 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00241"></a>00241 <span class="keyword">const</span> stdair::ChannelLabel_T lChannel (iChar.begin(), iChar.end()); <a name="l00242"></a>00242 <span class="keywordflow">if</span> (lChannel != <span class="stringliteral">"IN"</span> && lChannel != <span class="stringliteral">"IF"</span> && lChannel != <span class="stringliteral">"DN"</span> <a name="l00243"></a>00243 && lChannel != <span class="stringliteral">"DF"</span> && lChannel != stdair::DEFAULT_CHANNEL) { <a name="l00244"></a>00244 <span class="comment">// ERROR</span> <a name="l00245"></a>00245 STDAIR_LOG_ERROR (<span class="stringliteral">"Invalid channel "</span> << lChannel); <a name="l00246"></a>00246 } <a name="l00247"></a>00247 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a427ca9bbd9c93ca003f9889a84ae6bb9">setChannel</a> (lChannel); <a name="l00248"></a>00248 <span class="comment">// DEBUG</span> <a name="l00249"></a>00249 <span class="comment">//STDAIR_LOG_DEBUG ("Channel: " << _yieldRule.getChannel ());</span> <a name="l00250"></a>00250 } <a name="l00251"></a>00251 <a name="l00252"></a>00252 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00253"></a>00253 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYield.html#a9fb063c81e3692b27021e69805949ce0">storeYield::</a> <a name="l00254"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYield.html#a9fb063c81e3692b27021e69805949ce0">00254</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYield.html#a9fb063c81e3692b27021e69805949ce0"> storeYield</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00255"></a>00255 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00256"></a>00256 } <a name="l00257"></a>00257 <a name="l00258"></a>00258 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00259"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYield.html#a6335bf3f15b5953bdaad4fea0734374e">00259</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYield.html#a6335bf3f15b5953bdaad4fea0734374e">storeYield::operator() </a>(<span class="keywordtype">double</span> iYield, <a name="l00260"></a>00260 boost::spirit::qi::unused_type, <a name="l00261"></a>00261 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00262"></a>00262 <span class="keyword">const</span> stdair::YieldValue_T lYield= iYield; <a name="l00263"></a>00263 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#adfb80e77bcdf42d48859fb865a1efeed">setYield</a> (lYield); <a name="l00264"></a>00264 <span class="comment">// DEBUG</span> <a name="l00265"></a>00265 <span class="comment">//STDAIR_LOG_DEBUG ("Yield: " << _yieldRule.getYield ());</span> <a name="l00266"></a>00266 } <a name="l00267"></a>00267 <a name="l00268"></a>00268 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00269"></a>00269 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeAirlineCode.html#afb31b990576d9ad1b2fb874676e81c95">storeAirlineCode ::</a> <a name="l00270"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeAirlineCode.html#afb31b990576d9ad1b2fb874676e81c95">00270</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeAirlineCode.html#afb31b990576d9ad1b2fb874676e81c95"> storeAirlineCode</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00271"></a>00271 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00272"></a>00272 } <a name="l00273"></a>00273 <a name="l00274"></a>00274 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00275"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeAirlineCode.html#a8e6fdc6aa35167d7d3c29673ec20ec29">00275</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeAirlineCode.html#a8e6fdc6aa35167d7d3c29673ec20ec29">storeAirlineCode::operator() </a>(<a class="code" href="classstd_1_1vector.html" title="STL class.">std::vector<char></a> iChar, <a name="l00276"></a>00276 boost::spirit::qi::unused_type, <a name="l00277"></a>00277 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00278"></a>00278 <a name="l00279"></a>00279 <span class="keyword">const</span> stdair::AirlineCode_T lAirlineCode (iChar.begin(), iChar.end()); <a name="l00280"></a>00280 <span class="comment">// Update the airline code</span> <a name="l00281"></a>00281 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#abcfc6331bb59e1ab8decf29ad8b06f4e">setAirlineCode</a> (lAirlineCode); <a name="l00282"></a>00282 <span class="comment">// Insertion of this airline Code list in the whole AirlineCode name</span> <a name="l00283"></a>00283 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a5aef2490b8ccc3470412490c6ec82fa9">addAirlineCode</a> (lAirlineCode); <a name="l00284"></a>00284 <span class="comment">// DEBUG</span> <a name="l00285"></a>00285 <span class="comment">//STDAIR_LOG_DEBUG ( "Airline code: " << lAirlineCode);</span> <a name="l00286"></a>00286 } <a name="l00287"></a>00287 <a name="l00288"></a>00288 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00289"></a>00289 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeClass.html#a4f5712e6b29f3893ac4ae5e6c2ae6f29">storeClass ::</a> <a name="l00290"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeClass.html#a4f5712e6b29f3893ac4ae5e6c2ae6f29">00290</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeClass.html#a4f5712e6b29f3893ac4ae5e6c2ae6f29"> storeClass</a> (<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00291"></a>00291 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule) { <a name="l00292"></a>00292 } <a name="l00293"></a>00293 <a name="l00294"></a>00294 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00295"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeClass.html#afc62a679c4749782b18792a4cfe16a64">00295</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeClass.html#afc62a679c4749782b18792a4cfe16a64">storeClass::operator() </a>(<a class="code" href="classstd_1_1vector.html" title="STL class.">std::vector<char></a> iChar, <a name="l00296"></a>00296 boost::spirit::qi::unused_type, <a name="l00297"></a>00297 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00298"></a>00298 std::ostringstream ostr; <a name="l00299"></a>00299 <span class="keywordflow">for</span> (<a class="code" href="classstd_1_1vector_1_1const__iterator.html" title="STL iterator class.">std::vector<char>::const_iterator</a> lItVector = iChar.begin(); <a name="l00300"></a>00300 lItVector != iChar.end(); <a name="l00301"></a>00301 lItVector++) { <a name="l00302"></a>00302 ostr << *lItVector; <a name="l00303"></a>00303 } <a name="l00304"></a>00304 <span class="keyword">const</span> std::string& classCodeStr = ostr.str(); <a name="l00305"></a>00305 <span class="keyword">const</span> stdair::ClassCode_T lClassCode (classCodeStr); <a name="l00306"></a>00306 <span class="comment">// Insertion of this class Code list in the whole classCode name</span> <a name="l00307"></a>00307 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a7e32c2c2e73a773adcc0277561e0ad13">addClassCode</a> (lClassCode); <a name="l00308"></a>00308 <span class="comment">// DEBUG</span> <a name="l00309"></a>00309 <span class="comment">//STDAIR_LOG_DEBUG ("Class Code: " << classCodeStr);</span> <a name="l00310"></a>00310 } <a name="l00311"></a>00311 <a name="l00312"></a>00312 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00313"></a>00313 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1doEndYield.html#ae4b206b842ed22855fe5e3d5d2c85de7">doEndYield::</a> <a name="l00314"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1doEndYield.html#ae4b206b842ed22855fe5e3d5d2c85de7">00314</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1doEndYield.html#ae4b206b842ed22855fe5e3d5d2c85de7"> doEndYield</a> (stdair::BomRoot& ioBomRoot, <a name="l00315"></a>00315 <a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) <a name="l00316"></a>00316 : <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html">ParserSemanticAction</a> (ioYieldRule), <a name="l00317"></a>00317 _bomRoot (ioBomRoot) { <a name="l00318"></a>00318 } <a name="l00319"></a>00319 <a name="l00320"></a>00320 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00321"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1doEndYield.html#a5140fabfe442e6023f51f3da32897fea">00321</a> <span class="keywordtype">void</span> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1doEndYield.html#a5140fabfe442e6023f51f3da32897fea">doEndYield::operator() </a>(boost::spirit::qi::unused_type, <a name="l00322"></a>00322 boost::spirit::qi::unused_type, <a name="l00323"></a>00323 boost::spirit::qi::unused_type)<span class="keyword"> const </span>{ <a name="l00324"></a>00324 <span class="comment">// DEBUG</span> <a name="l00325"></a>00325 <span class="comment">// STDAIR_LOG_DEBUG ("Do End");</span> <a name="l00326"></a>00326 <span class="comment">// Generation of the yield rule object.</span> <a name="l00327"></a>00327 YieldRuleGenerator::createAirportPair (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1doEndYield.html#ae7f5b9a452bce91b1b347478e156797d">_bomRoot</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>); <a name="l00328"></a>00328 STDAIR_LOG_DEBUG (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1ParserSemanticAction.html#a3b95420c0ac090d2c573204de205ba18">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a2b007ee233d63fbfebbbb589cbb13c8a">describe</a>()); <a name="l00329"></a>00329 } <a name="l00330"></a>00330 <a name="l00331"></a>00331 <span class="comment">// ///////////////////////////////////////////////////////////////////</span> <a name="l00332"></a>00332 <span class="comment">//</span> <a name="l00333"></a>00333 <span class="comment">// Utility Parsers</span> <a name="l00334"></a>00334 <span class="comment">//</span> <a name="l00335"></a>00335 <span class="comment">// ///////////////////////////////////////////////////////////////////</span> <a name="l00337"></a>00337 <span class="comment"></span> <span class="keyword">namespace </span>bsq = boost::spirit::qi; <a name="l00338"></a>00338 <span class="keyword">namespace </span>bsa = boost::spirit::ascii; <a name="l00339"></a>00339 <a name="l00341"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a6b108c3394a46fa4b4b44daeabd5c653">00341</a> stdair::int1_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a6b108c3394a46fa4b4b44daeabd5c653">int1_p</a>; <a name="l00342"></a>00342 <a name="l00344"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a578fa8cff138949215577e039d766a2c">00344</a> stdair::uint2_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a578fa8cff138949215577e039d766a2c">uint2_p</a>; <a name="l00345"></a>00345 <a name="l00347"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a83a1cbf2d83894bd7fb96f34dd2a5c06">00347</a> stdair::uint4_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a83a1cbf2d83894bd7fb96f34dd2a5c06">uint4_p</a>; <a name="l00348"></a>00348 <a name="l00350"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a6c85b9b4addf1eb18cee53f8dec0547b">00350</a> stdair::uint1_4_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a6c85b9b4addf1eb18cee53f8dec0547b">uint1_4_p</a>; <a name="l00351"></a>00351 <a name="l00353"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#ade55520552eaaba908a16e292a0c2026">00353</a> stdair::hour_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#ade55520552eaaba908a16e292a0c2026">hour_p</a>; <a name="l00354"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a8e2c861d753c0b9297219e04ba04aab6">00354</a> stdair::minute_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a8e2c861d753c0b9297219e04ba04aab6">minute_p</a>; <a name="l00355"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#ae74242aa0e5df0d111dd22eb3f216161">00355</a> stdair::second_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#ae74242aa0e5df0d111dd22eb3f216161">second_p</a>; <a name="l00356"></a>00356 <a name="l00358"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#abb03cb8275dcc89a20d90859d15614ff">00358</a> stdair::year_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#abb03cb8275dcc89a20d90859d15614ff">year_p</a>; <a name="l00359"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a030bfebff14e283511d83da5a725de53">00359</a> stdair::month_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a030bfebff14e283511d83da5a725de53">month_p</a>; <a name="l00360"></a><a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a056c21618b3df58b31a26fac7b4c7afb">00360</a> stdair::day_p_t <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a056c21618b3df58b31a26fac7b4c7afb">day_p</a>; <a name="l00361"></a>00361 <a name="l00363"></a>00363 <span class="comment">//</span> <a name="l00364"></a>00364 <span class="comment">// (Boost Spirit) Grammar Definition</span> <a name="l00365"></a>00365 <span class="comment">//</span> <a name="l00367"></a>00367 <span class="comment"></span> <a name="l00387"></a>00387 <span class="keyword">struct </span><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html">YieldRuleParser</a> : <a name="l00388"></a>00388 <span class="keyword">public</span> boost::spirit::qi::<a class="code" href="classboost_1_1spirit_1_1qi_1_1grammar.html">grammar</a><stdair::iterator_t, <a name="l00389"></a>00389 boost::spirit::ascii::space_type> { <a name="l00390"></a>00390 <a name="l00391"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a22eaa9e6142c0ec461d3969b2b01b66f">00391</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a22eaa9e6142c0ec461d3969b2b01b66f">YieldRuleParser</a> (stdair::BomRoot& ioBomRoot, <a name="l00392"></a>00392 <a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& ioYieldRule) : <a name="l00393"></a>00393 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html">YieldRuleParser</a>::base_type(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab96a571ef60b5028a3cbf7652dd0935c">start</a>), <a name="l00394"></a>00394 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a5da698285fb150e4d127ad2a81eaa2d8">_bomRoot</a>(ioBomRoot), <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>(ioYieldRule) { <a name="l00395"></a>00395 <a name="l00396"></a>00396 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab96a571ef60b5028a3cbf7652dd0935c">start</a> = *(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ae7377b1cc362309b4ca3d589bd47dcd5">comments</a> | <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a7e2bc04b0abc1c2ff91b29bb41457895">yield_rule</a>); <a name="l00397"></a>00397 <a name="l00398"></a>00398 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ae7377b1cc362309b4ca3d589bd47dcd5">comments</a> = (bsq::lexeme[bsq::repeat(2)[bsa::char_(<span class="charliteral">'/'</span>)] <a name="l00399"></a>00399 >> +(bsa::char_ - bsq::eol) <a name="l00400"></a>00400 >> bsq::eol] <a name="l00401"></a>00401 | bsq::lexeme[bsa::char_(<span class="charliteral">'/'</span>) >>bsa::char_(<span class="charliteral">'*'</span>) <a name="l00402"></a>00402 >> +(bsa::char_ - bsa::char_(<span class="charliteral">'*'</span>)) <a name="l00403"></a>00403 >> bsa::char_(<span class="charliteral">'*'</span>) >> bsa::char_(<span class="charliteral">'/'</span>)]); <a name="l00404"></a>00404 <a name="l00405"></a>00405 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a7e2bc04b0abc1c2ff91b29bb41457895">yield_rule</a> = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a66bf2c6cb59dd06f4da3b514e01b05c8">yield_id</a> <a name="l00406"></a>00406 >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aa966644c7e967c7d8cdbcf25b26c2432">origin</a> >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af9b5c0ab74e56d0d4122d94430c740e9">destination</a> <a name="l00407"></a>00407 >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a938337b056ef449295351ee9301eeecd">tripType</a> <a name="l00408"></a>00408 >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8cd13fdf521ed7c0d75efccf1b503cbf">dateRangeStart</a> >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a9fd7da2cd7417b9589d0e2e0647853df">dateRangeEnd</a> <a name="l00409"></a>00409 >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a0c1180493c5b38f7922f5b940fa5746b">timeRangeStart</a> >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a47181d36cf114f0b0f82190b8e14485e">timeRangeEnd</a> <a name="l00410"></a>00410 >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a716635c8aabb9332ee5c80ea55c85859">point_of_sale</a> >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8638737bf24231e929ad59f2cec78454">cabinCode</a> <a name="l00411"></a>00411 >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac414afebb6a51a73f2255a76a2b8dd3c">channel</a> >> <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a3e6193b48e606fc58c716d1800661616">yield</a> <a name="l00412"></a>00412 >> +( <span class="charliteral">';'</span> >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af789f571997be5efe7c92a79c537f285">segment</a> ) <a name="l00413"></a>00413 >> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab3564234d2e1ada7503f2c059dcd8904">yield_rule_end</a>[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1doEndYield.html">doEndYield</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a5da698285fb150e4d127ad2a81eaa2d8">_bomRoot</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00414"></a>00414 ; <a name="l00415"></a>00415 <a name="l00416"></a>00416 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a66bf2c6cb59dd06f4da3b514e01b05c8">yield_id</a> = <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a6c85b9b4addf1eb18cee53f8dec0547b">uint1_4_p</a>[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYieldId.html">storeYieldId</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00417"></a>00417 <a name="l00418"></a>00418 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aa966644c7e967c7d8cdbcf25b26c2432">origin</a> = bsq::repeat(3)[bsa::char_(<span class="stringliteral">"A-Z"</span>)][<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeOrigin.html">storeOrigin</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00419"></a>00419 <a name="l00420"></a>00420 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af9b5c0ab74e56d0d4122d94430c740e9">destination</a> = <a name="l00421"></a>00421 bsq::repeat(3)[bsa::char_(<span class="stringliteral">"A-Z"</span>)][<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDestination.html">storeDestination</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00422"></a>00422 <a name="l00423"></a>00423 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a938337b056ef449295351ee9301eeecd">tripType</a> = <a name="l00424"></a>00424 bsq::repeat(2)[bsa::char_(<span class="stringliteral">"A-Z"</span>)][<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeTripType.html">storeTripType</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00425"></a>00425 <a name="l00426"></a>00426 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8cd13fdf521ed7c0d75efccf1b503cbf">dateRangeStart</a> = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8afb3e2d274c9d5a324f250386ef3351">date</a>[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeStart.html">storeDateRangeStart</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00427"></a>00427 <a name="l00428"></a>00428 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a9fd7da2cd7417b9589d0e2e0647853df">dateRangeEnd</a> = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8afb3e2d274c9d5a324f250386ef3351">date</a>[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeDateRangeEnd.html">storeDateRangeEnd</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00429"></a>00429 <a name="l00430"></a>00430 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8afb3e2d274c9d5a324f250386ef3351">date</a> = bsq::lexeme <a name="l00431"></a>00431 [<a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#abb03cb8275dcc89a20d90859d15614ff">year_p</a>[boost::phoenix::ref(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a2fd722939b04bffad16017422d2afa39">_itYear</a>) = bsq::labels::_1] <a name="l00432"></a>00432 >> <span class="charliteral">'-'</span> <a name="l00433"></a>00433 >> <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a030bfebff14e283511d83da5a725de53">month_p</a>[boost::phoenix::ref(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a5bcbeab39d2b0f471b8196f078c703fb">_itMonth</a>) = bsq::labels::_1] <a name="l00434"></a>00434 >> <span class="charliteral">'-'</span> <a name="l00435"></a>00435 >> <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a056c21618b3df58b31a26fac7b4c7afb">day_p</a>[boost::phoenix::ref(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#aa5d2de1c7ab6a336657dbd685fc857d1">_itDay</a>) = bsq::labels::_1] ]; <a name="l00436"></a>00436 <a name="l00437"></a>00437 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a0c1180493c5b38f7922f5b940fa5746b">timeRangeStart</a> = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aba1f332169a0dc2d7d660986e59f683a">time</a>[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeStartRangeTime.html">storeStartRangeTime</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00438"></a>00438 <a name="l00439"></a>00439 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a47181d36cf114f0b0f82190b8e14485e">timeRangeEnd</a> = <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aba1f332169a0dc2d7d660986e59f683a">time</a>[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeEndRangeTime.html">storeEndRangeTime</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00440"></a>00440 <a name="l00441"></a>00441 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aba1f332169a0dc2d7d660986e59f683a">time</a> = bsq::lexeme <a name="l00442"></a>00442 [<a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#ade55520552eaaba908a16e292a0c2026">hour_p</a>[boost::phoenix::ref(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#a926655e5dd38a0930ba20e3f64c7c240">_itHours</a>) = bsq::labels::_1] <a name="l00443"></a>00443 >> <span class="charliteral">':'</span> <a name="l00444"></a>00444 >> <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#a8e2c861d753c0b9297219e04ba04aab6">minute_p</a>[boost::phoenix::ref(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#abc7cd5bfe8d0fb43909d3fd916024a83">_itMinutes</a>) = bsq::labels::_1] <a name="l00445"></a>00445 >> - (<span class="charliteral">':'</span> >> <a class="code" href="namespaceAIRRAC_1_1YieldParserHelper.html#ae74242aa0e5df0d111dd22eb3f216161">second_p</a>[boost::phoenix::ref(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>.<a class="code" href="structAIRRAC_1_1YieldRuleStruct.html#ab633d46930b58ce41175180346365c29">_itSeconds</a>) = bsq::labels::_1]) ]; <a name="l00446"></a>00446 <a name="l00447"></a>00447 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a716635c8aabb9332ee5c80ea55c85859">point_of_sale</a> = bsq::repeat(3)[bsa::char_(<span class="stringliteral">"A-Z"</span>)][<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storePOS.html">storePOS</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00448"></a>00448 <a name="l00449"></a>00449 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8638737bf24231e929ad59f2cec78454">cabinCode</a> = bsa::char_(<span class="stringliteral">"A-Z"</span>)[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeCabinCode.html">storeCabinCode</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00450"></a>00450 <a name="l00451"></a>00451 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac414afebb6a51a73f2255a76a2b8dd3c">channel</a> = bsq::repeat(2)[bsa::char_(<span class="stringliteral">"A-Z"</span>)][<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeChannel.html">storeChannel</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00452"></a>00452 <a name="l00453"></a>00453 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a3e6193b48e606fc58c716d1800661616">yield</a> = bsq::double_[<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeYield.html">storeYield</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00454"></a>00454 <a name="l00455"></a>00455 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af789f571997be5efe7c92a79c537f285">segment</a> = bsq::repeat(2)[bsa::char_(<span class="stringliteral">"A-Z"</span>)][<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeAirlineCode.html">storeAirlineCode</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)] <a name="l00456"></a>00456 >> <span class="charliteral">';'</span> <a name="l00457"></a>00457 >> bsq::repeat(1,bsq::inf)[bsa::char_(<span class="stringliteral">"A-Z"</span>)][<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1storeClass.html">storeClass</a>(<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>)]; <a name="l00458"></a>00458 <a name="l00459"></a>00459 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab3564234d2e1ada7503f2c059dcd8904">yield_rule_end</a> = bsa::char_(<span class="charliteral">';'</span>); <a name="l00460"></a>00460 <a name="l00461"></a>00461 <span class="comment">// BOOST_SPIRIT_DEBUG_NODE (YieldParser);</span> <a name="l00462"></a>00462 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab96a571ef60b5028a3cbf7652dd0935c">start</a>); <a name="l00463"></a>00463 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ae7377b1cc362309b4ca3d589bd47dcd5">comments</a>); <a name="l00464"></a>00464 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a7e2bc04b0abc1c2ff91b29bb41457895">yield_rule</a>); <a name="l00465"></a>00465 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a66bf2c6cb59dd06f4da3b514e01b05c8">yield_id</a>); <a name="l00466"></a>00466 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aa966644c7e967c7d8cdbcf25b26c2432">origin</a>); <a name="l00467"></a>00467 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af9b5c0ab74e56d0d4122d94430c740e9">destination</a>); <a name="l00468"></a>00468 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a938337b056ef449295351ee9301eeecd">tripType</a>); <a name="l00469"></a>00469 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8cd13fdf521ed7c0d75efccf1b503cbf">dateRangeStart</a>); <a name="l00470"></a>00470 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a9fd7da2cd7417b9589d0e2e0647853df">dateRangeEnd</a>); <a name="l00471"></a>00471 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8afb3e2d274c9d5a324f250386ef3351">date</a>); <a name="l00472"></a>00472 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a0c1180493c5b38f7922f5b940fa5746b">timeRangeStart</a>); <a name="l00473"></a>00473 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a47181d36cf114f0b0f82190b8e14485e">timeRangeEnd</a>); <a name="l00474"></a>00474 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aba1f332169a0dc2d7d660986e59f683a">time</a>); <a name="l00475"></a>00475 BOOST_SPIRIT_DEBUG_NODE (point_of_sale); <a name="l00476"></a>00476 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8638737bf24231e929ad59f2cec78454">cabinCode</a>); <a name="l00477"></a>00477 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac414afebb6a51a73f2255a76a2b8dd3c">channel</a>); <a name="l00478"></a>00478 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a3e6193b48e606fc58c716d1800661616">yield</a>); <a name="l00479"></a>00479 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af789f571997be5efe7c92a79c537f285">segment</a>); <a name="l00480"></a>00480 BOOST_SPIRIT_DEBUG_NODE (<a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab3564234d2e1ada7503f2c059dcd8904">yield_rule_end</a>); <a name="l00481"></a>00481 <a name="l00482"></a>00482 } <a name="l00483"></a>00483 <a name="l00484"></a>00484 <span class="comment">// Instantiation of rules</span> <a name="l00485"></a>00485 boost::spirit::qi::rule<stdair::iterator_t, <a name="l00486"></a>00486 boost::spirit::ascii::space_type> <a name="l00487"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab3564234d2e1ada7503f2c059dcd8904">00487</a> <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab96a571ef60b5028a3cbf7652dd0935c">start</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ae7377b1cc362309b4ca3d589bd47dcd5">comments</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a7e2bc04b0abc1c2ff91b29bb41457895">yield_rule</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a66bf2c6cb59dd06f4da3b514e01b05c8">yield_id</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aa966644c7e967c7d8cdbcf25b26c2432">origin</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af9b5c0ab74e56d0d4122d94430c740e9">destination</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a938337b056ef449295351ee9301eeecd">tripType</a>, <a name="l00488"></a>00488 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8cd13fdf521ed7c0d75efccf1b503cbf">dateRangeStart</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a9fd7da2cd7417b9589d0e2e0647853df">dateRangeEnd</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8afb3e2d274c9d5a324f250386ef3351">date</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a0c1180493c5b38f7922f5b940fa5746b">timeRangeStart</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a47181d36cf114f0b0f82190b8e14485e">timeRangeEnd</a>, <a name="l00489"></a>00489 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#aba1f332169a0dc2d7d660986e59f683a">time</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a716635c8aabb9332ee5c80ea55c85859">point_of_sale</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a8638737bf24231e929ad59f2cec78454">cabinCode</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac414afebb6a51a73f2255a76a2b8dd3c">channel</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a3e6193b48e606fc58c716d1800661616">yield</a>, <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#af789f571997be5efe7c92a79c537f285">segment</a>, <a name="l00490"></a>00490 <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ab3564234d2e1ada7503f2c059dcd8904">yield_rule_end</a>; <a name="l00491"></a>00491 <a name="l00492"></a>00492 <span class="comment">// Parser Context</span> <a name="l00493"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a5da698285fb150e4d127ad2a81eaa2d8">00493</a> stdair::BomRoot& <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#a5da698285fb150e4d127ad2a81eaa2d8">_bomRoot</a>; <a name="l00494"></a><a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">00494</a> <a class="code" href="structAIRRAC_1_1YieldRuleStruct.html" title="Utility Structure for the parsing of Flight-Date structures.">YieldRuleStruct</a>& <a class="code" href="structAIRRAC_1_1YieldParserHelper_1_1YieldRuleParser.html#ac4cad12008508ccfe7da9851c0fa4d53">_yieldRule</a>; <a name="l00495"></a>00495 }; <a name="l00496"></a>00496 <a name="l00497"></a>00497 } <a name="l00498"></a>00498 <a name="l00499"></a>00499 <a name="l00501"></a>00501 <span class="comment">//</span> <a name="l00502"></a>00502 <span class="comment">// Entry class for the file parser</span> <a name="l00503"></a>00503 <span class="comment">//</span> <a name="l00505"></a>00505 <span class="comment"></span> <a name="l00506"></a>00506 <span class="comment">// //////////////////////////////////////////////////////////////////////</span> <a name="l00507"></a><a class="code" href="classAIRRAC_1_1YieldFileParser.html#a5bdd0add717147aa121a49882ea2126d">00507</a> <a class="code" href="classAIRRAC_1_1YieldFileParser.html#a5bdd0add717147aa121a49882ea2126d">YieldFileParser::YieldFileParser</a> (stdair::BomRoot& ioBomRoot, <a name="l00508"></a>00508 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>& iFilename) <a name="l00509"></a>00509 : _filename (iFilename), _bomRoot (ioBomRoot) { <a name="l00510"></a>00510 init(); <a name="l00511"></a>00511 } <a name="l00512"></a>00512 <a name="l00513"></a>00513 <span class="comment">// //////////////////////////////////////////////////////////////////////</span> <a name="l00514"></a>00514 <span class="keywordtype">void</span> YieldFileParser::init() { <a name="l00515"></a>00515 <a name="l00516"></a>00516 <span class="comment">// Check that the file exists and is readable</span> <a name="l00517"></a>00517 <span class="keyword">const</span> <span class="keywordtype">bool</span> doesExistAndIsReadable = <a name="l00518"></a>00518 stdair::BasFileMgr::doesExistAndIsReadable (_filename); <a name="l00519"></a>00519 <a name="l00520"></a>00520 <span class="keywordflow">if</span> (doesExistAndIsReadable == <span class="keyword">false</span>) { <a name="l00521"></a>00521 STDAIR_LOG_ERROR (<span class="stringliteral">"The yield schedule file "</span> << _filename <a name="l00522"></a>00522 << <span class="stringliteral">" does not exist or can not be read."</span>); <a name="l00523"></a>00523 <a name="l00524"></a>00524 <span class="keywordflow">throw</span> <a class="code" href="classAIRRAC_1_1YieldInputFileNotFoundException.html">YieldInputFileNotFoundException</a> (<span class="stringliteral">"The yield file "</span> + _filename + <span class="stringliteral">" does not exist or can not be read"</span>); <a name="l00525"></a>00525 } <a name="l00526"></a>00526 } <a name="l00527"></a>00527 <a name="l00528"></a>00528 <span class="comment">// //////////////////////////////////////////////////////////////////////</span> <a name="l00529"></a><a class="code" href="classAIRRAC_1_1YieldFileParser.html#a1a9d861e46a0017db6a7a8d01fed502a">00529</a> <span class="keywordtype">void</span> <a class="code" href="classAIRRAC_1_1YieldFileParser.html#a1a9d861e46a0017db6a7a8d01fed502a">YieldFileParser::generateYieldStore</a> () { <a name="l00530"></a>00530 <a name="l00531"></a>00531 STDAIR_LOG_DEBUG (<span class="stringliteral">"Parsing yield input file: "</span> << _filename); <a name="l00532"></a>00532 <a name="l00533"></a>00533 <span class="comment">// File to be parsed</span> <a name="l00534"></a>00534 std::ifstream fileToBeParsed (_filename.c_str(), std::ios_base::in); <a name="l00535"></a>00535 <a name="l00536"></a>00536 <span class="comment">// Check the filename exists and can be open</span> <a name="l00537"></a>00537 <span class="keywordflow">if</span> (fileToBeParsed == <span class="keyword">false</span>) { <a name="l00538"></a>00538 STDAIR_LOG_ERROR (<span class="stringliteral">"The yield store file "</span> << _filename <a name="l00539"></a>00539 << <span class="stringliteral">" can not be open."</span> <a name="l00540"></a>00540 << std::endl); <a name="l00541"></a>00541 <a name="l00542"></a>00542 <span class="keywordflow">throw</span> <a class="code" href="classAIRRAC_1_1YieldInputFileNotFoundException.html">YieldInputFileNotFoundException</a> (<span class="stringliteral">"The file "</span> + _filename <a name="l00543"></a>00543 + <span class="stringliteral">" does not exist or can not be read"</span>); <a name="l00544"></a>00544 } <a name="l00545"></a>00545 <a name="l00546"></a>00546 <span class="comment">// Create an input iterator</span> <a name="l00547"></a>00547 stdair::base_iterator_t inputBegin (fileToBeParsed); <a name="l00548"></a>00548 <a name="l00549"></a>00549 <span class="comment">// Convert input iterator to an iterator usable by spirit parser </span> <a name="l00550"></a>00550 stdair::iterator_t <a name="l00551"></a>00551 start (boost::spirit::make_default_multi_pass (inputBegin)); <a name="l00552"></a>00552 stdair::iterator_t end; <a name="l00553"></a>00553 <a name="l00554"></a>00554 <span class="comment">// Initialise the parser (grammar) with the helper/staging structure.</span> <a name="l00555"></a>00555 YieldParserHelper::YieldRuleParser lYParser(_bomRoot, _yieldRule); <a name="l00556"></a>00556 <a name="l00557"></a>00557 <span class="comment">// Launch the parsing of the file and, thanks to the doEndYield</span> <a name="l00558"></a>00558 <span class="comment">// call-back structure, the building of the whole BomRoot BOM</span> <a name="l00559"></a>00559 <span class="keyword">const</span> <span class="keywordtype">bool</span> hasParsingBeenSuccesful = <a name="l00560"></a>00560 boost::spirit::qi::phrase_parse (start, end, lYParser, <a name="l00561"></a>00561 boost::spirit::ascii::space); <a name="l00562"></a>00562 <a name="l00563"></a>00563 <span class="keywordflow">if</span> (hasParsingBeenSuccesful == <span class="keyword">false</span>) { <a name="l00564"></a>00564 <span class="comment">// TODO: decide whether to throw an exceqption</span> <a name="l00565"></a>00565 STDAIR_LOG_ERROR (<span class="stringliteral">"Parsing of yield input file: "</span> << _filename <a name="l00566"></a>00566 << <span class="stringliteral">" failed"</span>); <a name="l00567"></a>00567 <span class="keywordflow">throw</span> <a class="code" href="classAIRRAC_1_1YieldFileParsingFailedException.html">YieldFileParsingFailedException</a> (<span class="stringliteral">"Parsing of yield input file: "</span> <a name="l00568"></a>00568 + _filename + <span class="stringliteral">" failed"</span>); <a name="l00569"></a>00569 } <a name="l00570"></a>00570 <span class="keywordflow">if</span> (start != end) { <a name="l00571"></a>00571 <span class="comment">// TODO: decide whether to throw an exception</span> <a name="l00572"></a>00572 STDAIR_LOG_ERROR (<span class="stringliteral">"Parsing of yield input file: "</span> << _filename <a name="l00573"></a>00573 << <span class="stringliteral">" failed"</span>); <a name="l00574"></a>00574 <span class="keywordflow">throw</span> <a class="code" href="classAIRRAC_1_1YieldFileParsingFailedException.html">YieldFileParsingFailedException</a> (<span class="stringliteral">"Parsing of yield input file: "</span> <a name="l00575"></a>00575 + _filename + <span class="stringliteral">" failed"</span>); <a name="l00576"></a>00576 } <a name="l00577"></a>00577 <span class="keywordflow">if</span> (hasParsingBeenSuccesful == <span class="keyword">true</span> && start == end) { <a name="l00578"></a>00578 STDAIR_LOG_DEBUG (<span class="stringliteral">"Parsing of yield input file: "</span> << _filename <a name="l00579"></a>00579 << <span class="stringliteral">" succeeded"</span>); <a name="l00580"></a>00580 } <a name="l00581"></a>00581 <a name="l00582"></a>00582 } <a name="l00583"></a>00583 <a name="l00584"></a>00584 } </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="YieldParserHelper_8cpp.html">YieldParserHelper.cpp</a> </li> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <li class="footer">Generated on Tue Dec 6 2011 14:11:38 for AirRAC by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5 </li> <li class="footer"> <a href="http://sourceforge.net/projects/airrac"><img class="footer" src="http://sflogo.sourceforge.net/sflogo.php?group_id=317250&type=12&format=.png" alt="SourceForge Logo"></a> </li> </ul> </div> </body> </html>