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

stdair/bom/TimePeriod.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_FARETIMEPERIOD_HPP
00002 #define __STDAIR_BOM_FARETIMEPERIOD_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STDAIR
00008 #include <stdair/bom/BomAbstract.hpp>
00009 #include <stdair/bom/TimePeriodKey.hpp>
00010 #include <stdair/bom/TimePeriodTypes.hpp>
00011 
00012 // Forward declaration
00013 namespace stdair {
00014 
00018   class TimePeriod : public BomAbstract {
00019     template <typename BOM> friend class FacBom;  
00020     template <typename BOM> friend class FacCloneBom;
00021     friend class FacBomManager;
00022 
00023   public:
00024     // //////////// Type definitions //////////////
00028     typedef TimePeriodKey Key_T;
00029   
00030   public:
00031     // /////////// Display support methods /////////
00032     // /////////// Display support methods /////////
00038     void toStream (std::ostream& ioOut) const {
00039       ioOut << toString();
00040     }
00041     
00047     void fromStream (std::istream& ioIn) {
00048     }
00049 
00053     std::string toString() const;
00054     
00058     const std::string describeKey() const {
00059       return _key.toString();
00060     }
00061 
00062   public:
00063     // ////////// Getters ////////////
00067     const Key_T& getKey() const {
00068       return _key;
00069     }
00070 
00074     BomAbstract* const getParent() const {
00075       return _parent;
00076     }
00077 
00081     const HolderMap_T& getHolderMap() const {
00082       return _holderMap;
00083     }
00084     
00088     const Time_T& getTimeRangeStart() const {
00089       return _key.getTimeRangeStart();
00090     }
00091     
00095     const Time_T& getTimeRangeEnd() const {
00096       return _key.getTimeRangeEnd();
00097     }
00098 
00099   public:
00100     // ////////////// Business methods ///////////////
00105     bool isDepartureTimeValid (const Time_T&) const;
00106 
00107   protected:
00108     // ////////// Constructors and destructors /////////
00112     TimePeriod (const Key_T&);  
00116     virtual ~TimePeriod();
00117 
00118   private:
00122     TimePeriod(); 
00126     TimePeriod (const TimePeriod&);
00127 
00128   protected:
00129     // ///////////// Attributes /////////////
00133     Key_T _key;
00134 
00138     BomAbstract* _parent;
00139 
00143     HolderMap_T _holderMap;
00144 
00145   };
00146 
00147 }
00148 #endif // __STDAIR_BOM_FARETIMEPERIOD_HPP
00149