QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
Tools::PointerPool< X > Class Template Reference

#include <PointerPool.h>

Public Member Functions

PoolPointer< X > acquire ()
 
uint32_t getCapacity () const
 
 PointerPool (uint32_t capacity)
 
void release (X *p)
 
void setCapacity (uint32_t c)
 
 ~PointerPool ()
 

Public Attributes

uint64_t m_hits
 
uint64_t m_misses
 
uint64_t m_pointerCount
 

Private Attributes

uint32_t m_capacity
 
std::stack< X * > m_pool
 

Constructor & Destructor Documentation

◆ PointerPool()

template<class X >
Tools::PointerPool< X >::PointerPool ( uint32_t capacity)
inlineexplicit

◆ ~PointerPool()

template<class X >
Tools::PointerPool< X >::~PointerPool ( )
inline

Member Function Documentation

◆ acquire()

template<class X >
PoolPointer< X > Tools::PointerPool< X >::acquire ( )
inline

◆ getCapacity()

template<class X >
uint32_t Tools::PointerPool< X >::getCapacity ( ) const
inline

◆ release()

template<class X >
void Tools::PointerPool< X >::release ( X * p)
inline

◆ setCapacity()

template<class X >
void Tools::PointerPool< X >::setCapacity ( uint32_t c)
inline

Member Data Documentation

◆ m_capacity

template<class X >
uint32_t Tools::PointerPool< X >::m_capacity
private

◆ m_hits

template<class X >
uint64_t Tools::PointerPool< X >::m_hits

◆ m_misses

template<class X >
uint64_t Tools::PointerPool< X >::m_misses

◆ m_pointerCount

template<class X >
uint64_t Tools::PointerPool< X >::m_pointerCount

◆ m_pool

template<class X >
std::stack<X*> Tools::PointerPool< X >::m_pool
private

The documentation for this class was generated from the following file: