StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
OnDDateKey.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_ONDDATEKEY_HPP
00002 #define __STDAIR_BOM_ONDDATEKEY_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_demand_types.hpp>
00013 #include <stdair/stdair_date_time_types.hpp>
00014 #include <stdair/bom/KeyAbstract.hpp>
00015 
00016 namespace stdair {
00017 
00023   struct OnDDateKey : public KeyAbstract {
00024     friend class boost::serialization::access;
00025 
00026     // /////////// Constructors and destructors ///////////
00027   private:
00031     OnDDateKey();
00032 
00033   public:
00037     OnDDateKey (const OnDStringList_T&);
00038 
00042     OnDDateKey (const OnDDateKey&);
00043 
00047     ~OnDDateKey();
00048 
00049 
00050   public:
00051     // /////////// Getters //////////
00055     const Date_T getDate() const;
00056     
00060     const AirportCode_T getOrigin() const;
00061     
00065     const AirportCode_T getDestination() const;
00066     
00070     const short getNbOfSegments () const {
00071       return _OnDStringList.size();
00072     }
00073         
00074   public:
00075     // /////////// Display support methods /////////
00081     void toStream (std::ostream& ioOut) const;
00082 
00088     void fromStream (std::istream& ioIn);
00089 
00099     const std::string toString() const;
00100 
00101 
00102   public:
00103     // /////////// (Boost) Serialisation support methods /////////
00107     template<class Archive>
00108     void serialize (Archive& ar, const unsigned int iFileVersion);
00109 
00110   private:
00115     void serialisationImplementationExport() const;
00116     void serialisationImplementationImport();
00117 
00118 
00119   private:
00120     // ///////////////// Attributes ///////////////
00121     OnDStringList_T _OnDStringList;
00122     
00123   };
00124 
00125 }
00126 #endif // __STDAIR_BOM_ONDDATEKEY_HPP