StdAir Logo  1.00.10
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
144  };
145 
146 }
147 #endif // __STDAIR_BOM_SEGMENTPERIOD_HPP
148 
stdair::FacCloneBom
Base class for Factory layer.
Definition: FacCloneBom.hpp:22
stdair::SegmentPeriod::toStream
void toStream(std::ostream &ioOut) const
Definition: SegmentPeriod.hpp:100
SegmentPeriodTypes.hpp
stdair::SegmentPeriod::describeKey
const std::string describeKey() const
Definition: SegmentPeriod.hpp:110
stdair::FacBom
Base class for Factory layer.
Definition: FacBom.hpp:22
stdair::SegmentPeriod::_holderMap
HolderMap_T _holderMap
Definition: SegmentPeriod.hpp:143
stdair::SegmentPeriod::setBoardingTime
void setBoardingTime(const Duration_T &iBoardingTime)
Definition: SegmentPeriod.hpp:69
stdair::SegmentPeriod::getOffDateOffset
const DateOffset_T & getOffDateOffset() const
Definition: SegmentPeriod.hpp:53
stdair::SegmentPeriod::getHolderMap
const HolderMap_T & getHolderMap() const
Definition: SegmentPeriod.hpp:64
stdair::SegmentPeriod::setOffDateOffset
void setOffDateOffset(const DateOffset_T &iDateOffset)
Definition: SegmentPeriod.hpp:82
stdair::SegmentPeriod::fromStream
void fromStream(std::istream &ioIn)
Definition: SegmentPeriod.hpp:104
stdair::SegmentPeriod::_offDateOffset
DateOffset_T _offDateOffset
Definition: SegmentPeriod.hpp:140
stdair::SegmentPeriod::_cabinBookingClassMap
CabinBookingClassMap_T _cabinBookingClassMap
Definition: SegmentPeriod.hpp:142
stdair::ClassList_String_T
std::string ClassList_String_T
Definition: stdair_basic_types.hpp:114
stdair::SegmentPeriod::getParent
BomAbstract *const getParent() const
Definition: SegmentPeriod.hpp:31
stdair::SegmentPeriod::_elapsedTime
Duration_T _elapsedTime
Definition: SegmentPeriod.hpp:141
stdair::SegmentPeriod::getOffTime
const Duration_T & getOffTime() const
Definition: SegmentPeriod.hpp:45
stdair::SegmentPeriod::getElapsedTime
const Duration_T & getElapsedTime() const
Definition: SegmentPeriod.hpp:56
stdair::SegmentPeriodKey::toString
const std::string toString() const
Definition: SegmentPeriodKey.cpp:36
SegmentPeriodKey.hpp
stdair::AirportCode_T
LocationCode_T AirportCode_T
Definition: stdair_basic_types.hpp:22
stdair
Handle on the StdAir library context.
Definition: BasChronometer.cpp:9
stdair::HolderMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
stdair::BomAbstract
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
stdair::SegmentPeriod::_offTime
Duration_T _offTime
Definition: SegmentPeriod.hpp:138
stdair::SegmentPeriod::~SegmentPeriod
virtual ~SegmentPeriod()
Definition: SegmentPeriod.cpp:29
stdair::SegmentPeriod::Key_T
SegmentPeriodKey Key_T
Definition: SegmentPeriod.hpp:23
stdair::SegmentPeriod::addCabinBookingClassList
void addCabinBookingClassList(const CabinCode_T &, const ClassList_String_T &)
Definition: SegmentPeriod.cpp:41
stdair::SegmentPeriod::_parent
BomAbstract * _parent
Definition: SegmentPeriod.hpp:136
stdair::CabinBookingClassMap_T
std::map< CabinCode_T, ClassList_String_T > CabinBookingClassMap_T
Definition: stdair_inventory_types.hpp:44
stdair::SegmentPeriod::getBoardingTime
const Duration_T & getBoardingTime() const
Definition: SegmentPeriod.hpp:42
stdair::SegmentPeriodKey::getBoardingPoint
const AirportCode_T & getBoardingPoint() const
Definition: SegmentPeriodKey.hpp:29
BomAbstract.hpp
stdair::SegmentPeriodKey
Definition: SegmentPeriodKey.hpp:14
stdair::SegmentPeriod::_key
Key_T _key
Definition: SegmentPeriod.hpp:135
stdair::SegmentPeriod::setOffTime
void setOffTime(const Duration_T &iOffTime)
Definition: SegmentPeriod.hpp:74
stdair::SegmentPeriod::getCabinBookingClassMap
const CabinBookingClassMap_T & getCabinBookingClassMap() const
Definition: SegmentPeriod.hpp:59
stdair::SegmentPeriod::_boardingTime
Duration_T _boardingTime
Definition: SegmentPeriod.hpp:137
stdair::DateOffset_T
boost::gregorian::date_duration DateOffset_T
Definition: stdair_date_time_types.hpp:35
stdair::SegmentPeriod::getBoardingPoint
const AirportCode_T & getBoardingPoint() const
Definition: SegmentPeriod.hpp:34
stdair::SegmentPeriod::getBoardingDateOffset
const DateOffset_T & getBoardingDateOffset() const
Definition: SegmentPeriod.hpp:48
stdair::CabinCode_T
std::string CabinCode_T
Definition: stdair_basic_types.hpp:41
stdair::SegmentPeriod::setBoardingDateOffset
void setBoardingDateOffset(const DateOffset_T &iDateOffset)
Definition: SegmentPeriod.hpp:77
stdair::SegmentPeriod::getKey
const Key_T & getKey() const
Definition: SegmentPeriod.hpp:28
stdair::SegmentPeriod::_boardingDateOffset
DateOffset_T _boardingDateOffset
Definition: SegmentPeriod.hpp:139
stdair::Duration_T
boost::posix_time::time_duration Duration_T
Definition: stdair_date_time_types.hpp:17
stdair::SegmentPeriod
Definition: SegmentPeriod.hpp:15
stdair::SegmentPeriod::setElapsedTime
void setElapsedTime(const Duration_T &iElapsedTime)
Definition: SegmentPeriod.hpp:87
stdair::SegmentPeriodKey::getOffPoint
const AirportCode_T & getOffPoint() const
Definition: SegmentPeriodKey.hpp:34
stdair::FacBomManager
Utility class for linking StdAir-based objects.
Definition: FacBomManager.hpp:30
stdair::SegmentPeriod::toString
std::string toString() const
Definition: SegmentPeriod.cpp:33
stdair::SegmentPeriod::getOffPoint
const AirportCode_T & getOffPoint() const
Definition: SegmentPeriod.hpp:39