AirInv Logo  1.00.0
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InventoryBuilder.hpp
Go to the documentation of this file.
1 #ifndef __AIRINV_CMD_INVENTORYBUILDER_HPP
2 #define __AIRINV_CMD_INVENTORYBUILDER_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // StdAir
8 #include <stdair/command/CmdAbstract.hpp>
9 // AirInv
10 #include <airinv/AIRINV_Types.hpp>
11 
13 namespace stdair {
14  class BomRoot;
15  class Inventory;
16  class FlightDate;
17  class LegDate;
18  class LegCabin;
19  class Bucket;
20  class SegmentDate;
21  class SegmentCabin;
22  class FareFamily;
23  struct ParsedKey;
24  class BookingClass;
25 }
26 
27 namespace AIRINV {
28 
30  struct FlightDateStruct;
31  struct LegStruct;
32  struct LegCabinStruct;
33  struct BucketStruct;
34  struct SegmentStruct;
35  struct SegmentCabinStruct;
36  struct FareFamilyStruct;
37  struct BookingClassStruct;
38  namespace InventoryParserHelper {
39  struct doEndFlightDate;
40  }
41 
45  class InventoryBuilder : public stdair::CmdAbstract {
51  friend class AIRINV_Service;
53 
54  private:
59  static void buildInventory (stdair::BomRoot&, const FlightDateStruct&);
60 
65  static void buildFlightDate (stdair::Inventory&, const FlightDateStruct&);
66 
71  static void buildLegDate (stdair::FlightDate&, const LegStruct&);
72 
76  static void buildRoutingLegKey (stdair::FlightDate&);
77 
82  static void buildLegCabin (stdair::LegDate&, const LegCabinStruct&);
83 
88  static void buildBucket (stdair::LegCabin&, const BucketStruct&);
89 
94  static void buildSegmentDate (stdair::FlightDate&, const SegmentStruct&);
95 
100  static void buildSegmentCabin (stdair::SegmentDate&,
101  const SegmentCabinStruct&);
102 
107  static void buildFareFamily (stdair::SegmentCabin&,
108  const FareFamilyStruct&);
109 
114  static void buildBookingClass (stdair::FareFamily&,
115  const BookingClassStruct&);
116 
120  static void buildPartnerInventories (stdair::BomRoot&);
121 
125  static void buildPartnerInventories (stdair::BomRoot&,
126  stdair::Inventory&);
127 
131  static void buildPartnerInventories (stdair::BomRoot&,
132  stdair::Inventory&,
133  stdair::FlightDate&);
134 
135 
136  static void buildInventory (stdair::BomRoot&,
137  stdair::Inventory&,
138  const std::string& iFullKeyStr);
139 
140  static void buildFlightDate (stdair::BomRoot&,
141  stdair::Inventory&,
142  const std::string& iFullKeyStr);
143 
151  static stdair::FlightDate& cloneFlightDate (const stdair::FlightDate&);
152 
160  static stdair::LegDate& cloneLegDate (const stdair::LegDate&);
161 
169  static stdair::LegCabin& cloneLegCabin (const stdair::LegCabin&);
170 
178  static stdair::Bucket& cloneBucket (const stdair::Bucket&);
179 
187  static stdair::SegmentDate& cloneSegmentDate (const stdair::SegmentDate&);
188 
196  static void linkBookingClassesWithSegment (stdair::SegmentDate&,
197  stdair::SegmentCabin&);
198 
206  static stdair::SegmentCabin& cloneSegmentCabin (const stdair::SegmentCabin&);
207 
215  static stdair::FareFamily& cloneFareFamily (const stdair::FareFamily&);
216 
224  static stdair::BookingClass& cloneBookingClass (const stdair::BookingClass&);
225 
226  };
227 
228 }
229 #endif // __AIRINV_CMD_INVENTORYBUILDER_HPP