StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DatePeriod.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_DATEPERIOD_HPP
2 #define __STDAIR_BOM_DATEPERIOD_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STDAIR
11 
12 // Forward declaration
13 namespace stdair {
14 
18  class DatePeriod : public BomAbstract {
19  template <typename BOM> friend class FacBom;
20  friend class FacBomManager;
21 
22  public:
23  // //////////// Type definitions //////////////
28 
29  public:
30  // /////////// Display support methods /////////
36  void toStream (std::ostream& ioOut) const {
37  ioOut << toString();
38  }
39 
45  void fromStream (std::istream& ioIn) {
46  }
47 
51  std::string toString() const;
52 
56  const std::string describeKey() const {
57  return _key.toString();
58  }
59 
60  public:
61  // ////////// Getters ////////////
65  const Key_T& getKey() const {
66  return _key;
67  }
68 
72  BomAbstract* const getParent() const {
73  return _parent;
74  }
75 
79  const HolderMap_T& getHolderMap() const {
80  return _holderMap;
81  }
82 
86  const DatePeriod_T& getDatePeriod() const {
87  return _key.getDatePeriod();
88  }
89 
90 
91  public:
92  // ////////////// Business methods ///////////////
97  bool isDepartureDateValid (const Date_T&) const;
98 
99  protected:
100  // ////////// Constructors and destructors /////////
104  DatePeriod (const Key_T&);
108  virtual ~DatePeriod ();
109 
110  private:
114  DatePeriod ();
118  DatePeriod (const DatePeriod&);
119 
120  protected:
121  // ///////////// Attributes /////////////
126 
131 
136 
137  };
138 
139 }
140 #endif // __STDAIR_BOM_DATEPERIOD_HPP
141