$treeview $search $mathjax
AirInv Logo  1.00.1
$projectbrief
$projectbrief
$searchbox

FareFamilyStruct.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_Inventory.hpp>
00009 #include <stdair/bom/FareFamily.hpp>
00010 // AirInv
00011 #include <airinv/bom/FareFamilyStruct.hpp>
00012 
00013 namespace AIRINV {
00014 
00015   // //////////////////////////////////////////////////////////////////////
00016   FareFamilyStruct::FareFamilyStruct()
00017     : _familyCode (stdair::DEFAULT_NULL_FARE_FAMILY_CODE),
00018       _classes (stdair::DEFAULT_NULL_CLASS_CODE) {  
00019   }
00020 
00021   // //////////////////////////////////////////////////////////////////////
00022   FareFamilyStruct::
00023   FareFamilyStruct (const stdair::FamilyCode_T& iFamilyCode,
00024                     const stdair::CurveKey_T& iFRAT5Key,
00025                     const stdair::CurveKey_T& iFFDisutilityKey,
00026                     const stdair::ClassList_String_T& iClasses)
00027     : _familyCode (iFamilyCode), _frat5CurveKey (iFRAT5Key),
00028       _ffDisutilityCurveKey (iFFDisutilityKey), _classes (iClasses) {
00029   }
00030 
00031   // //////////////////////////////////////////////////////////////////////
00032   const std::string FareFamilyStruct::describe() const {
00033     std::ostringstream ostr;
00034 
00035     ostr << "        " << _familyCode << " "
00036          << _frat5CurveKey << " " << _ffDisutilityCurveKey
00037          << " " << _classes << ", ";
00038 
00039     for (BookingClassStructList_T::const_iterator itBkgClass= _classList.begin();
00040          itBkgClass != _classList.end(); ++itBkgClass) {
00041       const BookingClassStruct& lBkgClass = *itBkgClass;
00042       ostr << lBkgClass.describe();
00043     }
00044     if (_classList.empty() == false) {
00045       ostr << std::endl;
00046     }
00047 
00048     return ostr.str();
00049   }
00050 
00051   // //////////////////////////////////////////////////////////////////////
00052   void FareFamilyStruct::fill (stdair::FareFamily& ioFareFamily) const {
00053     // Set attributes
00054     // ioFareFamily.setSomeAttribute (_someAttribute);
00055   }
00056 
00057 }