$treeview $search $mathjax
AirInv Logo  1.00.0
$projectbrief
$projectbrief
$searchbox

InventoryHelper.hpp

Go to the documentation of this file.
00001 #ifndef __AIRINV_BOM_INVENTORYHELPER_HPP
00002 #define __AIRINV_BOM_INVENTORYHELPER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <string>
00009 // StdAir
00010 #include <stdair/stdair_basic_types.hpp>
00011 #include <stdair/bom/BomIDTypes.hpp>
00012 
00013 // Forward declarations
00014 namespace stdair {
00015   struct TravelSolutionStruct;
00016   class Inventory;
00017 }
00018 
00019 namespace AIRINV {
00020   
00023   class InventoryHelper {
00024   public:
00025     // ////////// Business Methods /////////
00028     static void fillFromRouting (const stdair::Inventory&);
00029 
00031     static void calculateAvailability (const stdair::Inventory&,
00032                                        const std::string&,
00033                                        stdair::TravelSolutionStruct&);
00034 
00036     static void getYieldAndBidPrice (const stdair::Inventory&,
00037                                        const std::string&,
00038                                        stdair::TravelSolutionStruct&);
00039     
00041     static bool sell (stdair::Inventory&, const std::string& iSegmentDateKey,
00042                       const stdair::ClassCode_T&, const stdair::PartySize_T&);
00043     
00045     static bool sell (const stdair::BookingClassID_T&,
00046                       const stdair::PartySize_T&);
00047     
00049     static bool cancel (stdair::Inventory&, const std::string& iSegmentDateKey,
00050                         const stdair::ClassCode_T&, const stdair::PartySize_T&);
00051 
00053     static bool cancel (const stdair::BookingClassID_T&,
00054                         const stdair::PartySize_T&);
00055     
00057     static void takeSnapshots (const stdair::Inventory&,
00058                                const stdair::DateTime_T&);
00059   private:
00060     
00062     static bool sell (stdair::BookingClass&, const stdair::PartySize_T&);
00063 
00065     static bool cancel (stdair::BookingClass&, const stdair::PartySize_T&);
00066   };
00067 
00068 }
00069 #endif // __AIRINV_BOM_INVENTORYHELPER_HPP