ChatPlexSDK-BS 1.0.1-v6.2.0
C++ ChatPlex BeatSaber SDK
|
Vector based object pool. More...
#include <ObjectPool.hpp>
Public Types | |
using | Ptr = std::shared_ptr< ObjectPool< t_Type > > |
Public Member Functions | |
ObjectPool (const typename IObjectPool< t_Type >::__this_is_private &__pvTag, _v::CFuncRef< t_Type > createFunc, _v::CActionRef< t_Type & > actionOnGet, _v::CActionRef< t_Type & > actionOnRelease, _v::CActionRef< t_Type & > actionOnDestroy, bool collectionCheck, int defaultCapacity, int maxSize) | |
Constructor. | |
~ObjectPool () | |
Destructor. | |
int | CountActive () |
Active elements. | |
int | CountInactive () override |
Released element. | |
t_Type | Get () override |
Simple get. | |
void | Release (t_Type &p_Element) override |
Release an element. | |
void | Clear () override |
Clear the object pool. | |
Static Public Member Functions | |
static Ptr | Make (_v::CFuncRef< t_Type > createFunc, _v::CActionRef< t_Type & > actionOnGet=nullptr, _v::CActionRef< t_Type & > actionOnRelease=nullptr, _v::CActionRef< t_Type & > actionOnDestroy=nullptr, bool collectionCheck=true, int defaultCapacity=10, int maxSize=100) |
Constructor. | |
Additional Inherited Members | |
![]() | |
CP_SDK_PRIV_TAG () | |
IObjectPool (CP_SDK_PRIV_TAG_ARG()) | |
Constructor. | |
virtual | ~IObjectPool () |
Destructor. | |
Vector based object pool.
t_Type | Pooled object type |
Definition at line 21 of file ObjectPool.hpp.
using CP_SDK::Pool::ObjectPool< t_Type >::Ptr = std::shared_ptr<ObjectPool<t_Type> > |
Definition at line 36 of file ObjectPool.hpp.
|
inline |
Constructor.
Definition at line 39 of file ObjectPool.hpp.
|
inline |
Destructor.
Definition at line 68 of file ObjectPool.hpp.
References CP_SDK::Pool::ObjectPool< t_Type >::Clear().
|
inlineoverridevirtual |
Clear the object pool.
Implements CP_SDK::Pool::IObjectPool< t_Type >.
Definition at line 137 of file ObjectPool.hpp.
Referenced by CP_SDK::Pool::ObjectPool< t_Type >::~ObjectPool().
|
inline |
Active elements.
Definition at line 90 of file ObjectPool.hpp.
|
inlineoverridevirtual |
Released element.
Implements CP_SDK::Pool::IObjectPool< t_Type >.
Definition at line 95 of file ObjectPool.hpp.
Referenced by CP_SDK::Pool::ObjectPool< t_Type >::Release().
|
inlineoverridevirtual |
Simple get.
Implements CP_SDK::Pool::IObjectPool< t_Type >.
Definition at line 102 of file ObjectPool.hpp.
|
inlinestatic |
|
inlineoverridevirtual |
Release an element.
p_Element | Element to release |
Implements CP_SDK::Pool::IObjectPool< t_Type >.
Definition at line 122 of file ObjectPool.hpp.
References CP_SDK::Pool::ObjectPool< t_Type >::CountInactive().