StdAir Logo  1.00.20
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
DatePeriod.hpp
Go to the documentation of this file.
1#ifndef __STDAIR_BOM_DATEPERIOD_HPP
2#define __STDAIR_BOM_DATEPERIOD_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STDAIR
11
12// Forward declaration
13namespace stdair {
14
18 class DatePeriod : 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 /////////
37 void toStream (std::ostream& ioOut) const {
38 ioOut << toString();
39 }
40
46 void fromStream (std::istream& ioIn) {
47 }
48
52 std::string toString() const;
53
57 const std::string describeKey() const {
58 return _key.toString();
59 }
60
61 public:
62 // ////////// Getters ////////////
66 const Key_T& getKey() const {
67 return _key;
68 }
69
73 BomAbstract* const getParent() const {
74 return _parent;
75 }
76
80 const HolderMap_T& getHolderMap() const {
81 return _holderMap;
82 }
83
87 const DatePeriod_T& getDatePeriod() const {
88 return _key.getDatePeriod();
89 }
90
91
92 public:
93 // ////////////// Business methods ///////////////
98 bool isDepartureDateValid (const Date_T&) const;
99
100 protected:
101 // ////////// Constructors and destructors /////////
105 DatePeriod (const Key_T&);
109 virtual ~DatePeriod ();
110
111 private:
115 DatePeriod ();
119 DatePeriod (const DatePeriod&);
120
121 protected:
122 // ///////////// Attributes /////////////
127
132
137
138 };
139
140}
141#endif // __STDAIR_BOM_DATEPERIOD_HPP
142
Handle on the StdAir library context.
boost::gregorian::date Date_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
boost::gregorian::date_period DatePeriod_T
Class representing the actual attributes for a fare date-period.
HolderMap_T _holderMap
BomAbstract * _parent
DatePeriod(const Key_T &)
bool isDepartureDateValid(const Date_T &) const
const Key_T & getKey() const
const std::string describeKey() const
void fromStream(std::istream &ioIn)
BomAbstract *const getParent() const
void toStream(std::ostream &ioOut) const
virtual ~DatePeriod()
DatePeriodKey Key_T
std::string toString() const
friend class FacBom
friend class FacCloneBom
friend class FacBomManager
const HolderMap_T & getHolderMap() const
const DatePeriod_T & getDatePeriod() const
Key of date-period.