AirInv Logo  1.00.9
C++ Simulated Airline Inventory Management System Library
Loading...
Searching...
No Matches
FareFamilyStruct.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_Inventory.hpp>
9#include <stdair/bom/FareFamily.hpp>
10// AirInv
12
13namespace AIRINV {
14
15 // //////////////////////////////////////////////////////////////////////
17 : _familyCode (stdair::DEFAULT_NULL_FARE_FAMILY_CODE),
18 _classes (stdair::DEFAULT_NULL_CLASS_CODE) {
19 }
20
21 // //////////////////////////////////////////////////////////////////////
23 FareFamilyStruct (const stdair::FamilyCode_T& iFamilyCode,
24 const stdair::CurveKey_T& iFRAT5Key,
25 const stdair::CurveKey_T& iFFDisutilityKey,
26 const stdair::ClassList_String_T& iClasses)
27 : _familyCode (iFamilyCode), _frat5CurveKey (iFRAT5Key),
28 _ffDisutilityCurveKey (iFFDisutilityKey), _classes (iClasses) {
29 }
30
31 // //////////////////////////////////////////////////////////////////////
32 const std::string FareFamilyStruct::describe() const {
33 std::ostringstream ostr;
34
35 ostr << " " << _familyCode << " "
37 << " " << _classes << ", ";
38
39 for (BookingClassStructList_T::const_iterator itBkgClass= _classList.begin();
40 itBkgClass != _classList.end(); ++itBkgClass) {
41 const BookingClassStruct& lBkgClass = *itBkgClass;
42 ostr << lBkgClass.describe();
43 }
44 if (_classList.empty() == false) {
45 ostr << std::endl;
46 }
47
48 return ostr.str();
49 }
50
51 // //////////////////////////////////////////////////////////////////////
52 void FareFamilyStruct::fill (stdair::FareFamily& ioFareFamily) const {
53 // Set attributes
54 // ioFareFamily.setSomeAttribute (_someAttribute);
55 }
56
57}
Forward declarations.
const std::string describe() const
stdair::CurveKey_T _ffDisutilityCurveKey
stdair::CurveKey_T _frat5CurveKey
BookingClassStructList_T _classList
void fill(stdair::FareFamily &) const
stdair::FamilyCode_T _familyCode
stdair::ClassList_String_T _classes
const std::string describe() const