$treeview $search $mathjax
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_file.hpp> 00014 #include <stdair/stdair_inventory_types.hpp> 00015 00016 namespace AIRINV { 00017 00018 // Forward declarations 00019 class AIRINV_Service; 00020 class AIRINV_Master_Service; 00021 00022 00023 // ///////// Exceptions /////////// 00024 00028 class InventoryFileParsingFailedException 00029 : public stdair::ParsingFileFailedException { 00030 public: 00034 InventoryFileParsingFailedException (const std::string& iWhat) 00035 : stdair::ParsingFileFailedException (iWhat) {} 00036 }; 00037 00041 class ScheduleFileParsingFailedException 00042 : public stdair::ParsingFileFailedException { 00043 public: 00047 ScheduleFileParsingFailedException (const std::string& iWhat) 00048 : stdair::ParsingFileFailedException (iWhat) {} 00049 }; 00050 00054 class MissingPartnerFlightDateWithinScheduleFile 00055 : public ScheduleFileParsingFailedException { 00056 public: 00060 MissingPartnerFlightDateWithinScheduleFile (const std::string& iWhat) 00061 : ScheduleFileParsingFailedException (iWhat) {} 00062 }; 00063 00067 class FRAT5FileParsingFailedException 00068 : public stdair::ParsingFileFailedException { 00069 public: 00073 FRAT5FileParsingFailedException (const std::string& iWhat) 00074 : stdair::ParsingFileFailedException (iWhat) {} 00075 }; 00076 00080 class FFDisutilityFileParsingFailedException 00081 : public stdair::ParsingFileFailedException { 00082 public: 00086 FFDisutilityFileParsingFailedException (const std::string& iWhat) 00087 : stdair::ParsingFileFailedException (iWhat) {} 00088 }; 00089 00094 class SegmentDateNotFoundException : public stdair::ParserException { 00095 public: 00099 SegmentDateNotFoundException (const std::string& iWhat) 00100 : stdair::ParserException (iWhat) {} 00101 }; 00102 00106 class InventoryInputFileNotFoundException : public stdair::FileNotFoundException { 00107 public: 00111 InventoryInputFileNotFoundException (const std::string& iWhat) 00112 : stdair::FileNotFoundException (iWhat) {} 00113 }; 00114 00118 class ScheduleInputFileNotFoundException : public stdair::FileNotFoundException { 00119 public: 00123 ScheduleInputFileNotFoundException (const std::string& iWhat) 00124 : stdair::FileNotFoundException (iWhat) {} 00125 }; 00126 00130 class FRAT5InputFileNotFoundException : public stdair::FileNotFoundException { 00131 public: 00135 FRAT5InputFileNotFoundException (const std::string& iWhat) 00136 : stdair::FileNotFoundException (iWhat) {} 00137 }; 00138 00142 class FFDisutilityInputFileNotFoundException : public stdair::FileNotFoundException { 00143 public: 00147 FFDisutilityInputFileNotFoundException (const std::string& iWhat) 00148 : stdair::FileNotFoundException (iWhat) {} 00149 }; 00150 00154 class FlightDateDuplicationException : public stdair::ObjectCreationgDuplicationException { 00155 public: 00159 FlightDateDuplicationException (const std::string& iWhat) 00160 : stdair::ObjectCreationgDuplicationException (iWhat) {} 00161 }; 00162 00166 class BookingException : public stdair::RootException { 00167 }; 00168 00172 class InventoryNotFoundException : public stdair::ObjectNotFoundException { 00173 public: 00177 InventoryNotFoundException (const std::string& iWhat) 00178 : stdair::ObjectNotFoundException (iWhat) {} 00179 }; 00180 00184 class FlightDateNotFoundException : public stdair::ObjectNotFoundException { 00185 public: 00189 FlightDateNotFoundException (const std::string& iWhat) 00190 : stdair::ObjectNotFoundException (iWhat) {} 00191 }; 00192 00193 00194 // //////// Type definitions ///////// 00198 class InventoryFilePath : public stdair::InputFilePath { 00199 public: 00203 explicit InventoryFilePath (const stdair::Filename_T& iFilename) 00204 : stdair::InputFilePath (iFilename) {} 00205 }; 00206 00210 typedef boost::shared_ptr<AIRINV_Service> AIRINV_ServicePtr_T; 00211 00215 typedef boost::shared_ptr<AIRINV_Master_Service> AIRINV_Master_ServicePtr_T; 00216 00221 typedef std::map<const stdair::AirlineCode_T, 00222 AIRINV_ServicePtr_T> AIRINV_ServicePtr_Map_T; 00223 00227 typedef std::map<const stdair::DTD_T, double> FRAT5Curve_T; 00228 00229 } 00230 #endif // __AIRINV_AIRINV_TYPES_HPP