AirInv Logo  1.00.0
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InventoryHelper.hpp
Go to the documentation of this file.
1 #ifndef __AIRINV_BOM_INVENTORYHELPER_HPP
2 #define __AIRINV_BOM_INVENTORYHELPER_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // StdAir
10 #include <stdair/stdair_basic_types.hpp>
11 #include <stdair/bom/BomIDTypes.hpp>
12 
13 // Forward declarations
14 namespace stdair {
15  struct TravelSolutionStruct;
16  class Inventory;
17 }
18 
19 namespace AIRINV {
20 
24  public:
25  // ////////// Business Methods /////////
28  static void fillFromRouting (const stdair::Inventory&);
29 
31  static void calculateAvailability (const stdair::Inventory&,
32  const std::string&,
33  stdair::TravelSolutionStruct&);
34 
36  static void getYieldAndBidPrice (const stdair::Inventory&,
37  const std::string&,
38  stdair::TravelSolutionStruct&);
39 
41  static bool sell (stdair::Inventory&, const std::string& iSegmentDateKey,
42  const stdair::ClassCode_T&, const stdair::PartySize_T&);
43 
45  static bool sell (const stdair::BookingClassID_T&,
46  const stdair::PartySize_T&);
47 
49  static bool cancel (stdair::Inventory&, const std::string& iSegmentDateKey,
50  const stdair::ClassCode_T&, const stdair::PartySize_T&);
51 
53  static bool cancel (const stdair::BookingClassID_T&,
54  const stdair::PartySize_T&);
55 
57  static void takeSnapshots (const stdair::Inventory&,
58  const stdair::DateTime_T&);
59  private:
60 
62  static bool sell (stdair::BookingClass&, const stdair::PartySize_T&);
63 
65  static bool cancel (stdair::BookingClass&, const stdair::PartySize_T&);
66  };
67 
68 }
69 #endif // __AIRINV_BOM_INVENTORYHELPER_HPP