$treeview $search $mathjax
00001 // ////////////////////////////////////////////////////////////////////// 00002 // Import section 00003 // ////////////////////////////////////////////////////////////////////// 00004 // STL 00005 #include <cassert> 00006 #include <sstream> 00007 // StdAir 00008 #include <stdair/basic/BasConst_General.hpp> 00009 #include <stdair/bom/Bucket.hpp> 00010 // AirInv 00011 #include <airinv/bom/BucketStruct.hpp> 00012 00013 namespace AIRINV { 00014 00015 // ////////////////////////////////////////////////////////////////////// 00016 BucketStruct::BucketStruct() : _nbOfSeats (0.0) { 00017 } 00018 00019 // ////////////////////////////////////////////////////////////////////// 00020 const std::string BucketStruct::describe() const { 00021 std::ostringstream ostr; 00022 ostr << " " << _yieldRangeUpperValue << ":" << _availability 00023 << ":" << _nbOfSeats << ":" << _seatIndex 00024 << std::endl; 00025 return ostr.str(); 00026 } 00027 00028 // ////////////////////////////////////////////////////////////////////// 00029 void BucketStruct::fill (stdair::Bucket& ioBucket) const { 00030 // Set the Yield Range Upper Value 00031 ioBucket.setYieldRangeUpperValue (_yieldRangeUpperValue); 00032 00033 // Set the Availability 00034 ioBucket.setAvailability (_availability); 00035 00036 // Set the number of sold seats 00037 ioBucket.setSoldSeats (_nbOfSeats); 00038 } 00039 00040 }