$treeview $search $mathjax
StdAir Logo  1.00.2
$projectbrief
$projectbrief
$searchbox

stdair/bom/FlightDateKey.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_FLIGHTDATEKEY_HPP
00002 #define __STDAIR_BOM_FLIGHTDATEKEY_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iosfwd>
00009 #include <string>
00010 // StdAir
00011 #include <stdair/stdair_basic_types.hpp>
00012 #include <stdair/stdair_date_time_types.hpp>
00013 #include <stdair/bom/KeyAbstract.hpp>
00014 
00016 namespace boost {
00017   namespace serialization {
00018     class access;
00019   }
00020 }
00021 
00022 namespace stdair {
00023 
00028   struct FlightDateKey : public KeyAbstract {
00029     friend class boost::serialization::access;
00030 
00031     // /////////// Constructors and destructors ///////////
00032   private:
00036     FlightDateKey();
00037 
00038   public:
00042     FlightDateKey (const FlightNumber_T&, const Date_T&);
00043 
00047     FlightDateKey (const FlightDateKey&);
00048 
00052     ~FlightDateKey();
00053 
00054 
00055   public:
00056     // /////////// Getters //////////
00058     const FlightNumber_T& getFlightNumber() const {
00059       return _flightNumber;
00060     }
00061 
00063     const Date_T& getDepartureDate() const {
00064       return _departureDate;
00065     }
00066 
00067 
00068   public:
00069     // /////////// Display support methods /////////
00075     void toStream (std::ostream& ioOut) const;
00076 
00082     void fromStream (std::istream& ioIn);
00083 
00093     const std::string toString() const;
00094 
00095 
00096   public:
00097     // /////////// (Boost) Serialisation support methods /////////
00101     template<class Archive>
00102     void serialize (Archive& ar, const unsigned int iFileVersion);
00103 
00104   private:
00109     void serialisationImplementationExport() const;
00110     void serialisationImplementationImport();
00111 
00112 
00113   private:
00114     // ///////////////// Attributes ///////////////
00118     FlightNumber_T _flightNumber;
00119 
00123     Date_T _departureDate;
00124   };
00125 
00126 }
00127 #endif // __STDAIR_BOM_FLIGHTDATEKEY_HPP