StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SegmentPeriod.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_SEGMENTPERIOD_HPP
2 #define __STDAIR_BOM_SEGMENTPERIOD_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STDAIR
11 
12 namespace stdair {
13 
15  class SegmentPeriod : public BomAbstract {
16  template <typename BOM> friend class FacBom;
17  friend class FacBomManager;
18 
19  public:
20  // Type definitions.
23 
24  public:
25  // /////////// Getters /////////////
27  const Key_T& getKey() const { return _key; }
28 
30  BomAbstract* const getParent() const { return _parent; }
31 
33  const AirportCode_T& getBoardingPoint () const {
34  return _key.getBoardingPoint();
35  }
36 
38  const AirportCode_T& getOffPoint () const { return _key.getOffPoint(); }
39 
41  const Duration_T& getBoardingTime () const { return _boardingTime; }
42 
44  const Duration_T& getOffTime () const { return _offTime; }
45 
48  return _boardingDateOffset;
49  }
50 
52  const DateOffset_T& getOffDateOffset () const { return _offDateOffset; }
53 
55  const Duration_T& getElapsedTime() const { return _elapsedTime; }
56 
59  return _cabinBookingClassMap;
60  }
61 
63  const HolderMap_T& getHolderMap() const { return _holderMap; }
64 
65  public:
66  // ///////// Setters //////////
68  void setBoardingTime (const Duration_T& iBoardingTime) {
69  _boardingTime = iBoardingTime;
70  }
71 
73  void setOffTime (const Duration_T& iOffTime) { _offTime = iOffTime; }
74 
76  void setBoardingDateOffset (const DateOffset_T& iDateOffset) {
77  _boardingDateOffset = iDateOffset;
78  }
79 
81  void setOffDateOffset (const DateOffset_T& iDateOffset) {
82  _offDateOffset = iDateOffset;
83  }
84 
86  void setElapsedTime (const Duration_T& iElapsedTime) {
87  _elapsedTime = iElapsedTime;
88  }
89 
93  const ClassList_String_T&);
94 
95  public:
96  // /////////// Display support methods /////////
99  void toStream (std::ostream& ioOut) const { ioOut << toString(); }
100 
103  void fromStream (std::istream& ioIn) { }
104 
106  std::string toString() const;
107 
109  const std::string describeKey() const { return _key.toString(); }
110 
111  protected:
113  SegmentPeriod (const Key_T&);
114  SegmentPeriod (const SegmentPeriod&);
116  ~SegmentPeriod();
117 
118  protected:
119  // Attributes
129  };
130 
131 }
132 #endif // __STDAIR_BOM_SEGMENTPERIOD_HPP
133