<!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: airrac/AIRRAC_Service.hpp 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.1</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.4 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <script type="text/javascript"> function hasClass(ele,cls) { return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); } function addClass(ele,cls) { if (!this.hasClass(ele,cls)) ele.className += " "+cls; } function removeClass(ele,cls) { if (hasClass(ele,cls)) { var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); ele.className=ele.className.replace(reg,' '); } } function toggleVisibility(linkObj) { var base = linkObj.getAttribute('id'); var summary = document.getElementById(base + '-summary'); var content = document.getElementById(base + '-content'); var trigger = document.getElementById(base + '-trigger'); if ( hasClass(linkObj,'closed') ) { summary.style.display = 'none'; content.style.display = 'block'; trigger.src = 'open.png'; removeClass(linkObj,'closed'); addClass(linkObj,'opened'); } else if ( hasClass(linkObj,'opened') ) { summary.style.display = 'block'; content.style.display = 'none'; trigger.src = 'closed.png'; removeClass(linkObj,'opened'); addClass(linkObj,'closed'); } return false; } </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 id="searchli"> <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('AIRRAC__Service_8hpp.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">AIRRAC_Service.hpp</div> </div> </div> <div class="contents"> <a href="AIRRAC__Service_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef __AIRRAC_SVC_AIRRAC_SERVICE_HPP</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define __AIRRAC_SVC_AIRRAC_SERVICE_HPP</span> <a name="l00003"></a>00003 <span class="preprocessor"></span> <a name="l00004"></a>00004 <span class="comment">// //////////////////////////////////////////////////////////////////////</span> <a name="l00005"></a>00005 <span class="comment">// Import section</span> <a name="l00006"></a>00006 <span class="comment">// //////////////////////////////////////////////////////////////////////</span> <a name="l00007"></a>00007 <span class="comment">// StdAir</span> <a name="l00008"></a>00008 <span class="preprocessor">#include <stdair/stdair_basic_types.hpp></span> <a name="l00009"></a>00009 <span class="preprocessor">#include <stdair/stdair_service_types.hpp></span> <a name="l00010"></a>00010 <span class="preprocessor">#include <stdair/bom/TravelSolutionTypes.hpp></span> <a name="l00011"></a>00011 <span class="comment">// AirRAC</span> <a name="l00012"></a>00012 <span class="preprocessor">#include <<a class="code" href="AIRRAC__Types_8hpp.html">airrac/AIRRAC_Types.hpp</a>></span> <a name="l00013"></a>00013 <a name="l00014"></a>00014 <span class="comment">// Forward declarations.</span> <a name="l00015"></a><a class="code" href="namespacestdair.html">00015</a> <span class="keyword">namespace </span>stdair { <a name="l00016"></a>00016 <span class="keyword">class </span>STDAIR_Service; <a name="l00017"></a>00017 <span class="keyword">struct </span>BasLogParams; <a name="l00018"></a>00018 <span class="keyword">struct </span>BasDBParams; <a name="l00019"></a>00019 } <a name="l00020"></a>00020 <a name="l00021"></a><a class="code" href="namespaceAIRRAC.html">00021</a> <span class="keyword">namespace </span>AIRRAC { <a name="l00022"></a>00022 <a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="classAIRRAC_1_1AIRRAC__ServiceContext.html" title="Inner class holding the context for the AIRRAC Service object.">AIRRAC_ServiceContext</a>; <a name="l00025"></a>00025 <a name="l00029"></a><a class="code" href="classAIRRAC_1_1AIRRAC__Service.html">00029</a> <span class="keyword">class </span><a class="code" href="classAIRRAC_1_1AIRRAC__Service.html" title="Interface for the AIRRAC Services.">AIRRAC_Service</a> { <a name="l00030"></a>00030 <span class="keyword">public</span>: <a name="l00031"></a>00031 <span class="comment">// ////////////////// Constructors and Destructors //////////////////</span> <a name="l00032"></a>00032 <a name="l00044"></a>00044 <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html" title="Interface for the AIRRAC Services.">AIRRAC_Service</a> (<span class="keyword">const</span> stdair::BasLogParams&); <a name="l00045"></a>00045 <a name="l00058"></a>00058 <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html" title="Interface for the AIRRAC Services.">AIRRAC_Service</a> (<span class="keyword">const</span> stdair::BasLogParams&, <span class="keyword">const</span> stdair::BasDBParams&); <a name="l00059"></a>00059 <a name="l00075"></a>00075 <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html" title="Interface for the AIRRAC Services.">AIRRAC_Service</a> (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr); <a name="l00076"></a>00076 <a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#a6160821dd3f1d7615f4d40fe05fb0a3c">parseAndLoad</a> (<span class="keyword">const</span> <a class="code" href="classAIRRAC_1_1YieldFilePath.html">YieldFilePath</a>& iYieldFilename); <a name="l00086"></a>00086 <a name="l00087"></a>00087 <a name="l00091"></a>00091 <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#a9026376696291b107c91daa037afca8e">~AIRRAC_Service</a>(); <a name="l00092"></a>00092 <a name="l00093"></a>00093 <a name="l00094"></a>00094 <span class="keyword">public</span>: <a name="l00095"></a>00095 <span class="comment">// /////////// Business Methods /////////////</span> <a name="l00099"></a>00099 <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#ad27f8f3e426ad14e5601969bcad3dfd4">calculateYields</a> (stdair::TravelSolutionList_T&); <a name="l00100"></a>00100 <a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#abb6a17d042a47b961fcafccfa0ffe58e">updateYields</a>(); <a name="l00105"></a>00105 <a name="l00112"></a>00112 <span class="keywordtype">void</span> <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#a03d65f3cac0fb488ae3d309f09d76bff">buildSampleBom</a>(); <a name="l00113"></a>00113 <a name="l00131"></a>00131 <span class="keywordtype">void</span> <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#a4926ec141f0f069e769396e136759761">buildSampleTravelSolutions</a> (stdair::TravelSolutionList_T&); <a name="l00132"></a>00132 <a name="l00133"></a>00133 <a name="l00134"></a>00134 <span class="keyword">public</span>: <a name="l00135"></a>00135 <span class="comment">// //////////////// Display support methods /////////////////</span> <a name="l00143"></a>00143 <span class="comment"></span> std::string <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#af5ac937a8b6fad7a8a552e2ba321db27">csvDisplay</a>() <span class="keyword">const</span>; <a name="l00144"></a>00144 <a name="l00152"></a>00152 std::string <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html#af5ac937a8b6fad7a8a552e2ba321db27">csvDisplay</a> (<span class="keyword">const</span> stdair::TravelSolutionList_T&) <span class="keyword">const</span>; <a name="l00153"></a>00153 <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="keyword">private</span>: <a name="l00156"></a>00156 <span class="comment">// /////// Construction and Destruction helper methods ///////</span> <a name="l00160"></a>00160 <span class="comment"></span> <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html" title="Interface for the AIRRAC Services.">AIRRAC_Service</a>(); <a name="l00161"></a>00161 <a name="l00165"></a>00165 <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html" title="Interface for the AIRRAC Services.">AIRRAC_Service</a> (<span class="keyword">const</span> <a class="code" href="classAIRRAC_1_1AIRRAC__Service.html" title="Interface for the AIRRAC Services.">AIRRAC_Service</a>&); <a name="l00166"></a>00166 <a name="l00171"></a>00171 <span class="keywordtype">void</span> initServiceContext(); <a name="l00172"></a>00172 <a name="l00182"></a>00182 stdair::STDAIR_ServicePtr_T initStdAirService (<span class="keyword">const</span> stdair::BasLogParams&, <a name="l00183"></a>00183 <span class="keyword">const</span> stdair::BasDBParams&); <a name="l00184"></a>00184 <a name="l00193"></a>00193 stdair::STDAIR_ServicePtr_T initStdAirService (<span class="keyword">const</span> stdair::BasLogParams&); <a name="l00194"></a>00194 <a name="l00203"></a>00203 <span class="keywordtype">void</span> addStdAirService (stdair::STDAIR_ServicePtr_T, <a name="l00204"></a>00204 <span class="keyword">const</span> <span class="keywordtype">bool</span> iOwnStdairService); <a name="l00205"></a>00205 <a name="l00212"></a>00212 <span class="keywordtype">void</span> initAirracService(); <a name="l00213"></a>00213 <a name="l00222"></a>00222 <span class="keywordtype">void</span> initAirracService (<span class="keyword">const</span> <a class="code" href="classAIRRAC_1_1YieldFilePath.html">YieldFilePath</a>& iYieldFilename); <a name="l00223"></a>00223 <a name="l00227"></a>00227 <span class="keywordtype">void</span> finalise(); <a name="l00228"></a>00228 <a name="l00229"></a>00229 <a name="l00230"></a>00230 <span class="keyword">private</span>: <a name="l00231"></a>00231 <span class="comment">// ///////// Service Context /////////</span> <a name="l00235"></a>00235 <span class="comment"></span> <a class="code" href="classAIRRAC_1_1AIRRAC__ServiceContext.html" title="Inner class holding the context for the AIRRAC Service object.">AIRRAC_ServiceContext</a>* _airracServiceContext; <a name="l00236"></a>00236 }; <a name="l00237"></a>00237 } <a name="l00238"></a>00238 <span class="preprocessor">#endif // __AIRRAC_SVC_AIRRAC_SERVICE_HPP</span> </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="AIRRAC__Service_8hpp.html">AIRRAC_Service.hpp</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 Wed Nov 2 2011 23:02:18 for AirRAC by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </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>