0.45.1
C++ Standard Airline IT Object Library
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
friend
class
FacBomManager
;
36
friend
class
boost::serialization::access
;
37
38
public
:
39
// ////////// Type definitions ////////////
43
typedef
OnDDateKey
Key_T
;
44
45
46
public
:
47
// /////////// Getters ///////////////
49
const
Key_T
&
getKey
()
const
{
50
return
_key
;
51
}
52
54
BomAbstract
*
const
getParent
()
const
{
55
return
_parent
;
56
}
57
65
const
AirlineCode_T
&
getAirlineCode
()
const
;
66
67
69
const
stdair::Date_T
getDate
()
const
{
70
return
_key
.
getDate
();
71
}
72
74
const
stdair::AirportCode_T
getOrigin
()
const
{
75
return
_key
.
getOrigin
();
76
}
77
79
const
stdair::AirportCode_T
getDestination
()
const
{
80
return
_key
.
getDestination
();
81
}
82
86
const
HolderMap_T
&
getHolderMap
()
const
{
87
return
_holderMap
;
88
}
89
93
const
StringDemandStructMap_T
&
getDemandInfoMap
()
const
{
94
return
_classPathDemandMap
;
95
}
96
100
const
CabinForecastMap_T
&
getTotalForecastMap
()
const
{
101
return
_cabinForecastMap
;
102
}
103
107
const
WTPDemandPair_T
&
getTotalForecast
(
const
CabinCode_T
& iCC)
const
{
108
assert (
_cabinForecastMap
.find(iCC)!=
_cabinForecastMap
.end());
109
return
_cabinForecastMap
.find(iCC)->second;
110
}
111
115
const
CabinClassPairList_T
&
getCabinClassPairList
(
const
std::string& iStr)
const
{
116
assert (
_stringCabinClassPairListMap
.find(iStr)!=
_stringCabinClassPairListMap
.end());
117
return
_stringCabinClassPairListMap
.find(iStr)->second;
118
}
119
123
const
short
getNbOfSegments
()
const
{
124
return
_key
.
getNbOfSegments
();
125
}
126
127
public
:
128
// /////////// Setters ///////////////
130
void
setDemandInformation
(
const
CabinClassPairList_T
&,
131
const
YieldDemandPair_T
&);
132
133
135
void
setTotalForecast
(
const
CabinCode_T
&,
136
const
WTPDemandPair_T
&);
137
138
139
public
:
140
// /////////// Display support methods /////////
146
void
toStream
(std::ostream& ioOut)
const
{
147
ioOut <<
toString
();
148
}
149
155
void
fromStream
(std::istream& ioIn) {
156
}
157
161
std::string
toString
()
const
;
162
166
const
std::string
describeKey
()
const
{
167
return
_key
.
toString
();
168
}
169
170
171
public
:
172
// /////////// (Boost) Serialisation support methods /////////
176
template
<
class
Archive>
177
void
serialize
(Archive& ar,
const
unsigned
int
iFileVersion);
178
179
private
:
184
void
serialisationImplementation();
185
186
187
protected
:
188
// ////////// Constructors and destructors /////////
192
OnDDate
(
const
Key_T
&);
193
197
virtual
~OnDDate
();
198
199
private
:
203
OnDDate
();
204
208
OnDDate
(
const
OnDDate
&);
209
210
211
protected
:
212
// ////////// Attributes /////////
216
Key_T
_key
;
217
221
BomAbstract
*
_parent
;
222
226
HolderMap_T
_holderMap
;
227
231
StringDemandStructMap_T
_classPathDemandMap
;
232
236
StringCabinClassPairListMap_T
_stringCabinClassPairListMap
;
237
241
CabinForecastMap_T
_cabinForecastMap
;
242
};
243
244
}
245
#endif // __STDAIR_BOM_ONDDATE_HPP
Generated on Fri Aug 17 2012 16:00:33 for StdAir by
1.8.1.2