StdAir Logo  1.00.16
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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
12namespace 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
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
50 }
51
53 const DateOffset_T& getOffDateOffset () const { return _offDateOffset; }
54
56 const Duration_T& getElapsedTime() const { return _elapsedTime; }
57
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();
132
133 protected:
134 // Attributes
144 };
145
146}
147#endif // __STDAIR_BOM_SEGMENTPERIOD_HPP
148
Handle on the StdAir library context.
boost::gregorian::date_duration DateOffset_T
std::map< CabinCode_T, ClassList_String_T > CabinBookingClassMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
std::string ClassList_String_T
boost::posix_time::time_duration Duration_T
LocationCode_T AirportCode_T
std::string CabinCode_T
Base class for the Business Object Model (BOM) layer.
const DateOffset_T & getBoardingDateOffset() const
const Duration_T & getBoardingTime() const
BomAbstract *const getParent() const
std::string toString() const
const std::string describeKey() const
DateOffset_T _boardingDateOffset
const Duration_T & getElapsedTime() const
const AirportCode_T & getBoardingPoint() const
void setOffTime(const Duration_T &iOffTime)
void setElapsedTime(const Duration_T &iElapsedTime)
void setBoardingDateOffset(const DateOffset_T &iDateOffset)
void setBoardingTime(const Duration_T &iBoardingTime)
const HolderMap_T & getHolderMap() const
void toStream(std::ostream &ioOut) const
const Duration_T & getOffTime() const
SegmentPeriodKey Key_T
void setOffDateOffset(const DateOffset_T &iDateOffset)
const Key_T & getKey() const
const DateOffset_T & getOffDateOffset() const
const CabinBookingClassMap_T & getCabinBookingClassMap() const
const AirportCode_T & getOffPoint() const
void fromStream(std::istream &ioIn)
CabinBookingClassMap_T _cabinBookingClassMap
void addCabinBookingClassList(const CabinCode_T &, const ClassList_String_T &)
const std::string toString() const
const AirportCode_T & getOffPoint() const
const AirportCode_T & getBoardingPoint() const
Base class for Factory layer.
Definition FacBom.hpp:22
Utility class for linking StdAir-based objects.
Base class for Factory layer.