StdAir Logo  1.00.6
C++ Standard Airline IT Object Library
SegmentSnapshotTable.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_SEGMENTSNAPSHOTTABLE_HPP
2 #define __STDAIR_BOM_SEGMENTSNAPSHOTTABLE_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
15 
17 namespace boost {
18  namespace serialization {
19  class access;
20  }
21 }
22 
23 namespace stdair {
24  // Forward declarations
25  class SegmentCabin;
26 
32  template <typename BOM> friend class FacBom;
33  friend class FacBomManager;
34  friend class boost::serialization::access;
35 
36  public:
37  // ////////// Type definitions ////////////
42 
43 
44  public:
45  // /////////// Getters ///////////////
47  const Key_T& getKey() const {
48  return _key;
49  }
50 
52  BomAbstract* const getParent() const {
53  return _parent;
54  }
55 
57  const TableID_T& getTableID() const {
58  return _key.getTableID();
59  }
60 
64  const HolderMap_T& getHolderMap() const {
65  return _holderMap;
66  }
67 
70  return _segmentCabinIndexMap;
71  }
72 
75  return _classIndexMap;
76  }
77 
79  const ClassIndex_T& getClassIndex (const MapKey_T&) const;
80 
82  const SegmentDataID_T& getSegmentDataID (const SegmentCabin&) const;
83 
87  getConstSegmentCabinDTDBookingSnapshotView (const SegmentDataID_T,
88  const SegmentDataID_T,
89  const DTD_T) const;
90 
94  getConstSegmentCabinDTDRangeBookingSnapshotView (const SegmentDataID_T,
95  const SegmentDataID_T,
96  const DTD_T,
97  const DTD_T) const;
98 
102  getSegmentCabinDTDBookingSnapshotView (const SegmentDataID_T,
103  const SegmentDataID_T, const DTD_T);
104 
108  getSegmentCabinDTDRangeBookingSnapshotView (const SegmentDataID_T,
109  const SegmentDataID_T,
110  const DTD_T, const DTD_T);
111 
115  getConstSegmentCabinDTDCancellationSnapshotView (const SegmentDataID_T,
116  const SegmentDataID_T,
117  const DTD_T) const;
118 
122  getConstSegmentCabinDTDRangeCancellationSnapshotView (const SegmentDataID_T,
123  const SegmentDataID_T,
124  const DTD_T,
125  const DTD_T) const;
126 
130  getSegmentCabinDTDCancellationSnapshotView (const SegmentDataID_T,
131  const SegmentDataID_T,
132  const DTD_T);
133 
137  getSegmentCabinDTDRangeCancellationSnapshotView (const SegmentDataID_T,
138  const SegmentDataID_T,
139  const DTD_T, const DTD_T);
140 
144  getConstSegmentCabinDTDProductOrientedNetBookingSnapshotView
145  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
146 
150  getConstSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView
151  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
152 
156  getSegmentCabinDTDProductOrientedNetBookingSnapshotView
157  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
158 
162  getSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView
163  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
164 
168  getConstSegmentCabinDTDPriceOrientedNetBookingSnapshotView
169  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
170 
174  getConstSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView
175  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
176 
180  getSegmentCabinDTDPriceOrientedNetBookingSnapshotView
181  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
182 
186  getSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView
187  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
188 
189 
193  getConstSegmentCabinDTDProductOrientedGrossBookingSnapshotView
194  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
195 
199  getConstSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView
200  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
201 
205  getSegmentCabinDTDProductOrientedGrossBookingSnapshotView
206  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
207 
211  getSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView
212  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
213 
217  getConstSegmentCabinDTDPriceOrientedGrossBookingSnapshotView
218  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
219 
223  getConstSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView
224  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
225 
229  getSegmentCabinDTDPriceOrientedGrossBookingSnapshotView
230  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
231 
235  getSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView
236  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
237 
238 
242  getConstSegmentCabinDTDAvailabilitySnapshotView (const SegmentDataID_T,
243  const SegmentDataID_T,
244  const DTD_T) const;
245 
249  getConstSegmentCabinDTDRangeAvailabilitySnapshotView (const SegmentDataID_T,
250  const SegmentDataID_T,
251  const DTD_T,
252  const DTD_T) const;
253 
257  getSegmentCabinDTDAvailabilitySnapshotView (const SegmentDataID_T,
258  const SegmentDataID_T,
259  const DTD_T);
260 
264  getSegmentCabinDTDRangeAvailabilitySnapshotView (const SegmentDataID_T,
265  const SegmentDataID_T,
266  const DTD_T, const DTD_T);
267 
268 
269  public:
270  // //////////// Setters /////////////
273  void initSnapshotBlocks (const SegmentCabinIndexMap_T&,
274  const ClassIndexMap_T&);
275 
276  public:
277  // /////////// Display support methods /////////
283  void toStream (std::ostream& ioOut) const {
284  ioOut << toString();
285  }
286 
292  void fromStream (std::istream& ioIn) {
293  }
294 
298  std::string toString() const;
299 
303  const std::string describeKey() const {
304  return _key.toString();
305  }
306 
307 
308  public:
309  // /////////// (Boost) Serialisation support methods /////////
313  template<class Archive>
314  void serialize (Archive& ar, const unsigned int iFileVersion);
315 
316  private:
321  void serialisationImplementationExport() const;
322  void serialisationImplementationImport();
323 
324 
325  protected:
326  // ////////// Constructors and destructors /////////
330  SegmentSnapshotTable (const Key_T&);
331 
335  virtual ~SegmentSnapshotTable();
336 
337  private:
342 
347 
348 
349  protected:
350  // ////////// Attributes /////////
352  Key_T _key;
353 
356 
359 
362 
366 
369 
372 
375 
378 
381 
384 
387  };
388 
389 }
390 #endif // __STDAIR_BOM_SEGMENTSNAPSHOTTABLE_HPP
391 
const HolderMap_T & getHolderMap() const
const ClassIndexMap_T & getClassIndexMap() const
SegmentCabinIndexMap_T _segmentCabinIndexMap
void fromStream(std::istream &ioIn)
BomAbstract *const getParent() const
SnapshotBlock_T::array_view< 1 >::type SegmentCabinDTDSnapshotView_T
const TableID_T & getTableID() const
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
Key of a given guillotine block, made of a guillotine number.
Forward declarations.
Class representing the actual attributes for an airline segment data tables.
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
SnapshotBlock_T::const_array_view< 2 >::type ConstSegmentCabinDTDRangeSnapshotView_T
std::map< const SegmentCabin *, SegmentDataID_T > SegmentCabinIndexMap_T
SnapshotBlock_T _productOrientedNetBookingSnapshotBlock
std::map< const MapKey_T, ClassIndex_T > ClassIndexMap_T
SnapshotBlock_T::array_view< 2 >::type SegmentCabinDTDRangeSnapshotView_T
Class representing the actual attributes for an airline segment-cabin.
Utility class for linking StdAir-based objects.
Handle on the StdAir library context.
boost::multi_array< double, 2 > SnapshotBlock_T
Base class for Factory layer.
Definition: FacBom.hpp:22
std::string MapKey_T
Definition: key_types.hpp:15
unsigned short SegmentDataID_T
void toStream(std::ostream &ioOut) const
SnapshotBlock_T _productOrientedGrossBookingSnapshotBlock
SnapshotBlock_T _priceOrientedGrossBookingSnapshotBlock
SnapshotBlock_T _priceOrientedNetBookingSnapshotBlock
SnapshotBlock_T::const_array_view< 1 >::type ConstSegmentCabinDTDSnapshotView_T
const std::string describeKey() const
unsigned short ClassIndex_T
const SegmentCabinIndexMap_T & getSegmentCabinIndexMap() const
unsigned short TableID_T