it_bus_pdk/simple_pool.h

00001 #ifndef _IT_BUS_PDK_SIMPLE_POOL_H_
00002 #define _IT_BUS_PDK_SIMPLE_POOL_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_dsa/vector.h>
00008 #include <it_bus/types.h>
00009 
00010 namespace IT_Bus
00011 {   
00015     template<class T, class TFactory>
00016     class SimplePool
00017     {
00018       public:
00022         SimplePool(
00023             TFactory& factory
00024         );
00025 
00026         SimplePool();
00027 
00031         virtual
00032         ~SimplePool();
00033 
00043         T*
00044         get_pool_entry() throw((Exception));
00045 
00052         void
00053         return_pool_entry(
00054             T*
00055         ) throw((Exception));
00056 
00057         void
00058         set_factory(
00059             TFactory*
00060         ) ;
00061         
00062       private:
00063         SimplePool(
00064             const SimplePool&
00065         );
00066 
00067         SimplePool&
00068         operator=(
00069             const SimplePool&
00070         );
00071 
00072         TFactory*       m_factory;
00073         IT_Vector<T*>     m_pool;
00074     };
00075 }
00076 
00077 #if IT_SUPPORTS_COMPILE_TIME_INSTANTIATION
00078 #include <it_bus_pdk/simple_pool.cxx>
00079 #endif
00080 
00081 #endif  

Generated on Tue Mar 20 15:27:53 2007 for Artix by  doxygen 1.5.1-p1