1.00.0
C++ Standard Airline IT Object Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
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
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
Generated on Sat Dec 22 2012 16:51:53 for StdAir by
1.8.1.1