StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 #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 _classYieldMapHolder;
40  }
41 
44  return _bidPriceVectorHolder;
45  }
46 
49  return _classBpvMapHolder;
50  }
51 
54  return _fareOptionList;
55  }
56 
59  return _fareOptionList;
60  }
61 
64  assert (_chosenFareOption != NULL);
65  return *_chosenFareOption;
66  }
67 
68  public:
69  // /////////// Setters ///////////////
71  void addSegment (const std::string&);
72 
75 
77  void addClassYieldMap (const ClassYieldMap_T&);
78 
80  void addBidPriceVector (const BidPriceVector_T&);
81 
83  void addClassBpvMap (const ClassBpvMap_T&);
84 
86  void addFareOption (const FareOptionStruct&);
87 
89  void setChosenFareOption (const FareOptionStruct& iChosenFO) {
90  _chosenFareOption = &iChosenFO;
91  }
92 
93 
94  public:
95  // /////////// Display support method /////////////
101  void toStream (std::ostream& ioOut) const;
102 
107  void fromStream (std::istream& ioIn);
108 
112  const std::string describe() const;
113 
117  const std::string display() const;
118 
119 
120  public:
121  // //////////// Constructors & Destructor ///////////////
126 
131 
132 
133  private:
134  // ///////////////////// Attributes //////////////////////
138  SegmentPath_T _segmentPath;
139 
143  ClassAvailabilityMapHolder_T _classAvailabilityMapHolder;
144 
148  ClassYieldMapHolder_T _classYieldMapHolder;
149 
153  BidPriceVectorHolder_T _bidPriceVectorHolder;
154 
158  ClassBpvMapHolder_T _classBpvMapHolder;
159 
163  FareOptionList_T _fareOptionList;
164 
168  const FareOptionStruct* _chosenFareOption;
169  };
170 
171 }
172 #endif // __STDAIR_BOM_TRAVELSOLUTIONSTRUCT_HPP