coordinates_generator
mapbox::detail::Earcut< N >::ObjectPool< T, Alloc > Class Template Reference

Public Member Functions

 ObjectPool ()
 
 ObjectPool (std::size_t blockSize_)
 
 ~ObjectPool ()
 
template<typename... Args>
T * construct (Args &&... args)
 
void reset (std::size_t newBlockSize)
 
void clear ()
 

Private Types

typedef std::allocator_traits< Alloc > alloc_traits
 

Private Attributes

T * currentBlock = nullptr
 
std::size_t currentIndex = 1
 
std::size_t blockSize = 1
 
std::vector< T * > allocations
 
Alloc alloc
 

Member Typedef Documentation

◆ alloc_traits

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
typedef std::allocator_traits<Alloc> mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::alloc_traits
private

Constructor & Destructor Documentation

◆ ObjectPool() [1/2]

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::ObjectPool ( )
inline

◆ ObjectPool() [2/2]

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::ObjectPool ( std::size_t  blockSize_)
inline

◆ ~ObjectPool()

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::~ObjectPool ( )
inline

Member Function Documentation

◆ clear()

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
void mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::clear ( )
inline

◆ construct()

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
template<typename... Args>
T* mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::construct ( Args &&...  args)
inline

◆ reset()

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
void mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::reset ( std::size_t  newBlockSize)
inline

Member Data Documentation

◆ alloc

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
Alloc mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::alloc
private

◆ allocations

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
std::vector<T*> mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::allocations
private

◆ blockSize

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
std::size_t mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::blockSize = 1
private

◆ currentBlock

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
T* mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::currentBlock = nullptr
private

◆ currentIndex

template<typename N = uint32_t>
template<typename T , typename Alloc = std::allocator<T>>
std::size_t mapbox::detail::Earcut< N >::ObjectPool< T, Alloc >::currentIndex = 1
private

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