00001 #ifndef __STDAIR_BOM_SEGMENTDATEKEY_HPP 00002 #define __STDAIR_BOM_SEGMENTDATEKEY_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // StdAir 00008 #include <stdair/stdair_basic_types.hpp> 00009 #include <stdair/bom/KeyAbstract.hpp> 00010 00012 namespace boost { 00013 namespace serialization { 00014 class access; 00015 } 00016 } 00017 00018 namespace stdair { 00019 00024 struct SegmentDateKey : public KeyAbstract { 00025 friend class boost::serialization::access; 00026 00027 // /////////// Constructors and destructors /////////// 00028 private: 00032 SegmentDateKey(); 00033 00034 public: 00038 SegmentDateKey (const AirportCode_T&, const AirportCode_T&); 00042 SegmentDateKey (const SegmentDateKey&); 00046 ~SegmentDateKey(); 00047 00048 00049 // /////////// Getters ////////// 00051 const AirportCode_T& getBoardingPoint() const { 00052 return _boardingPoint; 00053 } 00054 00056 const AirportCode_T& getOffPoint() const { 00057 return _offPoint; 00058 } 00059 00060 00061 // /////////// Display support methods ///////// 00067 void toStream (std::ostream& ioOut) const; 00068 00074 void fromStream (std::istream& ioIn); 00075 00085 const std::string toString() const; 00086 00087 00088 public: 00089 // /////////// (Boost) Serialisation support methods ///////// 00093 template<class Archive> 00094 void serialize (Archive& ar, const unsigned int iFileVersion); 00095 00096 private: 00101 void serialisationImplementationExport() const; 00102 void serialisationImplementationImport(); 00103 00104 00105 private: 00106 // ///////////////// Attributes /////////////// 00110 AirportCode_T _boardingPoint; 00111 00115 AirportCode_T _offPoint; 00116 }; 00117 00118 } 00119 #endif // __STDAIR_BOM_SEGMENTDATEKEY_HPP