00001 #ifndef __STDAIR_BOM_YIELDFEATURES_HPP 00002 #define __STDAIR_BOM_YIELDFEATURES_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // StdAir 00008 #include <stdair/bom/BomAbstract.hpp> 00009 #include <stdair/bom/YieldFeaturesKey.hpp> 00010 #include <stdair/bom/YieldFeaturesTypes.hpp> 00011 00012 // Forward declaration 00013 namespace stdair { 00014 00019 class YieldFeatures : public BomAbstract { 00020 template <typename BOM> friend class FacBom; 00021 friend class FacBomManager; 00022 00023 public: 00024 // /////// Type definitions 00028 typedef YieldFeaturesKey Key_T; 00029 00030 public: 00031 // /////////// Display support methods ///////// 00037 void toStream (std::ostream& ioOut) const { 00038 ioOut << toString(); 00039 } 00040 00046 void fromStream (std::istream& ioIn) { 00047 } 00048 00052 std::string toString() const; 00053 00057 const std::string describeKey() const { 00058 return _key.toString(); 00059 } 00060 00061 public: 00062 // ////////// Getters //////////// 00066 const Key_T& getKey() const { 00067 return _key; 00068 } 00069 00073 BomAbstract* const getParent() const { 00074 return _parent; 00075 } 00076 00080 const HolderMap_T& getHolderMap() const { 00081 return _holderMap; 00082 } 00083 00087 const CabinCode_T& getCabinCode() const { 00088 return _key.getCabinCode(); 00089 } 00090 00094 const TripType_T& getTripType() const { 00095 return _key.getTripType(); 00096 } 00097 00098 00099 public: 00100 // ////////////// Business methods /////////////// 00105 bool isTripTypeValid (const TripType_T&) const; 00106 00107 00108 protected: 00109 // ////////// Constructors and destructors ///////// 00113 YieldFeatures (const Key_T&); 00114 00118 virtual ~YieldFeatures(); 00119 00120 private: 00124 YieldFeatures(); 00125 00129 YieldFeatures (const YieldFeatures&); 00130 00131 00132 protected: 00133 // ////////// Attributes ///////// 00137 Key_T _key; 00138 00142 BomAbstract* _parent; 00143 00147 HolderMap_T _holderMap; 00148 }; 00149 00150 } 00151 #endif // __STDAIR_BOM_YIELDFEATURES_HPP 00152