1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
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
BomAbstract.hpp
BucketKey.hpp
BucketTypes.hpp
stdair_inventory_types.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::CabinCapacity_T
double CabinCapacity_T
Definition
stdair_inventory_types.hpp:51
stdair::SeatIndex_T
unsigned int SeatIndex_T
Definition
stdair_inventory_types.hpp:131
stdair::HolderMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition
BomAbstract.hpp:63
stdair::Yield_T
double Yield_T
Definition
stdair_inventory_types.hpp:113
stdair::NbOfSeats_T
double NbOfSeats_T
Definition
stdair_basic_types.hpp:92
boost
Forward declarations.
Definition
AirlineClassList.hpp:16
boost::serialization
Definition
AirlineClassList.hpp:17
stdair::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:53
stdair::Bucket
Class representing the actual attributes for an airline booking class.
Definition
Bucket.hpp:29
stdair::Bucket::getParent
BomAbstract *const getParent() const
Definition
Bucket.hpp:54
stdair::Bucket::toString
std::string toString() const
Definition
Bucket.cpp:42
stdair::Bucket::describeKey
const std::string describeKey() const
Definition
Bucket.hpp:128
stdair::Bucket::fromStream
void fromStream(std::istream &ioIn)
Definition
Bucket.hpp:117
stdair::Bucket::_key
Key_T _key
Definition
Bucket.hpp:179
stdair::Bucket::_holderMap
HolderMap_T _holderMap
Definition
Bucket.hpp:189
stdair::Bucket::getYieldRangeUpperValue
const Yield_T & getYieldRangeUpperValue() const
Definition
Bucket.hpp:69
stdair::Bucket::getSeatIndex
const SeatIndex_T & getSeatIndex() const
Definition
Bucket.hpp:64
stdair::Bucket::Key_T
BucketKey Key_T
Definition
Bucket.hpp:40
stdair::Bucket::setSoldSeats
void setSoldSeats(const NbOfSeats_T &iSoldSeats)
Definition
Bucket.hpp:96
stdair::Bucket::getHolderMap
const HolderMap_T & getHolderMap() const
Definition
Bucket.hpp:59
stdair::Bucket::_parent
BomAbstract * _parent
Definition
Bucket.hpp:184
stdair::Bucket::setYieldRangeUpperValue
void setYieldRangeUpperValue(const Yield_T &iYield)
Definition
Bucket.hpp:86
stdair::Bucket::getAvailability
const CabinCapacity_T & getAvailability() const
Definition
Bucket.hpp:74
stdair::Bucket::getSoldSeats
const NbOfSeats_T & getSoldSeats() const
Definition
Bucket.hpp:79
stdair::Bucket::getKey
const Key_T & getKey() const
Definition
Bucket.hpp:47
stdair::Bucket::toStream
void toStream(std::ostream &ioOut) const
Definition
Bucket.hpp:108
stdair::Bucket::_availability
CabinCapacity_T _availability
Definition
Bucket.hpp:202
stdair::Bucket::_yieldRangeUpperValue
Yield_T _yieldRangeUpperValue
Definition
Bucket.hpp:197
stdair::Bucket::FacBom
friend class FacBom
Definition
Bucket.hpp:30
stdair::Bucket::~Bucket
virtual ~Bucket()
Definition
Bucket.cpp:38
stdair::Bucket::setAvailability
void setAvailability(const CabinCapacity_T &iAvl)
Definition
Bucket.hpp:91
stdair::Bucket::FacCloneBom
friend class FacCloneBom
Definition
Bucket.hpp:31
stdair::Bucket::access
friend class boost::serialization::access
Definition
Bucket.hpp:33
stdair::Bucket::FacBomManager
friend class FacBomManager
Definition
Bucket.hpp:32
stdair::Bucket::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition
Bucket.cpp:64
stdair::Bucket::_soldSeats
NbOfSeats_T _soldSeats
Definition
Bucket.hpp:207
stdair::Bucket::Bucket
Bucket(const Key_T &)
Definition
Bucket.cpp:34
stdair::BucketKey
Key of booking-class.
Definition
BucketKey.hpp:26
Generated for StdAir by
1.17.0