1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
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
11
#include <
stdair/stdair_inventory_types.hpp
>
12
#include <
stdair/stdair_maths_types.hpp
>
13
#include <
stdair/stdair_basic_types.hpp
>
14
#include <
stdair/stdair_demand_types.hpp
>
15
#include <
stdair/stdair_rm_types.hpp
>
16
#include <
stdair/bom/BomAbstract.hpp
>
17
#include <
stdair/bom/OnDDateKey.hpp
>
18
#include <
stdair/bom/OnDDateTypes.hpp
>
19
21
namespace
boost
{
22
namespace
serialization
{
23
class
access;
24
}
25
}
26
27
namespace
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
;
37
friend
class
boost::serialization::access
;
38
39
public
:
40
// ////////// Type definitions ////////////
44
typedef
OnDDateKey
Key_T
;
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
75
const
stdair::AirportCode_T
getOrigin
()
const
{
76
return
_key
.getOrigin();
77
}
78
80
const
stdair::AirportCode_T
getDestination
()
const
{
81
return
_key
.getDestination();
82
}
83
87
const
HolderMap_T
&
getHolderMap
()
const
{
88
return
_holderMap
;
89
}
90
94
const
StringDemandStructMap_T
&
getDemandInfoMap
()
const
{
95
return
_classPathDemandMap
;
96
}
97
101
const
CabinForecastMap_T
&
getTotalForecastMap
()
const
{
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
{
117
assert (
_stringCabinClassPairListMap
.find(iStr)!=
_stringCabinClassPairListMap
.end());
118
return
_stringCabinClassPairListMap
.find(iStr)->second;
119
}
120
124
const
short
getNbOfSegments
()
const
{
125
return
_key
.getNbOfSegments();
126
}
127
128
public
:
129
// /////////// Setters ///////////////
131
void
setDemandInformation
(
const
CabinClassPairList_T
&,
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 /////////
217
Key_T
_key
;
218
222
BomAbstract
*
_parent
;
223
227
HolderMap_T
_holderMap
;
228
232
StringDemandStructMap_T
_classPathDemandMap
;
233
237
StringCabinClassPairListMap_T
_stringCabinClassPairListMap
;
238
242
CabinForecastMap_T
_cabinForecastMap
;
243
};
244
245
}
246
#endif
// __STDAIR_BOM_ONDDATE_HPP
BomAbstract.hpp
OnDDateKey.hpp
OnDDateTypes.hpp
stdair_basic_types.hpp
stdair_demand_types.hpp
stdair_inventory_types.hpp
stdair_maths_types.hpp
stdair_rm_types.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::Date_T
boost::gregorian::date Date_T
Definition
stdair_date_time_types.hpp:20
stdair::StringCabinClassPairListMap_T
std::map< std::string, CabinClassPairList_T > StringCabinClassPairListMap_T
Definition
OnDDateTypes.hpp:41
stdair::WTPDemandPair_T
std::pair< WTP_T, MeanStdDevPair_T > WTPDemandPair_T
Definition
stdair_demand_types.hpp:77
stdair::HolderMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition
BomAbstract.hpp:63
stdair::CabinForecastMap_T
std::map< CabinCode_T, WTPDemandPair_T > CabinForecastMap_T
Definition
OnDDateTypes.hpp:48
stdair::CabinClassPairList_T
std::list< CabinClassPair_T > CabinClassPairList_T
Definition
stdair_demand_types.hpp:108
stdair::StringDemandStructMap_T
std::map< std::string, YieldDemandPair_T > StringDemandStructMap_T
Definition
OnDDateTypes.hpp:33
stdair::AirlineCode_T
std::string AirlineCode_T
Definition
stdair_basic_types.hpp:31
stdair::AirportCode_T
LocationCode_T AirportCode_T
Definition
stdair_basic_types.hpp:22
stdair::CabinCode_T
std::string CabinCode_T
Definition
stdair_basic_types.hpp:41
stdair::YieldDemandPair_T
std::pair< Yield_T, MeanStdDevPair_T > YieldDemandPair_T
Definition
stdair_inventory_types.hpp:122
boost
Forward declarations.
Definition
AirlineClassList.hpp:16
boost::serialization
Definition
AirlineClassList.hpp:17
stdair::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:53
stdair::OnDDate::getParent
BomAbstract *const getParent() const
Definition
OnDDate.hpp:55
stdair::OnDDate::toStream
void toStream(std::ostream &ioOut) const
Definition
OnDDate.hpp:147
stdair::OnDDate::getDestination
const stdair::AirportCode_T getDestination() const
Definition
OnDDate.hpp:80
stdair::OnDDate::describeKey
const std::string describeKey() const
Definition
OnDDate.hpp:167
stdair::OnDDate::getTotalForecast
const WTPDemandPair_T & getTotalForecast(const CabinCode_T &iCC) const
Definition
OnDDate.hpp:108
stdair::OnDDate::_holderMap
HolderMap_T _holderMap
Definition
OnDDate.hpp:227
stdair::OnDDate::_stringCabinClassPairListMap
StringCabinClassPairListMap_T _stringCabinClassPairListMap
Definition
OnDDate.hpp:237
stdair::OnDDate::OnDDate
OnDDate(const Key_T &)
Definition
OnDDate.cpp:28
stdair::OnDDate::getDate
const stdair::Date_T getDate() const
Definition
OnDDate.hpp:70
stdair::OnDDate::_classPathDemandMap
StringDemandStructMap_T _classPathDemandMap
Definition
OnDDate.hpp:232
stdair::OnDDate::getNbOfSegments
const short getNbOfSegments() const
Definition
OnDDate.hpp:124
stdair::OnDDate::getTotalForecastMap
const CabinForecastMap_T & getTotalForecastMap() const
Definition
OnDDate.hpp:101
stdair::OnDDate::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
stdair::OnDDate::Key_T
OnDDateKey Key_T
Definition
OnDDate.hpp:44
stdair::OnDDate::getDemandInfoMap
const StringDemandStructMap_T & getDemandInfoMap() const
Definition
OnDDate.hpp:94
stdair::OnDDate::~OnDDate
virtual ~OnDDate()
Definition
OnDDate.cpp:33
stdair::OnDDate::getHolderMap
const HolderMap_T & getHolderMap() const
Definition
OnDDate.hpp:87
stdair::OnDDate::setDemandInformation
void setDemandInformation(const CabinClassPairList_T &, const YieldDemandPair_T &)
Definition
OnDDate.cpp:53
stdair::OnDDate::_key
Key_T _key
Definition
OnDDate.hpp:217
stdair::OnDDate::FacBom
friend class FacBom
Definition
OnDDate.hpp:34
stdair::OnDDate::getAirlineCode
const AirlineCode_T & getAirlineCode() const
Definition
OnDDate.cpp:44
stdair::OnDDate::FacCloneBom
friend class FacCloneBom
Definition
OnDDate.hpp:35
stdair::OnDDate::access
friend class boost::serialization::access
Definition
OnDDate.hpp:37
stdair::OnDDate::FacBomManager
friend class FacBomManager
Definition
OnDDate.hpp:36
stdair::OnDDate::getCabinClassPairList
const CabinClassPairList_T & getCabinClassPairList(const std::string &iStr) const
Definition
OnDDate.hpp:116
stdair::OnDDate::setTotalForecast
void setTotalForecast(const CabinCode_T &, const WTPDemandPair_T &)
Definition
OnDDate.cpp:76
stdair::OnDDate::_parent
BomAbstract * _parent
Definition
OnDDate.hpp:222
stdair::OnDDate::toString
std::string toString() const
Definition
OnDDate.cpp:37
stdair::OnDDate::_cabinForecastMap
CabinForecastMap_T _cabinForecastMap
Definition
OnDDate.hpp:242
stdair::OnDDate::getKey
const Key_T & getKey() const
Definition
OnDDate.hpp:50
stdair::OnDDate::getOrigin
const stdair::AirportCode_T getOrigin() const
Definition
OnDDate.hpp:75
stdair::OnDDate::fromStream
void fromStream(std::istream &ioIn)
Definition
OnDDate.hpp:156
stdair::OnDDateKey
Key of a given O&D-date, made of a list of OnD strings. a OnD string contains the airline code,...
Definition
OnDDateKey.hpp:23
Generated for StdAir by
1.17.0