$treeview $search $mathjax
00001 #ifndef __STDAIR_BOM_SEGMENTSNAPSHOTTABLE_HPP 00002 #define __STDAIR_BOM_SEGMENTSNAPSHOTTABLE_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <iosfwd> 00009 #include <string> 00010 // StdAir 00011 #include <stdair/stdair_inventory_types.hpp> 00012 #include <stdair/bom/BomAbstract.hpp> 00013 #include <stdair/bom/SegmentSnapshotTableKey.hpp> 00014 #include <stdair/bom/SegmentSnapshotTableTypes.hpp> 00015 00017 namespace boost { 00018 namespace serialization { 00019 class access; 00020 } 00021 } 00022 00023 namespace stdair { 00024 // Forward declarations 00025 class SegmentCabin; 00026 00031 class SegmentSnapshotTable : public BomAbstract { 00032 template <typename BOM> friend class FacBom; 00033 friend class FacBomManager; 00034 friend class boost::serialization::access; 00035 00036 public: 00037 // ////////// Type definitions //////////// 00041 typedef SegmentSnapshotTableKey Key_T; 00042 00043 00044 public: 00045 // /////////// Getters /////////////// 00047 const Key_T& getKey() const { 00048 return _key; 00049 } 00050 00052 BomAbstract* const getParent() const { 00053 return _parent; 00054 } 00055 00057 const TableID_T& getTableID() const { 00058 return _key.getTableID(); 00059 } 00060 00064 const HolderMap_T& getHolderMap() const { 00065 return _holderMap; 00066 } 00067 00069 const SegmentCabinIndexMap_T& getSegmentCabinIndexMap() const { 00070 return _segmentCabinIndexMap; 00071 } 00072 00074 const ClassIndexMap_T& getClassIndexMap() const { 00075 return _classIndexMap; 00076 } 00077 00079 const ClassIndex_T& getClassIndex (const MapKey_T&) const; 00080 00082 const SegmentDataID_T& getSegmentDataID (const SegmentCabin&) const; 00083 00086 ConstSegmentCabinDTDSnapshotView_T 00087 getConstSegmentCabinDTDBookingSnapshotView (const SegmentDataID_T, 00088 const SegmentDataID_T, 00089 const DTD_T) const; 00090 00093 ConstSegmentCabinDTDRangeSnapshotView_T 00094 getConstSegmentCabinDTDRangeBookingSnapshotView (const SegmentDataID_T, 00095 const SegmentDataID_T, 00096 const DTD_T, 00097 const DTD_T) const; 00098 00101 SegmentCabinDTDSnapshotView_T 00102 getSegmentCabinDTDBookingSnapshotView (const SegmentDataID_T, 00103 const SegmentDataID_T, const DTD_T); 00104 00107 SegmentCabinDTDRangeSnapshotView_T 00108 getSegmentCabinDTDRangeBookingSnapshotView (const SegmentDataID_T, 00109 const SegmentDataID_T, 00110 const DTD_T, const DTD_T); 00111 00114 ConstSegmentCabinDTDSnapshotView_T 00115 getConstSegmentCabinDTDCancellationSnapshotView (const SegmentDataID_T, 00116 const SegmentDataID_T, 00117 const DTD_T) const; 00118 00121 ConstSegmentCabinDTDRangeSnapshotView_T 00122 getConstSegmentCabinDTDRangeCancellationSnapshotView (const SegmentDataID_T, 00123 const SegmentDataID_T, 00124 const DTD_T, 00125 const DTD_T) const; 00126 00129 SegmentCabinDTDSnapshotView_T 00130 getSegmentCabinDTDCancellationSnapshotView (const SegmentDataID_T, 00131 const SegmentDataID_T, 00132 const DTD_T); 00133 00136 SegmentCabinDTDRangeSnapshotView_T 00137 getSegmentCabinDTDRangeCancellationSnapshotView (const SegmentDataID_T, 00138 const SegmentDataID_T, 00139 const DTD_T, const DTD_T); 00140 00143 ConstSegmentCabinDTDSnapshotView_T 00144 getConstSegmentCabinDTDProductOrientedNetBookingSnapshotView 00145 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const; 00146 00149 ConstSegmentCabinDTDRangeSnapshotView_T 00150 getConstSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView 00151 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const; 00152 00155 SegmentCabinDTDSnapshotView_T 00156 getSegmentCabinDTDProductOrientedNetBookingSnapshotView 00157 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T); 00158 00161 SegmentCabinDTDRangeSnapshotView_T 00162 getSegmentCabinDTDRangeProductOrientedNetBookingSnapshotView 00163 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T); 00164 00167 ConstSegmentCabinDTDSnapshotView_T 00168 getConstSegmentCabinDTDPriceOrientedNetBookingSnapshotView 00169 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const; 00170 00173 ConstSegmentCabinDTDRangeSnapshotView_T 00174 getConstSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView 00175 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const; 00176 00179 SegmentCabinDTDSnapshotView_T 00180 getSegmentCabinDTDPriceOrientedNetBookingSnapshotView 00181 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T); 00182 00185 SegmentCabinDTDRangeSnapshotView_T 00186 getSegmentCabinDTDRangePriceOrientedNetBookingSnapshotView 00187 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T); 00188 00189 00192 ConstSegmentCabinDTDSnapshotView_T 00193 getConstSegmentCabinDTDProductOrientedGrossBookingSnapshotView 00194 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const; 00195 00198 ConstSegmentCabinDTDRangeSnapshotView_T 00199 getConstSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView 00200 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const; 00201 00204 SegmentCabinDTDSnapshotView_T 00205 getSegmentCabinDTDProductOrientedGrossBookingSnapshotView 00206 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T); 00207 00210 SegmentCabinDTDRangeSnapshotView_T 00211 getSegmentCabinDTDRangeProductOrientedGrossBookingSnapshotView 00212 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T); 00213 00216 ConstSegmentCabinDTDSnapshotView_T 00217 getConstSegmentCabinDTDPriceOrientedGrossBookingSnapshotView 00218 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T) const; 00219 00222 ConstSegmentCabinDTDRangeSnapshotView_T 00223 getConstSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView 00224 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T) const; 00225 00228 SegmentCabinDTDSnapshotView_T 00229 getSegmentCabinDTDPriceOrientedGrossBookingSnapshotView 00230 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T); 00231 00234 SegmentCabinDTDRangeSnapshotView_T 00235 getSegmentCabinDTDRangePriceOrientedGrossBookingSnapshotView 00236 (const SegmentDataID_T, const SegmentDataID_T, const DTD_T, const DTD_T); 00237 00238 00241 ConstSegmentCabinDTDSnapshotView_T 00242 getConstSegmentCabinDTDAvailabilitySnapshotView (const SegmentDataID_T, 00243 const SegmentDataID_T, 00244 const DTD_T) const; 00245 00248 ConstSegmentCabinDTDRangeSnapshotView_T 00249 getConstSegmentCabinDTDRangeAvailabilitySnapshotView (const SegmentDataID_T, 00250 const SegmentDataID_T, 00251 const DTD_T, 00252 const DTD_T) const; 00253 00256 SegmentCabinDTDSnapshotView_T 00257 getSegmentCabinDTDAvailabilitySnapshotView (const SegmentDataID_T, 00258 const SegmentDataID_T, 00259 const DTD_T); 00260 00263 SegmentCabinDTDRangeSnapshotView_T 00264 getSegmentCabinDTDRangeAvailabilitySnapshotView (const SegmentDataID_T, 00265 const SegmentDataID_T, 00266 const DTD_T, const DTD_T); 00267 00268 00269 public: 00270 // //////////// Setters ///////////// 00273 void initSnapshotBlocks (const SegmentCabinIndexMap_T&, 00274 const ClassIndexMap_T&); 00275 00276 public: 00277 // /////////// Display support methods ///////// 00283 void toStream (std::ostream& ioOut) const { 00284 ioOut << toString(); 00285 } 00286 00292 void fromStream (std::istream& ioIn) { 00293 } 00294 00298 std::string toString() const; 00299 00303 const std::string describeKey() const { 00304 return _key.toString(); 00305 } 00306 00307 00308 public: 00309 // /////////// (Boost) Serialisation support methods ///////// 00313 template<class Archive> 00314 void serialize (Archive& ar, const unsigned int iFileVersion); 00315 00316 private: 00321 void serialisationImplementationExport() const; 00322 void serialisationImplementationImport(); 00323 00324 00325 protected: 00326 // ////////// Constructors and destructors ///////// 00330 SegmentSnapshotTable (const Key_T&); 00331 00335 virtual ~SegmentSnapshotTable(); 00336 00337 private: 00341 SegmentSnapshotTable(); 00342 00346 SegmentSnapshotTable (const SegmentSnapshotTable&); 00347 00348 00349 protected: 00350 // ////////// Attributes ///////// 00352 Key_T _key; 00353 00355 BomAbstract* _parent; 00356 00358 HolderMap_T _holderMap; 00359 00361 SegmentCabinIndexMap_T _segmentCabinIndexMap; 00362 00365 ClassIndexMap_T _classIndexMap; 00366 00368 SnapshotBlock_T _bookingSnapshotBlock; 00369 00371 SnapshotBlock_T _cancellationSnapshotBlock; 00372 00374 SnapshotBlock_T _productOrientedNetBookingSnapshotBlock; 00375 00377 SnapshotBlock_T _priceOrientedNetBookingSnapshotBlock; 00378 00380 SnapshotBlock_T _productOrientedGrossBookingSnapshotBlock; 00381 00383 SnapshotBlock_T _priceOrientedGrossBookingSnapshotBlock; 00384 00386 SnapshotBlock_T _availabilitySnapshotBlock; 00387 }; 00388 00389 } 00390 #endif // __STDAIR_BOM_SEGMENTSNAPSHOTTABLE_HPP 00391