StdAir Logo  0.43.0
C++ Standard Airline IT Library
BomRetriever.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_BOMRETRIEVER_HPP
00002 #define __STDAIR_BOM_BOMRETRIEVER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iosfwd>
00009 // StdAir
00010 #include <stdair/stdair_basic_types.hpp>
00011 #include <stdair/stdair_date_time_types.hpp>
00012 #include <stdair/bom/DatePeriod.hpp>
00013 
00014 namespace stdair {
00015 
00017   class BomRoot;
00018   struct InventoryKey;
00019   class Inventory;
00020   struct FlightDateKey;
00021   class FlightDate;
00022   class LegDate;
00023   struct SegmentDateKey;
00024   class SegmentDate;
00025   class LegCabin;
00026   class SegmentCabin;
00027   class FareFamily;
00028   class BookingClass;
00029   class DatePeriod;
00030   class AirportPair;
00031 
00035   class BomRetriever {
00036   public:
00037     // //////////////// Key management support methods /////////////////
00050     static Inventory*
00051     retrieveInventoryFromLongKey (const BomRoot&,
00052                                   const std::string& iFullKeyStr);
00053 
00061     static Inventory* retrieveInventoryFromKey (const BomRoot&,
00062                                                 const InventoryKey&);
00063 
00071     static Inventory* retrieveInventoryFromKey (const BomRoot&,
00072                                                 const AirlineCode_T&);
00073 
00086     static FlightDate*
00087     retrieveFlightDateFromLongKey (const BomRoot&,
00088                                    const std::string& iFullKeyStr);
00089 
00099     static FlightDate*
00100     retrieveFlightDateFromKeySet (const BomRoot&,
00101                                   const AirlineCode_T&, const FlightNumber_T&,
00102                                   const Date_T& iFlightDateDate);
00103 
00116     static FlightDate*
00117     retrieveFlightDateFromLongKey (const Inventory&,
00118                                    const std::string& iFullKeyStr);
00119 
00127     static FlightDate* retrieveFlightDateFromKey (const Inventory&,
00128                                                   const FlightDateKey&);
00129 
00138     static FlightDate* retrieveFlightDateFromKey (const Inventory&,
00139                                                   const FlightNumber_T&,
00140                                                   const Date_T& iFlightDateDate);
00141 
00154     static SegmentDate*
00155     retrieveSegmentDateFromLongKey (const BomRoot&,
00156                                     const std::string& iFullKeyStr);
00157 
00170     static SegmentDate*
00171     retrieveSegmentDateFromLongKey (const Inventory&,
00172                                     const std::string& iFullKeyStr);
00173 
00186     static SegmentDate*
00187     retrieveSegmentDateFromLongKey (const FlightDate&,
00188                                     const std::string& iFullKeyStr);
00189 
00197     static SegmentDate* retrieveSegmentDateFromKey (const FlightDate&,
00198                                                     const SegmentDateKey&);
00199 
00208     static SegmentDate*
00209     retrieveSegmentDateFromKey (const FlightDate&,
00210                                 const AirportCode_T& iOrigin,
00211                                 const AirportCode_T& iDestination);
00212 
00236     static BookingClass*
00237     retrieveBookingClassFromLongKey (const Inventory&,
00238                                      const std::string& iFullKeyStr,
00239                                      const ClassCode_T&);
00240 
00241     
00250     static AirportPair*
00251     retrieveAirportPairFromKeySet (const BomRoot& ,
00252                                    const stdair::AirportCode_T&,
00253                                    const stdair::AirportCode_T&);
00254 
00264     static void
00265     retrieveDatePeriodListFromKey (const AirportPair&,
00266                                     const stdair::Date_T&,
00267                                     stdair::DatePeriodList_T&);
00268 
00281     static void
00282     retrieveDatePeriodListFromKeySet (const BomRoot&,
00283                                       const stdair::AirportCode_T&,
00284                                       const stdair::AirportCode_T&,
00285                                       const stdair::Date_T&,
00286                                       stdair::DatePeriodList_T&);
00287 
00288   };
00289   
00290 }
00291 #endif // __STDAIR_BOM_BOMRETRIEVER_HPP