StdAir Logo  1.00.21
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
OnDDate.hpp
Go to the documentation of this file.
1#ifndef __STDAIR_BOM_ONDDATE_HPP
2#define __STDAIR_BOM_ONDDATE_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <iosfwd>
9#include <string>
10// StdAir
19
21namespace boost {
22 namespace serialization {
23 class access;
24 }
25}
26
27namespace stdair {
28
33 class OnDDate : public BomAbstract {
34 template <typename BOM> friend class FacBom;
35 template <typename BOM> friend class FacCloneBom;
36 friend class FacBomManager;
38
39 public:
40 // ////////// Type definitions ////////////
45
46
47 public:
48 // /////////// Getters ///////////////
50 const Key_T& getKey() const {
51 return _key;
52 }
53
55 BomAbstract* const getParent() const {
56 return _parent;
57 }
58
66 const AirlineCode_T& getAirlineCode() const;
67
68
70 const stdair::Date_T getDate() const {
71 return _key.getDate();
72 }
73
76 return _key.getOrigin();
77 }
78
81 return _key.getDestination();
82 }
83
87 const HolderMap_T& getHolderMap() const {
88 return _holderMap;
89 }
90
97
102 return _cabinForecastMap;
103 }
104
108 const WTPDemandPair_T& getTotalForecast (const CabinCode_T& iCC) const {
109 assert (_cabinForecastMap.find(iCC)!=_cabinForecastMap.end());
110 return _cabinForecastMap.find(iCC)->second;
111 }
112
116 const CabinClassPairList_T& getCabinClassPairList (const std::string& iStr) const {
118 return _stringCabinClassPairListMap.find(iStr)->second;
119 }
120
124 const short getNbOfSegments () const {
125 return _key.getNbOfSegments();
126 }
127
128 public:
129 // /////////// Setters ///////////////
132 const YieldDemandPair_T&);
133
134
136 void setTotalForecast (const CabinCode_T&,
137 const WTPDemandPair_T&);
138
139
140 public:
141 // /////////// Display support methods /////////
147 void toStream (std::ostream& ioOut) const {
148 ioOut << toString();
149 }
150
156 void fromStream (std::istream& ioIn) {
157 }
158
162 std::string toString() const;
163
167 const std::string describeKey() const {
168 return _key.toString();
169 }
170
171
172 public:
173 // /////////// (Boost) Serialisation support methods /////////
177 template<class Archive>
178 void serialize (Archive& ar, const unsigned int iFileVersion);
179
180 private:
185 void serialisationImplementation();
186
187
188 protected:
189 // ////////// Constructors and destructors /////////
193 OnDDate (const Key_T&);
194
198 virtual ~OnDDate();
199
200 private:
204 OnDDate();
205
209 OnDDate (const OnDDate&);
210
211
212 protected:
213 // ////////// Attributes /////////
218
223
228
233
238
243 };
244
245}
246#endif // __STDAIR_BOM_ONDDATE_HPP
Handle on the StdAir library context.
boost::gregorian::date Date_T
std::map< std::string, CabinClassPairList_T > StringCabinClassPairListMap_T
std::pair< WTP_T, MeanStdDevPair_T > WTPDemandPair_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
std::map< CabinCode_T, WTPDemandPair_T > CabinForecastMap_T
std::list< CabinClassPair_T > CabinClassPairList_T
std::map< std::string, YieldDemandPair_T > StringDemandStructMap_T
std::string AirlineCode_T
LocationCode_T AirportCode_T
std::string CabinCode_T
std::pair< Yield_T, MeanStdDevPair_T > YieldDemandPair_T
Forward declarations.
BomAbstract *const getParent() const
Definition OnDDate.hpp:55
void toStream(std::ostream &ioOut) const
Definition OnDDate.hpp:147
const stdair::AirportCode_T getDestination() const
Definition OnDDate.hpp:80
const std::string describeKey() const
Definition OnDDate.hpp:167
const WTPDemandPair_T & getTotalForecast(const CabinCode_T &iCC) const
Definition OnDDate.hpp:108
HolderMap_T _holderMap
Definition OnDDate.hpp:227
StringCabinClassPairListMap_T _stringCabinClassPairListMap
Definition OnDDate.hpp:237
OnDDate(const Key_T &)
Definition OnDDate.cpp:28
const stdair::Date_T getDate() const
Definition OnDDate.hpp:70
StringDemandStructMap_T _classPathDemandMap
Definition OnDDate.hpp:232
const short getNbOfSegments() const
Definition OnDDate.hpp:124
const CabinForecastMap_T & getTotalForecastMap() const
Definition OnDDate.hpp:101
void serialize(Archive &ar, const unsigned int iFileVersion)
OnDDateKey Key_T
Definition OnDDate.hpp:44
const StringDemandStructMap_T & getDemandInfoMap() const
Definition OnDDate.hpp:94
virtual ~OnDDate()
Definition OnDDate.cpp:33
const HolderMap_T & getHolderMap() const
Definition OnDDate.hpp:87
void setDemandInformation(const CabinClassPairList_T &, const YieldDemandPair_T &)
Definition OnDDate.cpp:53
friend class FacBom
Definition OnDDate.hpp:34
const AirlineCode_T & getAirlineCode() const
Definition OnDDate.cpp:44
friend class FacCloneBom
Definition OnDDate.hpp:35
friend class boost::serialization::access
Definition OnDDate.hpp:37
friend class FacBomManager
Definition OnDDate.hpp:36
const CabinClassPairList_T & getCabinClassPairList(const std::string &iStr) const
Definition OnDDate.hpp:116
void setTotalForecast(const CabinCode_T &, const WTPDemandPair_T &)
Definition OnDDate.cpp:76
BomAbstract * _parent
Definition OnDDate.hpp:222
std::string toString() const
Definition OnDDate.cpp:37
CabinForecastMap_T _cabinForecastMap
Definition OnDDate.hpp:242
const Key_T & getKey() const
Definition OnDDate.hpp:50
const stdair::AirportCode_T getOrigin() const
Definition OnDDate.hpp:75
void fromStream(std::istream &ioIn)
Definition OnDDate.hpp:156
Key of a given O&D-date, made of a list of OnD strings. a OnD string contains the airline code,...