1.00.3
C++ Simulated Airline Inventory Management System library
BucketStruct.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
#include <sstream>
7
// StdAir
8
#include <stdair/basic/BasConst_General.hpp>
9
#include <stdair/bom/Bucket.hpp>
10
// AirInv
11
#include <
airinv/bom/BucketStruct.hpp
>
12
13
namespace
AIRINV
{
14
15
// //////////////////////////////////////////////////////////////////////
16
BucketStruct::BucketStruct
() : _nbOfSeats (0.0) {
17
}
18
19
// //////////////////////////////////////////////////////////////////////
20
const
std::string
BucketStruct::describe
()
const
{
21
std::ostringstream ostr;
22
ostr <<
" "
<<
_yieldRangeUpperValue
<<
":"
<<
_availability
23
<<
":"
<<
_nbOfSeats
<<
":"
<<
_seatIndex
24
<< std::endl;
25
return
ostr.str();
26
}
27
28
// //////////////////////////////////////////////////////////////////////
29
void
BucketStruct::fill
(stdair::Bucket& ioBucket)
const
{
30
// Set the Yield Range Upper Value
31
ioBucket.setYieldRangeUpperValue (
_yieldRangeUpperValue
);
32
33
// Set the Availability
34
ioBucket.setAvailability (
_availability
);
35
36
// Set the number of sold seats
37
ioBucket.setSoldSeats (
_nbOfSeats
);
38
}
39
40
}
AIRINV::BucketStruct::describe
const std::string describe() const
Definition:
BucketStruct.cpp:20
BucketStruct.hpp
AIRINV::BucketStruct::_nbOfSeats
stdair::NbOfSeats_T _nbOfSeats
Definition:
BucketStruct.hpp:30
AIRINV::BucketStruct::_availability
stdair::CabinCapacity_T _availability
Definition:
BucketStruct.hpp:29
AIRINV
Definition:
AIRINV_Master_Service.hpp:38
AIRINV::BucketStruct::_seatIndex
stdair::SeatIndex_T _seatIndex
Definition:
BucketStruct.hpp:31
AIRINV::BucketStruct::fill
void fill(stdair::Bucket &) const
Definition:
BucketStruct.cpp:29
AIRINV::BucketStruct::BucketStruct
BucketStruct()
Definition:
BucketStruct.cpp:16
AIRINV::BucketStruct::_yieldRangeUpperValue
stdair::Yield_T _yieldRangeUpperValue
Definition:
BucketStruct.hpp:28
Generated on Tue Jan 28 2020 00:00:00 for AirInv by
1.8.17