StdAir Logo  1.00.8
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 /////////
353 
356 
359 
362 
366 
369 
372 
375 
378 
381 
384 
387  };
388 
389 }
390 #endif // __STDAIR_BOM_SEGMENTSNAPSHOTTABLE_HPP
391 
stdair::SegmentSnapshotTable::getSegmentCabinDTDPriceOrientedGrossBookingSnapshotView
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDPriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:379
stdair::SnapshotBlock_T
boost::multi_array< double, 2 > SnapshotBlock_T
Definition: stdair_inventory_types.hpp:159
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDPriceOrientedNetBookingSnapshotView
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDPriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:255
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDProductOrientedNetBookingSnapshotView
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:205
SegmentSnapshotTableTypes.hpp
stdair::SegmentSnapshotTable::describeKey
const std::string describeKey() const
Definition: SegmentSnapshotTable.hpp:303
stdair::SegmentSnapshotTable::_parent
BomAbstract * _parent
Definition: SegmentSnapshotTable.hpp:355
stdair::SegmentSnapshotTable::_productOrientedGrossBookingSnapshotBlock
SnapshotBlock_T _productOrientedGrossBookingSnapshotBlock
Definition: SegmentSnapshotTable.hpp:380
stdair::SegmentSnapshotTable::getSegmentCabinDTDRangeCancellationSnapshotView
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:192
stdair::SegmentSnapshotTable::getSegmentCabinDTDCancellationSnapshotView
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:180
stdair::SegmentSnapshotTable::getHolderMap
const HolderMap_T & getHolderMap() const
Definition: SegmentSnapshotTable.hpp:64
stdair::SegmentSnapshotTable::access
friend class boost::serialization::access
Definition: SegmentSnapshotTable.hpp:34
stdair::SegmentSnapshotTable::_classIndexMap
ClassIndexMap_T _classIndexMap
Definition: SegmentSnapshotTable.hpp:365
stdair::SegmentSnapshotTable::Key_T
SegmentSnapshotTableKey Key_T
Definition: SegmentSnapshotTable.hpp:41
stdair::SegmentSnapshotTable::getSegmentDataID
const SegmentDataID_T & getSegmentDataID(const SegmentCabin &) const
Definition: SegmentSnapshotTable.cpp:98
stdair::SegmentSnapshotTable::_productOrientedNetBookingSnapshotBlock
SnapshotBlock_T _productOrientedNetBookingSnapshotBlock
Definition: SegmentSnapshotTable.hpp:374
stdair::SegmentSnapshotTable::_key
Key_T _key
Definition: SegmentSnapshotTable.hpp:352
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDRangeBookingSnapshotView
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:120
stdair::SegmentSnapshotTable::getClassIndex
const ClassIndex_T & getClassIndex(const MapKey_T &) const
Definition: SegmentSnapshotTable.cpp:89
stdair::SegmentSnapshotTable::fromStream
void fromStream(std::istream &ioIn)
Definition: SegmentSnapshotTable.hpp:292
stdair_inventory_types.hpp
stdair::SegmentSnapshotTable::getTableID
const TableID_T & getTableID() const
Definition: SegmentSnapshotTable.hpp:57
stdair::BomAbstract
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
stdair::ClassIndex_T
unsigned short ClassIndex_T
Definition: stdair_inventory_types.hpp:184
stdair::SegmentSnapshotTable::getSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:391
stdair::SegmentSnapshotTable::getSegmentCabinDTDProductOrientedNetBookingSnapshotView
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:229
stdair::ConstSegmentCabinDTDRangeSnapshotView_T
SnapshotBlock_T::const_array_view< 2 >::type ConstSegmentCabinDTDRangeSnapshotView_T
Definition: stdair_inventory_types.hpp:174
stdair::SegmentDataID_T
unsigned short SegmentDataID_T
Definition: stdair_inventory_types.hpp:177
stdair::SegmentSnapshotTable::getKey
const Key_T & getKey() const
Definition: SegmentSnapshotTable.hpp:47
stdair::SegmentSnapshotTable::getSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:241
stdair::DTD_T
short DTD_T
Definition: stdair_inventory_types.hpp:90
stdair::SegmentCabinDTDSnapshotView_T
SnapshotBlock_T::array_view< 1 >::type SegmentCabinDTDSnapshotView_T
Definition: stdair_inventory_types.hpp:165
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:218
stdair::SegmentCabin
Class representing the actual attributes for an airline segment-cabin.
Definition: SegmentCabin.hpp:39
stdair
Handle on the StdAir library context.
Definition: BasChronometer.cpp:9
stdair::SegmentCabinDTDRangeSnapshotView_T
SnapshotBlock_T::array_view< 2 >::type SegmentCabinDTDRangeSnapshotView_T
Definition: stdair_inventory_types.hpp:168
stdair::HolderMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
stdair::SegmentSnapshotTable::getSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:340
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDPriceOrientedGrossBookingSnapshotView
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDPriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:354
stdair::SegmentSnapshotTable::_priceOrientedGrossBookingSnapshotBlock
SnapshotBlock_T _priceOrientedGrossBookingSnapshotBlock
Definition: SegmentSnapshotTable.hpp:383
stdair::SegmentSnapshotTable::_bookingSnapshotBlock
SnapshotBlock_T _bookingSnapshotBlock
Definition: SegmentSnapshotTable.hpp:368
stdair::MapKey_T
std::string MapKey_T
Definition: key_types.hpp:15
stdair::SegmentSnapshotTable::getSegmentCabinDTDRangeAvailabilitySnapshotView
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:438
stdair::SegmentSnapshotTable::_cancellationSnapshotBlock
SnapshotBlock_T _cancellationSnapshotBlock
Definition: SegmentSnapshotTable.hpp:371
stdair::SegmentSnapshotTable::toString
std::string toString() const
Definition: SegmentSnapshotTable.cpp:42
BomAbstract.hpp
stdair::SegmentSnapshotTable::toStream
void toStream(std::ostream &ioOut) const
Definition: SegmentSnapshotTable.hpp:283
stdair::SegmentSnapshotTable::getSegmentCabinDTDPriceOrientedNetBookingSnapshotView
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDPriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:279
stdair::SegmentSnapshotTableKey
Key of a given guillotine block, made of a guillotine number.
Definition: SegmentSnapshotTableKey.hpp:26
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDCancellationSnapshotView
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:156
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDBookingSnapshotView
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:107
stdair::SegmentSnapshotTable::_holderMap
HolderMap_T _holderMap
Definition: SegmentSnapshotTable.hpp:358
stdair::SegmentSnapshotTable::getSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:291
boost
Forward declarations.
Definition: AirlineClassList.hpp:16
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDRangeCancellationSnapshotView
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeCancellationSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:169
stdair::SegmentSnapshotTable::~SegmentSnapshotTable
virtual ~SegmentSnapshotTable()
Definition: SegmentSnapshotTable.cpp:38
stdair::SegmentSnapshotTableKey::getTableID
const TableID_T & getTableID() const
Definition: SegmentSnapshotTableKey.hpp:56
stdair::FacBomManager
Utility class for linking StdAir-based objects.
Definition: FacBomManager.hpp:30
stdair::SegmentSnapshotTable::getClassIndexMap
const ClassIndexMap_T & getClassIndexMap() const
Definition: SegmentSnapshotTable.hpp:74
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDAvailabilitySnapshotView
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:403
stdair::ConstSegmentCabinDTDSnapshotView_T
SnapshotBlock_T::const_array_view< 1 >::type ConstSegmentCabinDTDSnapshotView_T
Definition: stdair_inventory_types.hpp:171
stdair::ClassIndexMap_T
std::map< const MapKey_T, ClassIndex_T > ClassIndexMap_T
Definition: SegmentSnapshotTableTypes.hpp:34
stdair::SegmentSnapshotTable::_availabilitySnapshotBlock
SnapshotBlock_T _availabilitySnapshotBlock
Definition: SegmentSnapshotTable.hpp:386
stdair::SegmentSnapshotTable::_segmentCabinIndexMap
SegmentCabinIndexMap_T _segmentCabinIndexMap
Definition: SegmentSnapshotTable.hpp:361
stdair::SegmentSnapshotTable
Class representing the actual attributes for an airline segment data tables.
Definition: SegmentSnapshotTable.hpp:31
stdair::SegmentCabinIndexMap_T
std::map< const SegmentCabin *, SegmentDataID_T > SegmentCabinIndexMap_T
Definition: SegmentSnapshotTableTypes.hpp:31
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:268
stdair::SegmentSnapshotTable::getSegmentCabinDTDRangeBookingSnapshotView
SegmentCabinDTDRangeSnapshotView_T getSegmentCabinDTDRangeBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:143
SegmentSnapshotTableKey.hpp
stdair::FacBom
Base class for Factory layer.
Definition: FacBom.hpp:22
stdair::SegmentSnapshotTableKey::toString
const std::string toString() const
Definition: SegmentSnapshotTableKey.cpp:49
stdair::SegmentSnapshotTable::initSnapshotBlocks
void initSnapshotBlocks(const SegmentCabinIndexMap_T &, const ClassIndexMap_T &)
Definition: SegmentSnapshotTable.cpp:50
stdair::SegmentSnapshotTable::getSegmentCabinDTDBookingSnapshotView
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:131
stdair::SegmentSnapshotTable::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition: SegmentSnapshotTable.cpp:465
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDRangeAvailabilitySnapshotView
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:415
stdair::SegmentSnapshotTable::getSegmentCabinIndexMap
const SegmentCabinIndexMap_T & getSegmentCabinIndexMap() const
Definition: SegmentSnapshotTable.hpp:69
stdair::SegmentSnapshotTable::getSegmentCabinDTDAvailabilitySnapshotView
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDAvailabilitySnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:426
stdair::SegmentSnapshotTable::_priceOrientedNetBookingSnapshotBlock
SnapshotBlock_T _priceOrientedNetBookingSnapshotBlock
Definition: SegmentSnapshotTable.hpp:377
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDProductOrientedGrossBookingSnapshotView
ConstSegmentCabinDTDSnapshotView_T getConstSegmentCabinDTDProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:304
stdair::TableID_T
unsigned short TableID_T
Definition: stdair_basic_types.hpp:37
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:367
stdair::SegmentSnapshotTable::getParent
BomAbstract *const getParent() const
Definition: SegmentSnapshotTable.hpp:52
stdair::SegmentSnapshotTable::getConstSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView
ConstSegmentCabinDTDRangeSnapshotView_T getConstSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const
Definition: SegmentSnapshotTable.cpp:317
stdair::SegmentSnapshotTable::getSegmentCabinDTDProductOrientedGrossBookingSnapshotView
SegmentCabinDTDSnapshotView_T getSegmentCabinDTDProductOrientedGrossBookingSnapshotView(const SegmentDataID_T, const SegmentDataID_T, const DTD_T)
Definition: SegmentSnapshotTable.cpp:328