AirInv Logo  0.1.2
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
BookingClassStruct.cpp
Go to the documentation of this file.
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/BookingClass.hpp>
00010 // AirInv
00011 #include <airinv/bom/BookingClassStruct.hpp>
00012 
00013 namespace AIRINV {
00014 
00015   // //////////////////////////////////////////////////////////////////////
00016   BookingClassStruct::BookingClassStruct () {
00017   }
00018   
00019   // //////////////////////////////////////////////////////////////////////
00020   stdair::ClassCode_T BookingClassStruct::getFullSubclassCode() const {
00021     std::ostringstream oStr;
00022     oStr << _classCode << _subclassCode;
00023     return oStr.str();
00024   }
00025   
00026   // //////////////////////////////////////////////////////////////////////
00027   const std::string BookingClassStruct::describe() const {
00028     std::ostringstream ostr;
00029     ostr << "            " << _classCode << _subclassCode
00030          << " (" << _parentClassCode << _parentSubclassCode << ")"
00031          << ", " << _cumulatedProtection << ":" << _protection
00032          << ", " << _nego
00033          << ", " << _noShowPercentage << ":" << _overbookingPercentage
00034          << ", " << _nbOfBookings << ":" << _nbOfGroupBookings
00035          << ":" << _nbOfPendingGroupBookings << ":" << _nbOfStaffBookings
00036          << ":" << _nbOfWLBookings << ":" << _etb
00037          << ", " << _netClassAvailability  << ":" << _segmentAvailability
00038          << ":" << _netRevenueAvailability
00039          << std::endl;
00040     return ostr.str();
00041   }
00042 
00043   // //////////////////////////////////////////////////////////////////////
00044   void BookingClassStruct::fill (stdair::BookingClass& ioBookingClass) const {
00045     // Set the Yield Range Upper Value
00046     // ioBookingClass.setYieldRangeValue (_yieldRangeUpperValue);
00047 
00048     // Set the Availability
00049     // ioBookingClass.setAvailability (_availability);
00050 
00051     // Set the number of seats
00052     // ioBookingClass.setNbOfSeats (_nbOfSeats);
00053       
00054     // Set the Seat Index
00055     // ioBookingClass.setSeatIndex (_seatIndex);
00056   }
00057 
00058 }