StdAir Logo  1.00.18
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
TimePeriod.hpp
Go to the documentation of this file.
1#ifndef __STDAIR_BOM_FARETIMEPERIOD_HPP
2#define __STDAIR_BOM_FARETIMEPERIOD_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STDAIR
11
12// Forward declaration
13namespace stdair {
14
18 class TimePeriod : public BomAbstract {
19 template <typename BOM> friend class FacBom;
20 template <typename BOM> friend class FacCloneBom;
21 friend class FacBomManager;
22
23 public:
24 // //////////// Type definitions //////////////
29
30 public:
31 // /////////// Display support methods /////////
32 // /////////// Display support methods /////////
38 void toStream (std::ostream& ioOut) const {
39 ioOut << toString();
40 }
41
47 void fromStream (std::istream& ioIn) {
48 }
49
53 std::string toString() const;
54
58 const std::string describeKey() const {
59 return _key.toString();
60 }
61
62 public:
63 // ////////// Getters ////////////
67 const Key_T& getKey() const {
68 return _key;
69 }
70
74 BomAbstract* const getParent() const {
75 return _parent;
76 }
77
81 const HolderMap_T& getHolderMap() const {
82 return _holderMap;
83 }
84
88 const Time_T& getTimeRangeStart() const {
89 return _key.getTimeRangeStart();
90 }
91
95 const Time_T& getTimeRangeEnd() const {
96 return _key.getTimeRangeEnd();
97 }
98
99 public:
100 // ////////////// Business methods ///////////////
105 bool isDepartureTimeValid (const Time_T&) const;
106
107 protected:
108 // ////////// Constructors and destructors /////////
112 TimePeriod (const Key_T&);
116 virtual ~TimePeriod();
117
118 private:
122 TimePeriod();
126 TimePeriod (const TimePeriod&);
127
128 protected:
129 // ///////////// Attributes /////////////
134
139
144
145 };
146
147}
148#endif // __STDAIR_BOM_FARETIMEPERIOD_HPP
149
Handle on the StdAir library context.
boost::posix_time::time_duration Time_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Class representing the actual attributes for a fare time-period.
BomAbstract * _parent
virtual ~TimePeriod()
TimePeriodKey Key_T
void toStream(std::ostream &ioOut) const
const Time_T & getTimeRangeStart() const
bool isDepartureTimeValid(const Time_T &) const
const Key_T & getKey() const
const std::string describeKey() const
const Time_T & getTimeRangeEnd() const
BomAbstract *const getParent() const
TimePeriod(const Key_T &)
std::string toString() const
friend class FacBom
const HolderMap_T & getHolderMap() const
friend class FacCloneBom
friend class FacBomManager
void fromStream(std::istream &ioIn)
HolderMap_T _holderMap
Key of time-period.