00001 #ifndef __STDAIR_BOM_BOMHOLDER_HPP 00002 #define __STDAIR_BOM_BOMHOLDER_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <iosfwd> 00009 #include <string> 00010 #include <list> 00011 #include <map> 00012 // StdAir 00013 #include <stdair/bom/key_types.hpp> 00014 #include <stdair/bom/BomAbstract.hpp> 00015 #include <stdair/bom/BomHolderKey.hpp> 00016 00017 namespace stdair { 00018 00023 template <typename BOM> 00024 class BomHolder : public stdair::BomAbstract { 00026 template <typename> friend class FacBom; 00027 friend class FacBomManager; 00028 00029 public: 00030 // ///////////////// Type definitions //////////////// 00034 typedef stdair::BomHolderKey Key_T; 00035 00039 typedef std::list<BOM*> BomList_T; 00040 00044 typedef std::map<const MapKey_T, BOM*> BomMap_T; 00045 00046 00047 public: 00048 // /////////// Display support methods ///////// 00054 void toStream (std::ostream& ioOut) const { 00055 ioOut << toString(); 00056 } 00057 00063 void fromStream (std::istream& ioIn) { 00064 } 00065 00069 std::string toString() const { 00070 return "BomHolder"; 00071 } 00072 00076 const std::string describeKey() const { 00077 return "BomHolder"; 00078 } 00079 00080 protected: 00084 BomHolder(); 00085 00089 BomHolder (const BomHolder&); 00090 00094 BomHolder (const Key_T& iKey) : _key (iKey) { } 00095 00099 ~BomHolder() { }; 00100 00101 public: 00102 // //////////////// Attributes ////////////////// 00106 Key_T _key; 00107 00111 BomList_T _bomList; 00112 00116 BomMap_T _bomMap; 00117 }; 00118 00119 } 00120 #endif // __STDAIR_BOM_BOMHOLDER_HPP