#include <it_bus_pdk/simple_pool.h>
Definition at line 16 of file simple_pool.h.
Public Member Functions | |
SimplePool (TFactory &factory) | |
Constructor. | |
virtual | ~SimplePool () |
Destructor. | |
T * | get_pool_entry () IT_THROW_DECL((Exception)) |
Method used to get an entry from the pool. | |
void | return_pool_entry (T *) IT_THROW_DECL((Exception)) |
Method used to return an object back to the pool. | |
Private Attributes | |
TFactory * | m_factory |
IT_Vector< T * > | m_pool |
T* IT_Bus::SimplePool< T, TFactory >::get_pool_entry | ( | ) |
Method used to get an entry from the pool.
This will call TCreate::new_instance if there are no free entries in the pool. This will throw Exception if TFactory::new_instance creates a null object
void IT_Bus::SimplePool< T, TFactory >::return_pool_entry | ( | T * | ) |
Method used to return an object back to the pool.
It will throw an exception if that object was not obtained from the pool.
A | pointer to the object to be repooled |