1 #ifndef __STDAIR_FAC_FACCLONEBOM_HPP
2 #define __STDAIR_FAC_FACCLONEBOM_HPP
21 template <
typename BOM>
25 typedef std::list<BOM*> BomPool_T;
26 typedef typename BOM::Key_T Key_T;
42 BOM&
clone (
const BOM&);
79 template <
typename BOM> FacCloneBom<BOM>* FacCloneBom<BOM>::_instance = NULL;
83 if (_instance == NULL) {
85 assert (_instance != NULL);
95 for (
typename BomPool_T::iterator itBom = _pool.begin();
96 itBom != _pool.end(); ++itBom) {
97 BOM* currentBom_ptr = *itBom;
98 assert (currentBom_ptr != NULL);
99 delete currentBom_ptr; currentBom_ptr = NULL;
111 BOM* oBom_ptr =
new BOM (iBom);
112 assert (oBom_ptr != NULL);
113 _pool.push_back (oBom_ptr);
118 #endif // __STDAIR_FAC_FACCLONEBOM_HPP