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
Bucket.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_BUCKET_HPP
2
#define __STDAIR_BOM_BUCKET_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/bom/BomAbstract.hpp
>
13
#include <
stdair/bom/BucketKey.hpp
>
14
#include <
stdair/bom/BucketTypes.hpp
>
15
17
namespace
boost {
18
namespace
serialization {
19
class
access;
20
}
21
}
22
23
namespace
stdair {
24
29
class
Bucket
:
public
BomAbstract
{
30
template
<
typename
BOM>
friend
class
FacBom
;
31
template
<
typename
BOM>
friend
class
FacCloneBom
;
32
friend
class
FacBomManager
;
33
friend
class
boost::serialization::access
;
34
35
public
:
36
// //////////////// Type definitions //////////////////
40
typedef
BucketKey
Key_T
;
41
42
public
:
43
// /////////// Getters ////////////
47
const
Key_T
&
getKey
()
const
{
48
return
_key
;
49
}
50
54
BomAbstract
*
const
getParent
()
const
{
55
return
_parent
;
56
}
57
59
const
HolderMap_T
&
getHolderMap
()
const
{
60
return
_holderMap
;
61
}
62
64
const
SeatIndex_T
&
getSeatIndex
()
const
{
65
return
_key
.
getSeatIndex
();
66
}
67
69
const
Yield_T
&
getYieldRangeUpperValue
()
const
{
70
return
_yieldRangeUpperValue
;
71
}
72
74
const
CabinCapacity_T
&
getAvailability
()
const
{
75
return
_availability
;
76
}
77
79
const
NbOfSeats_T
&
getSoldSeats
()
const
{
80
return
_soldSeats
;
81
}
82
83
84
// /////////// Setters ////////////
86
void
setYieldRangeUpperValue
(
const
Yield_T
& iYield) {
87
_yieldRangeUpperValue
= iYield;
88
}
89
91
void
setAvailability
(
const
CabinCapacity_T
& iAvl) {
92
_availability
= iAvl;
93
}
94
96
void
setSoldSeats
(
const
NbOfSeats_T
& iSoldSeats) {
97
_soldSeats
= iSoldSeats;
98
}
99
100
101
public
:
102
// /////////// Display support methods /////////
108
void
toStream
(std::ostream& ioOut)
const
{
109
ioOut <<
toString
();
110
}
111
117
void
fromStream
(std::istream& ioIn) {
118
}
119
123
std::string
toString
()
const
;
124
128
const
std::string
describeKey
()
const
{
129
return
_key
.
toString
();
130
}
131
132
133
public
:
134
// /////////// (Boost) Serialisation support methods /////////
138
template
<
class
Archive>
139
void
serialize
(Archive& ar,
const
unsigned
int
iFileVersion);
140
141
private
:
146
void
serialisationImplementationExport()
const
;
147
void
serialisationImplementationImport();
148
149
150
protected
:
151
// ////////// Constructors and destructors /////////
155
Bucket
(
const
Key_T
&);
156
160
virtual
~Bucket
();
161
162
private
:
166
Bucket
();
167
171
Bucket
(
const
Bucket
&);
172
173
174
protected
:
175
// //////////////////// Children ///////////////////
179
Key_T
_key
;
180
184
BomAbstract
*
_parent
;
185
189
HolderMap_T
_holderMap
;
190
191
192
protected
:
193
// //////////////////// Attributes ///////////////////
197
Yield_T
_yieldRangeUpperValue
;
198
202
CabinCapacity_T
_availability
;
203
207
NbOfSeats_T
_soldSeats
;
208
};
209
210
}
211
#endif // __STDAIR_BOM_BUCKET_HPP
212
Generated on Sat Dec 22 2012 16:51:53 for StdAir by
1.8.1.1