00001 #ifndef __STDAIR_BOM_AIRPORTPAIR_HPP 00002 #define __STDAIR_BOM_AIRPORTPAIR_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STDAIR 00008 #include <stdair/bom/BomAbstract.hpp> 00009 #include <stdair/bom/AirportPairKey.hpp> 00010 #include <stdair/bom/AirportPairTypes.hpp> 00011 00012 // Forward declaration 00013 namespace stdair { 00014 00018 class AirportPair : public BomAbstract { 00019 template <typename BOM> friend class FacBom; 00020 friend class FacBomManager; 00021 00022 public: 00023 // //////////// Type definitions ////////////// 00027 typedef AirportPairKey Key_T; 00028 00029 public: 00030 // /////////// Display support methods ///////// 00036 void toStream (std::ostream& ioOut) const { 00037 ioOut << toString(); 00038 } 00039 00045 void fromStream (std::istream& ioIn) { 00046 } 00047 00051 std::string toString() const; 00052 00056 const std::string describeKey() const { 00057 return _key.toString(); 00058 } 00059 00060 public: 00061 // ////////// Getters //////////// 00065 const Key_T& getKey() const { 00066 return _key; 00067 } 00068 00072 const AirportCode_T& getBoardingPoint() const { 00073 return _key.getBoardingPoint(); 00074 } 00075 00079 const AirportCode_T& getOffPoint() const { 00080 return _key.getOffPoint(); 00081 } 00082 00086 BomAbstract* const getParent() const { 00087 return _parent; 00088 } 00089 00093 const HolderMap_T& getHolderMap() const { 00094 return _holderMap; 00095 } 00096 00097 protected: 00098 // ////////// Constructors and destructors ///////// 00102 AirportPair (const Key_T&); 00106 virtual ~AirportPair(); 00107 00108 private: 00112 AirportPair(); 00116 AirportPair (const AirportPair&); 00117 00118 protected: 00119 // ///////////// Attributes ///////////// 00123 Key_T _key; 00124 00128 BomAbstract* _parent; 00129 00133 HolderMap_T _holderMap; 00134 00135 }; 00136 00137 } 00138 #endif // __STDAIR_BOM_AIRPORTPAIR_HPP 00139