$treeview $search $mathjax
00001 #ifndef __STDAIR_BOM_DATEPERIOD_HPP 00002 #define __STDAIR_BOM_DATEPERIOD_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STDAIR 00008 #include <stdair/bom/BomAbstract.hpp> 00009 #include <stdair/bom/DatePeriodKey.hpp> 00010 #include <stdair/bom/DatePeriodTypes.hpp> 00011 00012 // Forward declaration 00013 namespace stdair { 00014 00018 class DatePeriod : 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 DatePeriodKey Key_T; 00029 00030 public: 00031 // /////////// Display support methods ///////// 00037 void toStream (std::ostream& ioOut) const { 00038 ioOut << toString(); 00039 } 00040 00046 void fromStream (std::istream& ioIn) { 00047 } 00048 00052 std::string toString() const; 00053 00057 const std::string describeKey() const { 00058 return _key.toString(); 00059 } 00060 00061 public: 00062 // ////////// Getters //////////// 00066 const Key_T& getKey() const { 00067 return _key; 00068 } 00069 00073 BomAbstract* const getParent() const { 00074 return _parent; 00075 } 00076 00080 const HolderMap_T& getHolderMap() const { 00081 return _holderMap; 00082 } 00083 00087 const DatePeriod_T& getDatePeriod() const { 00088 return _key.getDatePeriod(); 00089 } 00090 00091 00092 public: 00093 // ////////////// Business methods /////////////// 00098 bool isDepartureDateValid (const Date_T&) const; 00099 00100 protected: 00101 // ////////// Constructors and destructors ///////// 00105 DatePeriod (const Key_T&); 00109 virtual ~DatePeriod (); 00110 00111 private: 00115 DatePeriod (); 00119 DatePeriod (const DatePeriod&); 00120 00121 protected: 00122 // ///////////// Attributes ///////////// 00126 Key_T _key; 00127 00131 BomAbstract* _parent; 00132 00136 HolderMap_T _holderMap; 00137 00138 }; 00139 00140 } 00141 #endif // __STDAIR_BOM_DATEPERIOD_HPP 00142