1.00.0
C++ Simulated Airline Inventory Management System library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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
}
Generated on Tue Dec 25 2012 22:19:41 for AirInv by
1.8.1.1