1 #ifndef __STDAIR_FAC_FACBOM_HPP
2 #define __STDAIR_FAC_FACBOM_HPP
21 template <
typename BOM>
25 typedef std::list<BOM*> BomPool_T;
26 typedef typename BOM::Key_T Key_T;
43 BOM&
create (
const Key_T&);
80 template <
typename BOM> FacBom<BOM>* FacBom<BOM>::_instance = NULL;
84 if (_instance == NULL) {
86 assert (_instance != NULL);
96 for (
typename BomPool_T::iterator itBom = _pool.begin();
97 itBom != _pool.end(); ++itBom) {
98 BOM* currentBom_ptr = *itBom;
99 assert (currentBom_ptr != NULL);
100 delete currentBom_ptr; currentBom_ptr = NULL;
113 return instance().create (lKey);
118 BOM* oBom_ptr =
new BOM (iKey);
119 assert (oBom_ptr != NULL);
120 _pool.push_back (oBom_ptr);
125 #endif // __STDAIR_FAC_FACBOM_HPP