momo  3.9
momo::MemPool< TParams, TMemManager, TSettings > Class Template Reference

#include <MemPool.h>

Inheritance diagram for momo::MemPool< TParams, TMemManager, TSettings >:
momo::MemPoolParams<>

Public Types

typedef TParams Params
 
typedef TMemManager MemManager
 
typedef TSettings Settings
 

Public Member Functions

 MOMO_STATIC_ASSERT (std::is_nothrow_move_constructible< Params >::value)
 
 MOMO_STATIC_ASSERT (std::is_nothrow_move_assignable< Params >::value)
 
 MemPool ()
 
 MemPool (MemManager memManager)
 
 MemPool (const Params &params, MemManager memManager=MemManager())
 
 MemPool (MemPool &&memPool) noexcept
 
 MemPool (const MemPool &)=delete
 
 ~MemPool () noexcept
 
MemPooloperator= (MemPool &&memPool) noexcept
 
MemPooloperator= (const MemPool &)=delete
 
void Swap (MemPool &memPool) noexcept
 
size_t GetBlockSize () const noexcept
 
size_t GetBlockAlignment () const noexcept
 
size_t GetBlockCount () const noexcept
 
const ParamsGetParams () const noexcept
 
const MemManagerGetMemManager () const noexcept
 
MemManagerGetMemManager () noexcept
 
template<typename ResObject = void>
MOMO_NODISCARD ResObject * Allocate ()
 
void Deallocate (void *block) noexcept
 
size_t GetAllocateCount () const noexcept
 
bool CanDeallocateAll () const noexcept
 
void DeallocateAll () noexcept
 
template<typename BlockFilter >
void DeallocateIf (const BlockFilter &blockFilter)
 
void MergeFrom (MemPool &memPool)
 

Member Typedef Documentation

◆ MemManager

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
typedef TMemManager momo::MemPool< TParams, TMemManager, TSettings >::MemManager

◆ Params

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
typedef TParams momo::MemPool< TParams, TMemManager, TSettings >::Params

◆ Settings

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
typedef TSettings momo::MemPool< TParams, TMemManager, TSettings >::Settings

Constructor & Destructor Documentation

◆ MemPool() [1/5]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::MemPool ( )
inlineexplicit

◆ MemPool() [2/5]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::MemPool ( MemManager  memManager)
inlineexplicit

◆ MemPool() [3/5]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::MemPool ( const Params params,
MemManager  memManager = MemManager() 
)
inlineexplicit

◆ MemPool() [4/5]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::MemPool ( MemPool< TParams, TMemManager, TSettings > &&  memPool)
inlinenoexcept

◆ MemPool() [5/5]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::MemPool ( const MemPool< TParams, TMemManager, TSettings > &  )
delete

◆ ~MemPool()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::~MemPool ( )
inlinenoexcept

Member Function Documentation

◆ Allocate()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
template<typename ResObject = void>
MOMO_NODISCARD ResObject* momo::MemPool< TParams, TMemManager, TSettings >::Allocate ( )
inline

◆ CanDeallocateAll()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
bool momo::MemPool< TParams, TMemManager, TSettings >::CanDeallocateAll ( ) const
inlinenoexcept

◆ Deallocate()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
void momo::MemPool< TParams, TMemManager, TSettings >::Deallocate ( void *  block)
inlinenoexcept

◆ DeallocateAll()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
void momo::MemPool< TParams, TMemManager, TSettings >::DeallocateAll ( )
inlinenoexcept

◆ DeallocateIf()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
template<typename BlockFilter >
void momo::MemPool< TParams, TMemManager, TSettings >::DeallocateIf ( const BlockFilter &  blockFilter)
inline

◆ GetAllocateCount()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
size_t momo::MemPool< TParams, TMemManager, TSettings >::GetAllocateCount ( ) const
inlinenoexcept

◆ GetBlockAlignment()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
size_t momo::MemPool< TParams, TMemManager, TSettings >::GetBlockAlignment ( ) const
inlinenoexcept

◆ GetBlockCount()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
size_t momo::MemPool< TParams, TMemManager, TSettings >::GetBlockCount ( ) const
inlinenoexcept

◆ GetBlockSize()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
size_t momo::MemPool< TParams, TMemManager, TSettings >::GetBlockSize ( ) const
inlinenoexcept

◆ GetMemManager() [1/2]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
const MemManager& momo::MemPool< TParams, TMemManager, TSettings >::GetMemManager ( ) const
inlinenoexcept

◆ GetMemManager() [2/2]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
MemManager& momo::MemPool< TParams, TMemManager, TSettings >::GetMemManager ( )
inlinenoexcept

◆ GetParams()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
const Params& momo::MemPool< TParams, TMemManager, TSettings >::GetParams ( ) const
inlinenoexcept

◆ MergeFrom()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
void momo::MemPool< TParams, TMemManager, TSettings >::MergeFrom ( MemPool< TParams, TMemManager, TSettings > &  memPool)
inline

◆ MOMO_STATIC_ASSERT() [1/2]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::MOMO_STATIC_ASSERT ( std::is_nothrow_move_assignable< Params >::value  )

◆ MOMO_STATIC_ASSERT() [2/2]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
momo::MemPool< TParams, TMemManager, TSettings >::MOMO_STATIC_ASSERT ( std::is_nothrow_move_constructible< Params >::value  )

◆ operator=() [1/2]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
MemPool& momo::MemPool< TParams, TMemManager, TSettings >::operator= ( const MemPool< TParams, TMemManager, TSettings > &  )
delete

◆ operator=() [2/2]

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
MemPool& momo::MemPool< TParams, TMemManager, TSettings >::operator= ( MemPool< TParams, TMemManager, TSettings > &&  memPool)
inlinenoexcept

◆ Swap()

template<typename TParams = MemPoolParams<>, typename TMemManager = MemManagerDefault, typename TSettings = MemPoolSettings>
void momo::MemPool< TParams, TMemManager, TSettings >::Swap ( MemPool< TParams, TMemManager, TSettings > &  memPool)
inlinenoexcept

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