AirInv Logo  1.00.7
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
12
13namespace 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}
stdair::SeatIndex_T _seatIndex
stdair::CabinCapacity_T _availability
void fill(stdair::Bucket &) const
const std::string describe() const
stdair::NbOfSeats_T _nbOfSeats
stdair::Yield_T _yieldRangeUpperValue