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

stdair/bom/FlightPeriod.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_FLIGHTPERIOD_HPP
00002 #define __STDAIR_BOM_FLIGHTPERIOD_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STDAIR 
00008 #include <stdair/bom/BomAbstract.hpp>
00009 #include <stdair/bom/FlightPeriodKey.hpp>
00010 #include <stdair/bom/FlightPeriodTypes.hpp>
00011 
00012 namespace stdair {
00013 
00015   class FlightPeriod : public BomAbstract {
00016     template <typename BOM> friend class FacBom; 
00017     template <typename BOM> friend class FacCloneBom;
00018     friend class FacBomManager;
00019 
00020   public:
00021     // Type definitions.
00023     typedef FlightPeriodKey Key_T;
00024 
00025   public:
00026     // /////////// Getters ///////////////
00028     const Key_T& getKey () const { return _key; }
00029 
00031     BomAbstract* const getParent() const { return _parent; }
00032     
00034     const FlightNumber_T& getFlightNumber () const {
00035       return _key.getFlightNumber();
00036     }
00037 
00039     const PeriodStruct& getPeriod () const { return _key.getPeriod(); }
00040 
00042     const HolderMap_T& getHolderMap() const { return _holderMap; }
00043     
00044 
00045   public:
00046     // /////////// Display support methods /////////
00049     void toStream (std::ostream& ioOut) const { ioOut << toString(); }
00050 
00053     void fromStream (std::istream& ioIn) { }
00054 
00056     std::string toString() const;
00057     
00059     const std::string describeKey() const { return _key.toString(); }
00060     
00061   protected:
00065     FlightPeriod (const Key_T&);  
00066 
00070     ~FlightPeriod ();
00071 
00072   private:  
00073 
00077     FlightPeriod ();
00078 
00082     FlightPeriod (const FlightPeriod&);
00083 
00084   protected:
00085     // Attributes
00086     Key_T _key;
00087     BomAbstract* _parent;
00088     HolderMap_T _holderMap;
00089   };
00090 
00091 }
00092 #endif // __STDAIR_BOM_FLIGHTPERIOD_HPP
00093