Version

menu_open
Attention : vous avez été redirigé vers la plus récente documentation correspondant à votre version générale ( 2024.1.1.8691 ). Si vous souhaitez accéder à la documentation de votre version précise, veuillez télécharger la documentation hors ligne depuis l'Audiokinetic Launcher et sélectionner l'option de documentation Offline dans l'application de création Wwise.
Wwise SDK 2024.1.1
AK::ObjectPool< T, AllocatorType, LockType > Class Template Reference

An object pool of N reusable objects with one allocation. More...

#include <AkObjectPool.h>

Inheritance diagram for AK::ObjectPool< T, AllocatorType, LockType >:
AkArrayAllocatorNoAlign< T_MEMID > AK::ObjectPoolNoLock

Classes

union  DataType
 

Public Types

using ValueType = T
 
using SizeType = AkUInt32
 

Public Member Functions

 ObjectPool ()=default
 
 ObjectPool (const ObjectPool &)=delete
 
 ObjectPool (ObjectPool &&)=delete
 
 ~ObjectPool ()
 
ObjectPooloperator= (const ObjectPool &)=delete
 
ObjectPooloperator= (ObjectPool &&)=delete
 
AKRESULT Init (SizeType count)
 
void Term ()
 
AK_NODISCARD SizeType Size () const
 
AK_NODISCARD SizeType Capacity () const
 
AK_NODISCARD bool IsFull () const
 
AK_NODISCARD bool IsEmpty () const
 
AKRESULT Deallocate (ValueType *data)
 
void Clear ()
 
AK_NODISCARD ValueTypeAllocate ()
 
AK_NODISCARD ValueTypeAllocateZeroFilled ()
 Initialize memory before returning. More...
 

Static Public Attributes

static constexpr SizeType kInvalidIndex = (SizeType)-1
 

Friends

struct UnitTest::ObjectPoolHelper
 

Detailed Description

template<typename T, typename AllocatorType = ObjectPoolDefaultAllocator<>, typename LockType = ObjectPoolDefaultLockType>
class AK::ObjectPool< T, AllocatorType, LockType >

An object pool of N reusable objects with one allocation.

Definition at line 58 of file AkObjectPool.h.


Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise