StdAir Logo  1.00.3
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;
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 
88  const SegmentDataID_T,
89  const DTD_T) const;
90 
95  const SegmentDataID_T,
96  const DTD_T,
97  const DTD_T) const;
98 
103  const SegmentDataID_T, const DTD_T);
104 
109  const SegmentDataID_T,
110  const DTD_T, const DTD_T);
111 
116  const SegmentDataID_T,
117  const DTD_T) const;
118 
123  const SegmentDataID_T,
124  const DTD_T,
125  const DTD_T) const;
126 
131  const SegmentDataID_T,
132  const DTD_T);
133 
138  const SegmentDataID_T,
139  const DTD_T, const DTD_T);
140 
145  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
146 
151  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
152 
157  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
158 
163  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
164 
169  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
170 
175  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
176 
181  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
182 
187  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
188 
189 
194  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
195 
200  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
201 
206  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
207 
212  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
213 
218  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const;
219 
224  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const;
225 
230  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T);
231 
236  (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T);
237 
238 
243  const SegmentDataID_T,
244  const DTD_T) const;
245 
250  const SegmentDataID_T,
251  const DTD_T,
252  const DTD_T) const;
253 
258  const SegmentDataID_T,
259  const DTD_T);
260 
265  const SegmentDataID_T,
266  const DTD_T, const DTD_T);
267 
268 
269  public:
270  // //////////// Setters /////////////
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 
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
SnapshotBlock_T::const_array_view< 1 >::type ConstSegmentCabinDTDSnapshotView_T
Key of a given guillotine block, made of a guillotine number.
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
const std::string describeKey() const
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
void initSnapshotBlocks(const SegmentCabinIndexMap_T &, const ClassIndexMap_T &)
SnapshotBlock_T _priceOrientedGrossBookingSnapshotBlock
SnapshotBlock_T::array_view< 2 >::type SegmentCabinDTDRangeSnapshotView_T
Utility class for linking StdAir-based objects.
SnapshotBlock_T _productOrientedGrossBookingSnapshotBlock
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
const HolderMap_T & getHolderMap() const
const SegmentCabinIndexMap_T & getSegmentCabinIndexMap() const
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Handle on the StdAir library context.
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
SnapshotBlock_T::array_view< 1 >::type SegmentCabinDTDSnapshotView_T
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
void toStream(std::ostream &ioOut) const
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
SegmentCabinIndexMap_T _segmentCabinIndexMap
std::string MapKey_T
Definition: key_types.hpp:15
const ClassIndexMap_T & getClassIndexMap() const
void fromStream(std::istream &ioIn)
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDPriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDPriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
BomAbstract *const getParent() const
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Base class for Factory layer.
Definition: FacBom.hpp:22
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
std::map< const MapKey_T, ClassIndex_T > ClassIndexMap_T
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
unsigned short SegmentDataID_T
SnapshotBlock_T::const_array_view< 2 >::type ConstSegmentCabinDTDRangeSnapshotView_T
SnapshotBlock_T _priceOrientedNetBookingSnapshotBlock
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
void serialize(Archive &ar, const unsigned int iFileVersion)
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
const TableID_T & getTableID() const
Forward declarations.
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDPriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
const TableID_T & getTableID() const
Class representing the actual attributes for an airline segment-cabin.
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDPriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
std::map< const SegmentCabin *, SegmentDataID_T > SegmentCabinIndexMap_T
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
const SegmentDataID_T & getSegmentDataID(const SegmentCabin &) const
friend class boost::serialization::access
unsigned short TableID_T
Class representing the actual attributes for an airline segment data tables.
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
boost::multi_array< double, 2 > SnapshotBlock_T
unsigned short ClassIndex_T
const ClassIndex_T & getClassIndex(const MapKey_T &) const
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
SnapshotBlock_T _productOrientedNetBookingSnapshotBlock