StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
PeriodStruct.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_PERIODSTRUCT_HPP
2 #define __STDAIR_BOM_PERIODSTRUCT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 #include <vector>
10 // StdAir
11 #include <stdair/stdair_types.hpp>
13 #include <stdair/bom/DoWStruct.hpp>
14 
15 namespace stdair {
16 
19  struct PeriodStruct : public StructAbstract {
20  public:
21  // ////////// Getters /////////////
23  const DatePeriod_T& getDateRange () const {
24  return _dateRange;
25  }
26  const DoWStruct& getDoW () const {
27  return _dow;
28  }
29 
30  public:
31  // /////////// Setters ////////////
33  void setDateRange (const DatePeriod_T& iDateRange) {
34  _dateRange = iDateRange;
35  }
36  void setDoW (const DoWStruct& iDoW) { _dow = iDoW; }
37 
38  public:
40  const std::string describe() const;
41 
43  const std::string describeShort() const;
44 
45  public:
46  // /////////// Business Methods /////////////
49 
52  PeriodStruct intersection (const PeriodStruct&) const;
53 
55  const bool isValid () const;
56 
57  public:
59  PeriodStruct (const DatePeriod_T&, const DoWStruct&);
61  PeriodStruct ();
62  PeriodStruct (const PeriodStruct&);
65 
66  private:
67  // Attributes
68  DatePeriod_T _dateRange;
69  DoWStruct _dow;
70  };
71 
72 }
73 #endif // __STDAIR_BOM_PERIODSTRUCT_HPP
PeriodStruct addDateOffset(const DateOffset_T &) const
const bool isValid() const
Handle on the StdAir library context.
const std::string describeShort() const
Base class for the light structures.
const DatePeriod_T & getDateRange() const
PeriodStruct intersection(const PeriodStruct &) const
const DoWStruct & getDoW() const
boost::gregorian::date_period DatePeriod_T
boost::gregorian::date_duration DateOffset_T
const std::string describe() const
void setDateRange(const DatePeriod_T &iDateRange)
void setDoW(const DoWStruct &iDoW)