StdAir Logo  1.00.12
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
Definition: BomAbstract.hpp:63
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
Class representing the actual attributes for a fare time-period.
Definition: TimePeriod.hpp:18
BomAbstract * _parent
Definition: TimePeriod.hpp:138
virtual ~TimePeriod()
Definition: TimePeriod.cpp:32
TimePeriodKey Key_T
Definition: TimePeriod.hpp:28
void toStream(std::ostream &ioOut) const
Definition: TimePeriod.hpp:38
const Time_T & getTimeRangeStart() const
Definition: TimePeriod.hpp:88
bool isDepartureTimeValid(const Time_T &) const
Definition: TimePeriod.cpp:44
const Key_T & getKey() const
Definition: TimePeriod.hpp:67
const std::string describeKey() const
Definition: TimePeriod.hpp:58
const Time_T & getTimeRangeEnd() const
Definition: TimePeriod.hpp:95
BomAbstract *const getParent() const
Definition: TimePeriod.hpp:74
std::string toString() const
Definition: TimePeriod.cpp:36
const HolderMap_T & getHolderMap() const
Definition: TimePeriod.hpp:81
void fromStream(std::istream &ioIn)
Definition: TimePeriod.hpp:47
HolderMap_T _holderMap
Definition: TimePeriod.hpp:143
Key of time-period.
const std::string toString() const
const Time_T & getTimeRangeStart() const
const Time_T & getTimeRangeEnd() const
Base class for Factory layer.
Definition: FacBom.hpp:22
Utility class for linking StdAir-based objects.
Base class for Factory layer.
Definition: FacCloneBom.hpp:22