StdAir Logo  1.00.8
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 // 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 
149 
150 
151  private:
152  // ///////////////////// Attributes //////////////////////
156  SegmentPath_T _segmentPath;
157 
161  ClassAvailabilityMapHolder_T _classAvailabilityMapHolder;
162 
166  ClassObjectIDMapHolder_T _classObjectIDMapHolder;
167 
171  ClassYieldMapHolder_T _classYieldMapHolder;
172 
176  BidPriceVectorHolder_T _bidPriceVectorHolder;
177 
181  ClassBpvMapHolder_T _classBpvMapHolder;
182 
186  FareOptionList_T _fareOptionList;
187 
191  const FareOptionStruct* _chosenFareOption;
192  };
193 
194 }
195 #endif // __STDAIR_BOM_TRAVELSOLUTIONSTRUCT_HPP
void fromStream(std::istream &ioIn)
std::map< const ClassCode_T, Availability_T > ClassAvailabilityMap_T
const SegmentPath_T & getSegmentPath() const
std::map< const ClassCode_T, const BidPriceVector_T * > ClassBpvMap_T
std::list< ClassYieldMap_T > ClassYieldMapHolder_T
std::list< ClassAvailabilityStruct > ClassAvailabilityMapHolder_T
std::map< const ClassCode_T, BookingClassID_T > ClassObjectIDMap_T
void addClassBpvMap(const ClassBpvMap_T &)
std::map< const ClassCode_T, YieldValue_T > ClassYieldMap_T
const std::string describeSegmentPath() const
const std::string display() const
Base class for the light structures.
const FareOptionList_T & getFareOptionList() const
Structure holding the elements of a fare option.
Structure holding the elements of a travel solution.
void addClassYieldMap(const ClassYieldMap_T &)
std::list< ClassObjectIDMap_T > ClassObjectIDMapHolder_T
const ClassYieldMapHolder_T & getClassYieldMapHolder() const
std::vector< BidPrice_T > BidPriceVector_T
void addFareOption(const FareOptionStruct &)
std::list< ClassBpvMap_T > ClassBpvMapHolder_T
FareOptionList_T & getFareOptionListRef()
std::list< FareOptionStruct > FareOptionList_T
std::list< BidPriceVector_T > BidPriceVectorHolder_T
const ClassObjectIDMapHolder_T & getClassObjectIDMapHolder() const
KeyList_T SegmentPath_T
void addBidPriceVector(const BidPriceVector_T &)
const ClassAvailabilityMapHolder_T & getClassAvailabilityMapHolder() const
void toStream(std::ostream &ioOut) const
const FareOptionStruct & getChosenFareOption() const
void setChosenFareOption(const FareOptionStruct &iChosenFO)
const std::string describe() const
const BidPriceVectorHolder_T & getBidPriceVectorHolder() const
void addClassAvailabilityMap(const ClassAvailabilityMap_T &)
void addSegment(const std::string &)
void addClassObjectIDMap(const ClassObjectIDMap_T &)
const ClassBpvMapHolder_T & getClassBpvMapHolder() const