Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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

Public Member Functions

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

Private Types

using alloc_traits = typename std::allocator_traits< Alloc >
 

Private Attributes

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

Detailed Description

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

Definition at line 108 of file mapbox_earcut.h.

Member Typedef Documentation

◆ alloc_traits

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

Definition at line 144 of file mapbox_earcut.h.

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

Definition at line 110 of file mapbox_earcut.h.

◆ 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

Definition at line 111 of file mapbox_earcut.h.

◆ ~ObjectPool()

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

Definition at line 114 of file mapbox_earcut.h.

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

Definition at line 137 of file mapbox_earcut.h.

◆ 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

Definition at line 118 of file mapbox_earcut.h.

◆ 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

Definition at line 128 of file mapbox_earcut.h.

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

Definition at line 143 of file mapbox_earcut.h.

◆ 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

Definition at line 142 of file mapbox_earcut.h.

◆ 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

Definition at line 141 of file mapbox_earcut.h.

◆ 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

Definition at line 139 of file mapbox_earcut.h.

◆ 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

Definition at line 140 of file mapbox_earcut.h.


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