$treeview $search $mathjax
TravelCCM Logo  1.00.1
$projectbrief
$projectbrief
$searchbox

TRAVELCCM_Service.hpp

Go to the documentation of this file.
00001 #ifndef __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
00002 #define __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // StdAir
00008 #include <stdair/basic/PassengerChoiceModel.hpp>
00009 #include <stdair/stdair_basic_types.hpp>
00010 #include <stdair/stdair_service_types.hpp>
00011 #include <stdair/bom/TravelSolutionTypes.hpp>
00012 // TravelCCM
00013 #include <travelccm/TRAVELCCM_Types.hpp>
00014 
00016 namespace stdair {
00017   class STDAIR_Service; 
00018   class BomRoot;
00019   struct BasLogParams;
00020   struct BasDBParams;
00021   struct BookingRequestStruct;
00022 }
00023 
00024 namespace TRAVELCCM {
00025 
00027   class TRAVELCCM_ServiceContext;
00028 
00029 
00033   class TRAVELCCM_Service {
00034   public:
00035     // ////////// Constructors and destructors //////////
00051     TRAVELCCM_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
00052 
00064     TRAVELCCM_Service (const stdair::BasLogParams&);
00065     
00081     TRAVELCCM_Service (stdair::STDAIR_ServicePtr_T);
00082     
00086     ~TRAVELCCM_Service();
00087 
00088 
00089   public:
00090     // ///////////// Business methods /////////////////
00094     void buildSampleBom(); 
00095 
00099     void clonePersistentBom ();
00100 
00105     void buildComplementaryLinks (stdair::BomRoot&);
00106 
00125     void buildSampleTravelSolutions (stdair::TravelSolutionList_T&);
00126 
00155     stdair::BookingRequestStruct
00156     buildSampleBookingRequest (const bool isForCRS = false);
00157 
00172     const stdair::TravelSolutionStruct*
00173     chooseTravelSolution (stdair::TravelSolutionList_T&,
00174                           const stdair::BookingRequestStruct&,
00175                           const stdair::PassengerChoiceModel::EN_PassengerChoiceModel& iPassengerChoiceModel =
00176                           stdair::PassengerChoiceModel::PRICE_ORIENTED);
00177     
00178 
00179   public:
00180     // //////////////// Display support methods /////////////////
00188     std::string csvDisplay() const;
00189 
00197     std::string csvDisplay (const stdair::TravelSolutionList_T&) const;
00198 
00199 
00200   private:
00201     // /////// Construction and Destruction helper methods ///////
00205     TRAVELCCM_Service();
00209     TRAVELCCM_Service (const TRAVELCCM_Service&);
00210 
00220     stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
00221                                                    const stdair::BasDBParams&);
00222     
00231     stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
00232     
00241     void addStdAirService (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00242                            const bool iOwnStdairService);
00243     
00248     void initServiceContext();
00249 
00256     void initTravelCCMService();
00257 
00261     void finalise();
00262 
00263   private:
00264     // ///////// Service Context /////////
00268     TRAVELCCM_ServiceContext* _travelccmServiceContext;
00269   };
00270 }
00271 #endif // __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP