$treeview $search $mathjax
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 template <typename BOM> friend class FacCloneBom; 00022 friend class FacBomManager; 00023 00024 public: 00025 // /////// Type definitions 00029 typedef YieldFeaturesKey Key_T; 00030 00031 public: 00032 // /////////// Display support methods ///////// 00038 void toStream (std::ostream& ioOut) const { 00039 ioOut << toString(); 00040 } 00041 00047 void fromStream (std::istream& ioIn) { 00048 } 00049 00053 std::string toString() const; 00054 00058 const std::string describeKey() const { 00059 return _key.toString(); 00060 } 00061 00062 public: 00063 // ////////// Getters //////////// 00067 const Key_T& getKey() const { 00068 return _key; 00069 } 00070 00074 BomAbstract* const getParent() const { 00075 return _parent; 00076 } 00077 00081 const HolderMap_T& getHolderMap() const { 00082 return _holderMap; 00083 } 00084 00088 const CabinCode_T& getCabinCode() const { 00089 return _key.getCabinCode(); 00090 } 00091 00095 const TripType_T& getTripType() const { 00096 return _key.getTripType(); 00097 } 00098 00099 00100 public: 00101 // ////////////// Business methods /////////////// 00106 bool isTripTypeValid (const TripType_T&) const; 00107 00108 00109 protected: 00110 // ////////// Constructors and destructors ///////// 00114 YieldFeatures (const Key_T&); 00115 00119 virtual ~YieldFeatures(); 00120 00121 private: 00125 YieldFeatures(); 00126 00130 YieldFeatures (const YieldFeatures&); 00131 00132 00133 protected: 00134 // ////////// Attributes ///////// 00138 Key_T _key; 00139 00143 BomAbstract* _parent; 00144 00148 HolderMap_T _holderMap; 00149 }; 00150 00151 } 00152 #endif // __STDAIR_BOM_YIELDFEATURES_HPP 00153