StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
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  template <typename BOM> friend class FacCloneBom;
18  friend class FacBomManager;
19 
20  public:
21  // Type definitions.
24 
25  public:
26  // /////////// Getters /////////////
28  const Key_T& getKey() const { return _key; }
29 
31  BomAbstract* const getParent() const { return _parent; }
32 
34  const AirportCode_T& getBoardingPoint () const {
35  return _key.getBoardingPoint();
36  }
37 
39  const AirportCode_T& getOffPoint () const { return _key.getOffPoint(); }
40 
42  const Duration_T& getBoardingTime () const { return _boardingTime; }
43 
45  const Duration_T& getOffTime () const { return _offTime; }
46 
49  return _boardingDateOffset;
50  }
51 
53  const DateOffset_T& getOffDateOffset () const { return _offDateOffset; }
54 
56  const Duration_T& getElapsedTime() const { return _elapsedTime; }
57 
60  return _cabinBookingClassMap;
61  }
62 
64  const HolderMap_T& getHolderMap() const { return _holderMap; }
65 
66  public:
67  // ///////// Setters //////////
69  void setBoardingTime (const Duration_T& iBoardingTime) {
70  _boardingTime = iBoardingTime;
71  }
72 
74  void setOffTime (const Duration_T& iOffTime) { _offTime = iOffTime; }
75 
77  void setBoardingDateOffset (const DateOffset_T& iDateOffset) {
78  _boardingDateOffset = iDateOffset;
79  }
80 
82  void setOffDateOffset (const DateOffset_T& iDateOffset) {
83  _offDateOffset = iDateOffset;
84  }
85 
87  void setElapsedTime (const Duration_T& iElapsedTime) {
88  _elapsedTime = iElapsedTime;
89  }
90 
94  const ClassList_String_T&);
95 
96  public:
97  // /////////// Display support methods /////////
100  void toStream (std::ostream& ioOut) const { ioOut << toString(); }
101 
104  void fromStream (std::istream& ioIn) { }
105 
107  std::string toString() const;
108 
110  const std::string describeKey() const { return _key.toString(); }
111 
112  protected:
113  // ////////// Constructors and destructors /////////
117  SegmentPeriod (const Key_T&);
121  virtual ~SegmentPeriod();
122 
123  private:
127  SegmentPeriod();
131  SegmentPeriod (const SegmentPeriod&);
132 
133  protected:
134  // Attributes
135  Key_T _key;
144  };
145 
146 }
147 #endif // __STDAIR_BOM_SEGMENTPERIOD_HPP
148 
const HolderMap_T & getHolderMap() const
const std::string describeKey() const
DateOffset_T _boardingDateOffset
LocationCode_T AirportCode_T
std::string CabinCode_T
const Duration_T & getBoardingTime() const
const Key_T & getKey() const
Utility class for linking StdAir-based objects.
const AirportCode_T & getBoardingPoint() const
const DateOffset_T & getBoardingDateOffset() const
const AirportCode_T & getOffPoint() const
Handle on the StdAir library context.
boost::posix_time::time_duration Duration_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
const std::string toString() const
DateOffset_T _offDateOffset
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
BomAbstract *const getParent() const
void setElapsedTime(const Duration_T &iElapsedTime)
const CabinBookingClassMap_T & getCabinBookingClassMap() const
std::map< CabinCode_T, ClassList_String_T > CabinBookingClassMap_T
const Duration_T & getElapsedTime() const
void toStream(std::ostream &ioOut) const
std::string toString() const
Base class for Factory layer.
Definition: FacBom.hpp:22
void addCabinBookingClassList(const CabinCode_T &, const ClassList_String_T &)
void setBoardingDateOffset(const DateOffset_T &iDateOffset)
void setOffTime(const Duration_T &iOffTime)
const AirportCode_T & getBoardingPoint() const
const DateOffset_T & getOffDateOffset() const
SegmentPeriodKey Key_T
void fromStream(std::istream &ioIn)
void setBoardingTime(const Duration_T &iBoardingTime)
boost::gregorian::date_duration DateOffset_T
std::string ClassList_String_T
CabinBookingClassMap_T _cabinBookingClassMap
const Duration_T & getOffTime() const
Base class for Factory layer.
Definition: FacCloneBom.hpp:22
void setOffDateOffset(const DateOffset_T &iDateOffset)
const AirportCode_T & getOffPoint() const