AirInv Logo  0.1.2
C++ Simulated Airline Inventory Management System library
InventoryGenerator.hpp
Go to the documentation of this file.
00001 #ifndef __AIRINV_CMD_INVENTORYGENERATOR_HPP
00002 #define __AIRINV_CMD_INVENTORYGENERATOR_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 SegmentDate;
00020   class SegmentCabin;
00021   class FareFamily;
00022 }
00023 
00024 namespace AIRINV {
00025 
00026   // Forward declarations
00027   struct FlightPeriodStruct;
00028   struct LegStruct;
00029   struct SegmentStruct;
00030   struct LegCabinStruct;
00031   struct SegmentCabinStruct;
00032   struct FareFamilyStruct;
00033   struct BucketStruct;
00034   namespace ScheduleParserHelper {
00035     struct doEndFlight;
00036   }
00037     
00042   class InventoryGenerator : public stdair::CmdAbstract {
00048     friend class FlightPeriodFileParser;
00049     friend class FFFlightPeriodFileParser;
00050     friend struct ScheduleParserHelper::doEndFlight;
00051     friend class ScheduleParser;
00052 
00053   private:
00058     static void createFlightDate (stdair::BomRoot&,
00059                                   const FlightPeriodStruct&);
00060 
00064     static void createFlightDate (stdair::Inventory&,
00065                                   const stdair::Date_T&,
00066                                   const FlightPeriodStruct&);
00067       
00071     static stdair::LegDate& createLegDate (stdair::FlightDate&,
00072                                            const stdair::Date_T&,
00073                                            const LegStruct&);
00074 
00078     static void createLegCabin (stdair::LegDate&, const LegCabinStruct&);
00079       
00083     static void createBucket (stdair::LegCabin&, const BucketStruct&);
00084 
00088     static void createSegmentDate (stdair::FlightDate&, 
00089                                    const SegmentStruct&);
00090       
00094     static void createSegmentCabin (stdair::SegmentDate&,
00095                                     const SegmentCabinStruct&);
00096       
00100     static void createFareFamily (stdair::SegmentCabin&,
00101                                   const FareFamilyStruct&);
00102 
00106     static void createClass (stdair::FareFamily&, 
00107                              const stdair::ClassCode_T&);
00108 
00109   };
00110 
00111 }
00112 #endif // __AIRINV_CMD_INVENTORYGENERATOR_HPP