AirInv Logo  1.00.0
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InventoryManager.hpp
Go to the documentation of this file.
1 #ifndef __AIRINV_CMD_INVENTORYMANAGER_HPP
2 #define __AIRINV_CMD_INVENTORYMANAGER_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/RMEventTypes.hpp>
12 #include <stdair/bom/BomIDTypes.hpp>
13 // SEvMgr
14 #include <sevmgr/SEVMGR_Types.hpp>
15 
16 // Forward declarations
17 namespace stdair {
18  class BomRoot;
19  class Inventory;
20  class FlightDate;
21  class SegmentDate;
22  class SegmentCabin;
23  class EventQueue;
24  struct TravelSolutionStruct;
25 }
26 
27 namespace AIRINV {
28 
29  // //////////////// Type definitions ////////////////
30  typedef std::map<const stdair::Date_T,
31  stdair::SegmentCabin*> DepartureDateSegmentCabinMap_T;
32  typedef std::map<const std::string,
34 
37  friend class AIRINV_Master_Service;
38  friend class AIRINV_Service;
39 
40  private:
42  static void initSnapshotEvents (SEVMGR::SEVMGR_ServicePtr_T,
43  const stdair::Date_T&,
44  const stdair::Date_T&);
45 
47  static void initRMEvents (const stdair::Inventory&, stdair::RMEventList_T&,
48  const stdair::Date_T&, const stdair::Date_T&);
49 
51  static void addRMEventsToEventQueue (SEVMGR::SEVMGR_ServicePtr_T,
52  stdair::RMEventList_T&);
53 
55  static void calculateAvailability (const stdair::BomRoot&,
56  stdair::TravelSolutionStruct&);
57 
59  static void calculateAvailabilityByAU (stdair::TravelSolutionStruct&);
60 
62  static void calculateAvailabilityByRAE (stdair::TravelSolutionStruct&);
63 
68  static void calculateAvailabilityByIBP (stdair::TravelSolutionStruct&);
69 
76  static void calculateAvailabilityByProtectiveIBP (stdair::TravelSolutionStruct&);
77 
79  static bool sell (stdair::Inventory&, const std::string& iSegmentDateKey,
80  const stdair::ClassCode_T&, const stdair::PartySize_T&);
81 
83  static bool sell (const stdair::BookingClassID_T&,
84  const stdair::PartySize_T&);
85 
87  static bool cancel (stdair::Inventory&, const std::string& iSegmentDateKey,
88  const stdair::ClassCode_T&, const stdair::PartySize_T&);
89 
91  static bool cancel (const stdair::BookingClassID_T&,
92  const stdair::PartySize_T&);
93 
95  static void takeSnapshots (const stdair::Inventory&,
96  const stdair::DateTime_T&);
97 
99  static void updateBookingControls (stdair::FlightDate&);
100 
102  static void recalculateAvailability (stdair::FlightDate&);
103 
104  public:
107  static void createDirectAccesses (const stdair::BomRoot&);
108  static void createDirectAccesses (const stdair::BomRoot&,
109  stdair::Inventory&);
110  static void createDirectAccesses (const stdair::BomRoot&,
111  stdair::Inventory&, stdair::FlightDate&);
112  static void createDirectAccesses (stdair::SegmentDate&);
113 
116  static void createPartnerAccesses (const stdair::BomRoot&,
117  stdair::Inventory&);
118  static void createPartnerAccesses (stdair::FlightDate&);
119  static void createPartnerAccesses (const stdair::BomRoot&,
120  stdair::Inventory&, stdair::FlightDate&);
121 
122 
125  static void buildSimilarSegmentCabinSets (const stdair::BomRoot&);
126  static void buildSimilarSegmentCabinSets (stdair::Inventory&);
127  static void buildSegmentSnapshotTable (stdair::Inventory&,
128  const stdair::TableID_T&,
130 
131 
133  static void setDefaultBidPriceVector (stdair::BomRoot&);
134  static void setDefaultBidPriceVector (stdair::Inventory&);
135 
137  static void initialiseYieldBasedNestingStructures (const stdair::BomRoot&);
138 
140  static void initialiseListsOfUsablePolicies (const stdair::BomRoot&);
141 
142  private:
144  InventoryManager() {}
147  ~InventoryManager() {}
148  };
149 
150 }
151 #endif // __AIRINV_CMD_INVENTORYMANAGER_HPP