#include <BasicQueueLinkPool_T.h>
Public Types | |
typedef BasicQueueLink< T > | LinkType |
Public Member Functions | |
BasicQueueLinkPool (size_t links_per_pool, size_t num_pools) | |
~BasicQueueLinkPool () | |
LinkType * | obtain (T *elem) |
void | release (LinkType *link) |
Private Types | |
typedef BasicQueueLinkAllocator< T > | AllocatorType |
Private Attributes | |
ACE_Allocator * | allocator_ |
Definition at line 19 of file BasicQueueLinkPool_T.h.
typedef BasicQueueLinkAllocator<T> OpenDDS::DCPS::BasicQueueLinkPool< T >::AllocatorType [private] |
Definition at line 22 of file BasicQueueLinkPool_T.h.
typedef BasicQueueLink<T> OpenDDS::DCPS::BasicQueueLinkPool< T >::LinkType |
Definition at line 26 of file BasicQueueLinkPool_T.h.
OpenDDS::DCPS::BasicQueueLinkPool< T >::BasicQueueLinkPool | ( | size_t | links_per_pool, | |
size_t | num_pools | |||
) | [inline] |
Definition at line 30 of file BasicQueueLinkPool_T.h.
References OpenDDS::DCPS::BasicQueueLinkPool< T >::allocator_.
00030 { 00031 this->allocator_ = new AllocatorType(links_per_pool, num_pools); 00032 }
OpenDDS::DCPS::BasicQueueLinkPool< T >::~BasicQueueLinkPool | ( | ) | [inline] |
Definition at line 34 of file BasicQueueLinkPool_T.h.
References OpenDDS::DCPS::BasicQueueLinkPool< T >::allocator_.
00034 { 00035 delete this->allocator_; 00036 }
LinkType* OpenDDS::DCPS::BasicQueueLinkPool< T >::obtain | ( | T * | elem | ) | [inline] |
Definition at line 38 of file BasicQueueLinkPool_T.h.
Referenced by OpenDDS::DCPS::BasicQueue< OpenDDS::DCPS::TransportQueueElement >::put().
00038 { 00039 LinkType* link; 00040 00041 ACE_NEW_MALLOC_RETURN( 00042 link, 00043 (LinkType*)this->allocator_->malloc(sizeof(LinkType)), 00044 LinkType(elem), 00045 0); 00046 00047 return link; 00048 }
void OpenDDS::DCPS::BasicQueueLinkPool< T >::release | ( | LinkType * | link | ) | [inline] |
Definition at line 50 of file BasicQueueLinkPool_T.h.
References OpenDDS::DCPS::BasicQueueLinkPool< T >::allocator_, and OpenDDS::DCPS::BasicQueueLink< T >::reset().
Referenced by OpenDDS::DCPS::BasicQueue< OpenDDS::DCPS::TransportQueueElement >::get(), and OpenDDS::DCPS::BasicQueue< OpenDDS::DCPS::TransportQueueElement >::remove_next().
00050 { 00051 link->reset(); 00052 this->allocator_->free(link); 00053 }
ACE_Allocator* OpenDDS::DCPS::BasicQueueLinkPool< T >::allocator_ [private] |
Definition at line 57 of file BasicQueueLinkPool_T.h.
Referenced by OpenDDS::DCPS::BasicQueueLinkPool< T >::BasicQueueLinkPool(), OpenDDS::DCPS::BasicQueueLinkPool< T >::release(), and OpenDDS::DCPS::BasicQueueLinkPool< T >::~BasicQueueLinkPool().