AirSched Logo  0.1.4
C++ Simulated Airline Schedule Manager Library
ReachableUniverse.hpp
Go to the documentation of this file.
00001 #ifndef __AIRSCHED_BOM_REACHABLEUNIVERSE_HPP
00002 #define __AIRSCHED_BOM_REACHABLEUNIVERSE_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/ReachableUniverseKey.hpp>
00014 #include <airsched/bom/ReachableUniverseTypes.hpp>
00015 #include <airsched/bom/SegmentPathPeriodTypes.hpp>
00016 
00018 namespace boost {
00019   namespace serialization {
00020     class access;
00021   }
00022 }
00023 
00025 namespace stdair {
00026   template <typename BOM> class FacBom;
00027   class FacBomManager;
00028 }
00029 
00030 namespace AIRSCHED {
00031 
00041   class ReachableUniverse : public stdair::BomAbstract {
00045     template <typename BOM> friend class stdair::FacBom;
00046     friend class stdair::FacBomManager;
00047     friend class SegmentPathGenerator;
00048     friend class boost::serialization::access;
00049 
00050   public:
00051     // ////////// Type definitions ////////////
00055     typedef ReachableUniverseKey Key_T;
00056 
00057   public:
00058     // /////////// Getters /////////////
00063     const Key_T& getKey() const {
00064       return _key;
00065     }
00066 
00070     const stdair::AirportCode_T& getOrigin() const {
00071       return _key.getBoardingPoint();
00072     }
00073 
00077     stdair::BomAbstract* const getParent() const {
00078       return _parent;
00079     }
00080     
00084     const stdair::HolderMap_T& getHolderMap() const {
00085       return _holderMap;
00086     }
00087 
00091     const SegmentPathPeriodListList_T& getSegmentPathPeriodListList() const {
00092       return _segmentPathPeriodListList;
00093     }
00094 
00095 
00096   public:
00097     // /////////// Display support methods /////////
00103     void toStream (std::ostream& ioOut) const {
00104       ioOut << toString();
00105     }
00106 
00112     void fromStream (std::istream& ioIn) {
00113     }
00114 
00118     std::string toString() const;
00119     
00123     const std::string describeKey() const {
00124       return _key.toString();
00125     }
00126     
00127 
00128   public:
00129     // /////////// (Boost) Serialisation support methods /////////
00133     template<class Archive>
00134     void serialize (Archive& ar, const unsigned int iFileVersion);
00135 
00136   private:
00141     void serialisationImplementationExport() const;
00142     void serialisationImplementationImport();
00143 
00144 
00145   protected:
00146     // ////////// Constructors and destructors /////////
00150     ReachableUniverse (const Key_T&);
00151 
00155     ~ReachableUniverse();
00156 
00157   private:
00161     ReachableUniverse();
00162 
00166     ReachableUniverse (const ReachableUniverse&);
00167 
00168 
00169   protected:
00170     // ////////// Attributes /////////
00174     Key_T _key;
00175 
00179     stdair::BomAbstract* _parent;
00180 
00184     stdair::HolderMap_T _holderMap;
00185     
00191     SegmentPathPeriodListList_T _segmentPathPeriodListList;
00192   };
00193 
00194 }
00195 #endif // __AIRSCHED_BOM_REACHABLEUNIVERSE_HPP
00196