00001 #ifndef __STDAIR_BOM_PERIODSTRUCT_HPP 00002 #define __STDAIR_BOM_PERIODSTRUCT_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <string> 00009 #include <vector> 00010 // StdAir 00011 #include <stdair/stdair_types.hpp> 00012 #include <stdair/basic/StructAbstract.hpp> 00013 #include <stdair/bom/DoWStruct.hpp> 00014 00015 namespace stdair { 00016 00019 struct PeriodStruct : public StructAbstract { 00020 public: 00021 // ////////// Getters ///////////// 00023 const DatePeriod_T& getDateRange () const { 00024 return _dateRange; 00025 } 00026 const DoWStruct& getDoW () const { 00027 return _dow; 00028 } 00029 00030 public: 00031 // /////////// Setters //////////// 00033 void setDateRange (const DatePeriod_T& iDateRange) { 00034 _dateRange = iDateRange; 00035 } 00036 void setDoW (const DoWStruct& iDoW) { _dow = iDoW; } 00037 00038 public: 00040 const std::string describe() const; 00041 00043 const std::string describeShort() const; 00044 00045 public: 00046 // /////////// Business Methods ///////////// 00048 PeriodStruct addDateOffset (const DateOffset_T&) const; 00049 00052 PeriodStruct intersection (const PeriodStruct&) const; 00053 00055 const bool isValid () const; 00056 00057 public: 00059 PeriodStruct (const DatePeriod_T&, const DoWStruct&); 00061 PeriodStruct (); 00062 PeriodStruct (const PeriodStruct&); 00064 ~PeriodStruct () { } 00065 00066 private: 00067 // Attributes 00068 DatePeriod_T _dateRange; 00069 DoWStruct _dow; 00070 }; 00071 00072 } 00073 #endif // __STDAIR_BOM_PERIODSTRUCT_HPP