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&);
81 template <
typename BOM> FacBom<BOM>* FacBom<BOM>::_instance = NULL;
85 if (_instance == NULL) {
87 assert (_instance != NULL);
97 for (
typename BomPool_T::iterator itBom = _pool.begin();
98 itBom != _pool.end(); ++itBom) {
99 BOM* currentBom_ptr = *itBom;
100 assert (currentBom_ptr != NULL);
101 delete currentBom_ptr; currentBom_ptr = NULL;
114 return instance().create (lKey);
119 BOM* oBom_ptr =
new BOM (iKey);
120 assert (oBom_ptr != NULL);
121 _pool.push_back (oBom_ptr);
127 BOM* oBom_ptr =
new BOM (iBom);
128 assert (oBom_ptr != NULL);
129 _pool.push_back (oBom_ptr);
134 #endif // __STDAIR_FAC_FACBOM_HPP
static FacBom & instance()
Handle on the StdAir library context.
static FacSupervisor & instance()
Base class for Factory layer.
void registerPersistentBomFactory(FacAbstract *)