AirSched Logo  0.1.2
C++ Simulated Airline Schedule Manager Library
OriginDestinationSet.hpp
Go to the documentation of this file.
00001 #ifndef __AIRSCHED_BOM_ORIGINDESTINATIONSET_HPP
00002 #define __AIRSCHED_BOM_ORIGINDESTINATIONSET_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iosfwd>
00009 #include <string>
00010 // StdAir
00011 #include <stdair/bom/BomAbstract.hpp>
00012 // AirSched
00013 #include <airsched/bom/OriginDestinationSetKey.hpp>
00014 #include <airsched/bom/OriginDestinationSetTypes.hpp>
00015 
00017 namespace boost {
00018   namespace serialization {
00019     class access;
00020   }
00021 }
00022 
00024 namespace stdair {
00025   template <typename BOM> class FacBom;
00026   class FacBomManager;
00027 }
00028 
00029 namespace AIRSCHED {
00030 
00044   class OriginDestinationSet : public stdair::BomAbstract {
00048     template <typename BOM> friend class stdair::FacBom;
00049     friend  class stdair::FacBomManager;
00050     friend class boost::serialization::access;
00051 
00052   public:
00053     // ////////// Type definitions ////////////
00057     typedef OriginDestinationSetKey Key_T;
00058 
00059 
00060   public:
00061     // /////////// Getters /////////////
00065     const Key_T& getKey() const {
00066       return _key;
00067     }
00068 
00072     const stdair::AirportCode_T& getDestination() const {
00073       return _key.getOffPoint();
00074     }
00075 
00079     stdair::BomAbstract* const getParent() const {
00080       return _parent;
00081     }
00082 
00086     const stdair::HolderMap_T& getHolderMap() const {
00087       return _holderMap;
00088     }
00089 
00090 
00091   public:
00092     // /////////// Display support methods /////////
00098     void toStream (std::ostream& ioOut) const {
00099       ioOut << toString();
00100     }
00101 
00107     void fromStream (std::istream& ioIn) {
00108     }
00109 
00113     std::string toString() const;
00114     
00118     const std::string describeKey() const {
00119       return _key.toString();
00120     }
00121     
00122 
00123   public:
00124     // /////////// (Boost) Serialisation support methods /////////
00128     template<class Archive>
00129     void serialize (Archive& ar, const unsigned int iFileVersion);
00130 
00131   private:
00136     void serialisationImplementation();
00137 
00138 
00139   protected:
00140     // ////////// Constructors and destructors /////////
00144     OriginDestinationSet (const Key_T&);
00145 
00149     ~OriginDestinationSet();
00150 
00151   private:
00155     OriginDestinationSet();
00156 
00160     OriginDestinationSet (const OriginDestinationSet&);
00161 
00162   protected:
00163     // ////////// Attributes /////////
00167     Key_T _key;
00168 
00172     stdair::BomAbstract* _parent;
00173 
00177     stdair::HolderMap_T _holderMap;
00178   };
00179 
00180 }
00181 #endif // __AIRSCHED_BOM_ORIGINDESTINATIONSET_HPP
00182