openMSX
Classes | Public Types | Public Member Functions | List of all members
ObjectPool< T > Class Template Reference

#include <ObjectPool.hh>

Inheritance diagram for ObjectPool< T >:
Inheritance graph
[legend]

Classes

struct  EmplaceResult
 

Public Types

using Index = uint32_t
 

Public Member Functions

template<typename... Args>
EmplaceResult emplace (Args &&...args)
 
const T & operator[] (Index idx) const
 
T & operator[] (Index idx)
 
void remove (Index idx)
 
Index capacity () const
 

Detailed Description

template<typename T>
class ObjectPool< T >

Definition at line 51 of file ObjectPool.hh.

Member Typedef Documentation

◆ Index

template<typename T >
using ObjectPool< T >::Index = uint32_t

Definition at line 54 of file ObjectPool.hh.

Member Function Documentation

◆ capacity()

template<typename T >
Index ObjectPool< T >::capacity ( ) const
inline

Definition at line 101 of file ObjectPool.hh.

Referenced by TEST_CASE().

◆ emplace()

template<typename T >
template<typename... Args>
EmplaceResult ObjectPool< T >::emplace ( Args &&...  args)
inline

Definition at line 73 of file ObjectPool.hh.

Referenced by TEST_CASE().

◆ operator[]() [1/2]

template<typename T >
T& ObjectPool< T >::operator[] ( Index  idx)
inline

Definition at line 91 of file ObjectPool.hh.

◆ operator[]() [2/2]

template<typename T >
const T& ObjectPool< T >::operator[] ( Index  idx) const
inline

Definition at line 90 of file ObjectPool.hh.

◆ remove()

template<typename T >
void ObjectPool< T >::remove ( Index  idx)
inline

Definition at line 93 of file ObjectPool.hh.

Referenced by TEST_CASE().


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