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

InventoryBuilder.hpp

Go to the documentation of this file.
00001 #ifndef __AIRINV_CMD_INVENTORYBUILDER_HPP
00002 #define __AIRINV_CMD_INVENTORYBUILDER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // StdAir
00008 #include <stdair/command/CmdAbstract.hpp>
00009 // AirInv
00010 #include <airinv/AIRINV_Types.hpp>
00011 
00013 namespace stdair {
00014   class BomRoot;
00015   class Inventory;
00016   class FlightDate;
00017   class LegDate;
00018   class LegCabin;
00019   class Bucket;
00020   class SegmentDate;
00021   class SegmentCabin;
00022   class FareFamily;
00023   struct ParsedKey;
00024   class BookingClass;
00025 }
00026 
00027 namespace AIRINV {
00028 
00030   struct FlightDateStruct;
00031   struct LegStruct;
00032   struct LegCabinStruct;
00033   struct BucketStruct;
00034   struct SegmentStruct;
00035   struct SegmentCabinStruct;
00036   struct FareFamilyStruct;
00037   struct BookingClassStruct;
00038   namespace InventoryParserHelper {
00039     struct doEndFlightDate;
00040   }
00041   
00045   class InventoryBuilder : public stdair::CmdAbstract {
00051     friend class AIRINV_Service;
00052     friend struct InventoryParserHelper::doEndFlightDate;
00053 
00054   private:
00059     static void buildInventory (stdair::BomRoot&, const FlightDateStruct&);
00060     
00065     static void buildFlightDate (stdair::Inventory&, const FlightDateStruct&);
00066 
00071     static void buildLegDate (stdair::FlightDate&, const LegStruct&); 
00072 
00076     static void buildRoutingLegKey (stdair::FlightDate&);
00077     
00082     static void buildLegCabin (stdair::LegDate&, const LegCabinStruct&);
00083 
00088     static void buildBucket (stdair::LegCabin&, const BucketStruct&);
00089 
00094     static void buildSegmentDate (stdair::FlightDate&, const SegmentStruct&);
00095 
00100     static void buildSegmentCabin (stdair::SegmentDate&,
00101                                    const SegmentCabinStruct&);
00102 
00107     static void buildFareFamily (stdair::SegmentCabin&,
00108                                  const FareFamilyStruct&);
00109 
00114     static void buildBookingClass (stdair::FareFamily&,
00115                                    const BookingClassStruct&);
00116 
00120     static void buildPartnerInventories (stdair::BomRoot&);
00121 
00125     static void buildPartnerInventories (stdair::BomRoot&,
00126                                          stdair::Inventory&);
00127 
00131     static void buildPartnerInventories (stdair::BomRoot&,
00132                                          stdair::Inventory&,
00133                                          stdair::FlightDate&);
00134     
00135  
00136     static void buildInventory (stdair::BomRoot&,
00137                                 stdair::Inventory&,
00138                                 const std::string& iFullKeyStr);
00139 
00140     static void buildFlightDate (stdair::BomRoot&,
00141                                  stdair::Inventory&,
00142                                  const std::string& iFullKeyStr);
00143 
00151     static stdair::FlightDate& cloneFlightDate (const stdair::FlightDate&);  
00152  
00160     static stdair::LegDate& cloneLegDate (const stdair::LegDate&);
00161   
00169     static stdair::LegCabin& cloneLegCabin (const stdair::LegCabin&);
00170  
00178     static stdair::Bucket& cloneBucket (const stdair::Bucket&);
00179  
00187     static stdair::SegmentDate& cloneSegmentDate (const stdair::SegmentDate&); 
00188 
00196     static void linkBookingClassesWithSegment (stdair::SegmentDate&,
00197                                                stdair::SegmentCabin&);
00198  
00206     static stdair::SegmentCabin& cloneSegmentCabin (const stdair::SegmentCabin&);
00207   
00215     static stdair::FareFamily& cloneFareFamily (const stdair::FareFamily&);
00216      
00224     static stdair::BookingClass& cloneBookingClass (const stdair::BookingClass&);
00225     
00226   };
00227 
00228 }
00229 #endif // __AIRINV_CMD_INVENTORYBUILDER_HPP