StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
TravelSolutionStruct.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_TRAVELSOLUTIONSTRUCT_HPP
2 #define __STDAIR_BOM_TRAVELSOLUTIONSTRUCT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 #include <vector>
11 // StdAir
18 
19 namespace stdair {
20 
25  public:
26  // /////////// Getters ///////////////
28  const SegmentPath_T& getSegmentPath() const {
29  return _segmentPath;
30  }
31 
34  return _classAvailabilityMapHolder;
35  }
36 
39  return _classObjectIDMapHolder;
40  }
41 
44  return _classYieldMapHolder;
45  }
46 
49  return _bidPriceVectorHolder;
50  }
51 
54  return _classBpvMapHolder;
55  }
56 
59  return _fareOptionList;
60  }
61 
64  return _fareOptionList;
65  }
66 
69  assert (_chosenFareOption != NULL);
70  return *_chosenFareOption;
71  }
72 
73  public:
74  // /////////// Setters ///////////////
76  void addSegment (const std::string&);
77 
80 
83 
85  void addClassYieldMap (const ClassYieldMap_T&);
86 
88  void addBidPriceVector (const BidPriceVector_T&);
89 
91  void addClassBpvMap (const ClassBpvMap_T&);
92 
94  void addFareOption (const FareOptionStruct&);
95 
97  void setChosenFareOption (const FareOptionStruct& iChosenFO) {
98  _chosenFareOption = &iChosenFO;
99  }
100 
101 
102  public:
103  // /////////// Display support method /////////////
109  void toStream (std::ostream& ioOut) const;
110 
115  void fromStream (std::istream& ioIn);
116 
120  const std::string describe() const;
121 
125  const std::string display() const;
126 
130  const std::string describeSegmentPath() const;
131 
132 
133  public:
134  // //////////// Constructors & Destructor ///////////////
139 
144 
145 
146  private:
147  // ///////////////////// Attributes //////////////////////
151  SegmentPath_T _segmentPath;
152 
156  ClassAvailabilityMapHolder_T _classAvailabilityMapHolder;
157 
161  ClassObjectIDMapHolder_T _classObjectIDMapHolder;
162 
166  ClassYieldMapHolder_T _classYieldMapHolder;
167 
171  BidPriceVectorHolder_T _bidPriceVectorHolder;
172 
176  ClassBpvMapHolder_T _classBpvMapHolder;
177 
181  FareOptionList_T _fareOptionList;
182 
186  const FareOptionStruct* _chosenFareOption;
187  };
188 
189 }
190 #endif // __STDAIR_BOM_TRAVELSOLUTIONSTRUCT_HPP
void addClassYieldMap(const ClassYieldMap_T &)
Structure holding the elements of a fare option.
void fromStream(std::istream &ioIn)
std::list< ClassBpvMap_T > ClassBpvMapHolder_T
std::vector< BidPrice_T > BidPriceVector_T
void toStream(std::ostream &ioOut) const
Handle on the StdAir library context.
void addBidPriceVector(const BidPriceVector_T &)
void addClassAvailabilityMap(const ClassAvailabilityMap_T &)
void addFareOption(const FareOptionStruct &)
const std::string describe() const
std::map< const ClassCode_T, Availability_T > ClassAvailabilityMap_T
const ClassBpvMapHolder_T & getClassBpvMapHolder() const
Base class for the light structures.
Structure holding the elements of a travel solution.
const ClassAvailabilityMapHolder_T & getClassAvailabilityMapHolder() const
std::list< ClassYieldMap_T > ClassYieldMapHolder_T
std::list< ClassAvailabilityMap_T > ClassAvailabilityMapHolder_T
const ClassObjectIDMapHolder_T & getClassObjectIDMapHolder() const
const FareOptionList_T & getFareOptionList() const
const std::string display() const
std::list< FareOptionStruct > FareOptionList_T
FareOptionList_T & getFareOptionListRef()
std::list< ClassObjectIDMap_T > ClassObjectIDMapHolder_T
std::map< const ClassCode_T, BookingClassID_T > ClassObjectIDMap_T
const FareOptionStruct & getChosenFareOption() const
void addSegment(const std::string &)
const SegmentPath_T & getSegmentPath() const
const ClassYieldMapHolder_T & getClassYieldMapHolder() const
const BidPriceVectorHolder_T & getBidPriceVectorHolder() const
const std::string describeSegmentPath() const
std::list< BidPriceVector_T > BidPriceVectorHolder_T
void setChosenFareOption(const FareOptionStruct &iChosenFO)
void addClassBpvMap(const ClassBpvMap_T &)
std::map< const ClassCode_T, YieldValue_T > ClassYieldMap_T
void addClassObjectIDMap(const ClassObjectIDMap_T &)
std::map< const ClassCode_T, const BidPriceVector_T * > ClassBpvMap_T
KeyList_T SegmentPath_T