AirInv Logo  0.1.2
C++ Simulated Airline Inventory Management System library
AIRINV_Types.hpp
Go to the documentation of this file.
00001 #ifndef __AIRINV_AIRINV_TYPES_HPP
00002 #define __AIRINV_AIRINV_TYPES_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <map>
00009 // Boost
00010 #include <boost/shared_ptr.hpp>
00011 // StdAir
00012 #include <stdair/stdair_exceptions.hpp>
00013 #include <stdair/stdair_inventory_types.hpp>
00014 
00015 namespace AIRINV {
00016 
00017   // Forward declarations
00018   class AIRINV_Service;
00019   class AIRINV_Master_Service;
00020 
00021 
00022   // ///////// Exceptions ///////////
00023 
00027   class InventoryFileParsingFailedException
00028     : public stdair::ParsingFileFailedException {
00029   public:
00033     InventoryFileParsingFailedException (const std::string& iWhat)
00034       : stdair::ParsingFileFailedException (iWhat) {}
00035   };
00036 
00040   class ScheduleFileParsingFailedException
00041     : public stdair::ParsingFileFailedException {
00042   public:
00046     ScheduleFileParsingFailedException (const std::string& iWhat)
00047       : stdair::ParsingFileFailedException (iWhat) {}
00048   };
00049   
00054   class SegmentDateNotFoundException : public stdair::ParserException {
00055   public:
00059     SegmentDateNotFoundException (const std::string& iWhat)
00060       : stdair::ParserException (iWhat) {}
00061   };
00062 
00066   class InventoryInputFileNotFoundException : public stdair::FileNotFoundException {
00067   public:
00071     InventoryInputFileNotFoundException (const std::string& iWhat)
00072       : stdair::FileNotFoundException (iWhat) {}
00073   };
00074 
00078   class ScheduleInputFileNotFoundException : public stdair::FileNotFoundException {
00079   public:
00083     ScheduleInputFileNotFoundException (const std::string& iWhat)
00084       : stdair::FileNotFoundException (iWhat) {}
00085   };
00086 
00090   class FlightDateDuplicationException : public stdair::ObjectCreationgDuplicationException {
00091   public:
00095     FlightDateDuplicationException (const std::string& iWhat) 
00096       : stdair::ObjectCreationgDuplicationException (iWhat) {} 
00097   };
00098 
00102   class BookingException : public stdair::RootException {
00103   };
00104 
00105 
00106   // //////// Type definitions /////////
00110   typedef boost::shared_ptr<AIRINV_Service> AIRINV_ServicePtr_T;
00111   
00115   typedef boost::shared_ptr<AIRINV_Master_Service> AIRINV_Master_ServicePtr_T;
00116   
00121   typedef std::map<const stdair::AirlineCode_T,
00122                    AIRINV_ServicePtr_T> AIRINV_ServicePtr_Map_T;
00123 
00127   typedef std::map<const stdair::DTD_T, double> FRAT5Curve_T;
00128 
00129 }
00130 #endif // __AIRINV_AIRINV_TYPES_HPP
00131