TravelCCM Logo  0.5.3
C++ Travel Customer Choice Model Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
TRAVELCCM_Service.hpp
Go to the documentation of this file.
1 #ifndef __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
2 #define __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // StdAir
8 #include <stdair/stdair_basic_types.hpp>
9 #include <stdair/stdair_service_types.hpp>
10 #include <stdair/bom/TravelSolutionTypes.hpp>
11 // TravelCCM
13 
15 namespace stdair {
16  class STDAIR_Service;
17  struct BasLogParams;
18  struct BasDBParams;
19  struct BookingRequestStruct;
20 }
21 
22 namespace TRAVELCCM {
23 
25  class TRAVELCCM_ServiceContext;
26 
27 
32  public:
33  // ////////// Constructors and destructors //////////
49  TRAVELCCM_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
50 
62  TRAVELCCM_Service (const stdair::BasLogParams&);
63 
79  TRAVELCCM_Service (stdair::STDAIR_ServicePtr_T);
80 
85 
86 
87  public:
88  // ///////////// Business methods /////////////////
92  void buildSampleBom();
93 
112  void buildSampleTravelSolutions (stdair::TravelSolutionList_T&);
113 
142  stdair::BookingRequestStruct
143  buildSampleBookingRequest (const bool isForCRS = false);
144 
159  const stdair::TravelSolutionStruct*
160  chooseTravelSolution (stdair::TravelSolutionList_T&,
161  const stdair::BookingRequestStruct&);
162 
163 
164  public:
165  // //////////////// Display support methods /////////////////
173  std::string csvDisplay() const;
174 
182  std::string csvDisplay (const stdair::TravelSolutionList_T&) const;
183 
184 
185  private:
186  // /////// Construction and Destruction helper methods ///////
195 
205  stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
206  const stdair::BasDBParams&);
207 
216  stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
217 
226  void addStdAirService (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
227  const bool iOwnStdairService);
228 
233  void initServiceContext();
234 
241  void initTravelCCMService();
242 
246  void finalise();
247 
248  private:
249  // ///////// Service Context /////////
253  TRAVELCCM_ServiceContext* _travelccmServiceContext;
254  };
255 }
256 #endif // __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP