This is the type exposed to users of the ALib containers in case shared recycling is chosen, for example, with List::SharedRecyclerType or HashTable::SharedRecyclerType.
A user has to pass an instance of this type to the constructor of the container. Constructors that accept this type do not accept an allocator instance, as this is embedded already here.
TAllocator | The allocator to store and use. |
TNode | The node type to recycle. |
Definition at line 397 of file recycling.inl.
Public Method Index: | |
SharedRecycler () noexcept | |
Constructor taking no allocator, used with HeapAllocator. | |
SharedRecycler (TAllocator &pAllocator) noexcept | |
~SharedRecycler () noexcept | |
Destructor. Deletes all recyclables with the allocator. | |
integer | Count () const noexcept |
void | Reserve (integer qty, lang::ValueReference reference) |
void | Reset () noexcept |
Reset. Deletes all recyclables with the allocator. | |
![]() | |
AllocatorMember ()=delete | |
Deleted default constructor. (The allocator has to be given with construction) | |
AllocatorMember (TAllocator &pAllocator) noexcept | |
AllocatorInterface< TAllocator > | AI () const noexcept |
TAllocator & | GetAllocator () const noexcept |
Protected Type Index: | |
using | allocBase = lang::AllocatorMember<TAllocator> |
Shortcut to a base class. | |
using | hookBase = lang::SidiListHook<TNode> |
Shortcut to a base class. | |
![]() | |
using | TNode |
An alias for the node type. | |
using | TNode |
An alias for the node type. | |
Additional Inherited Members | |
![]() | |
using | AllocatorType = TAllocator |
Exposes the allocator type. | |
![]() | |
TAllocator & | allocator |
A reference to the allocator. | |
![]() | |
TElement * | n |
![]() | |
SidiListHook () noexcept | |
Default constructor. Initializes this list to be empty. | |
SidiListHook () noexcept | |
Default constructor. Initializes this list to be empty. | |
SidiListHook (const SidiListHook ©)=delete | |
SidiListHook (const SidiListHook ©)=delete | |
SidiListHook (SidiListHook &&) noexcept=default | |
SidiListHook (SidiListHook &&) noexcept=default | |
integer | count (TNode *end=nullptr) const noexcept |
integer | count (TNode *end=nullptr) const noexcept |
TNode * | findAndRemove (TNode *elem) noexcept |
TNode * | findAndRemove (TNode *elem) noexcept |
TNode * | findLast () const noexcept |
TNode * | findLast () const noexcept |
TNode * | findLast (TNode *hint) const noexcept |
TNode * | findLast (TNode *hint) const noexcept |
TNode * | findLastBefore (TNode *elem) noexcept |
TNode * | findLastBefore (TNode *elem) noexcept |
TNode * | first () const noexcept |
TNode * | first () const noexcept |
bool | isEmpty () const noexcept |
bool | isEmpty () const noexcept |
SidiListHook & | operator= (const SidiListHook &) noexcept=delete |
SidiListHook & | operator= (const SidiListHook &) noexcept=delete |
SidiListHook & | operator= (SidiListHook &&) noexcept=default |
SidiListHook & | operator= (SidiListHook &&) noexcept=default |
TNode * | popFront () noexcept |
TNode * | popFront () noexcept |
void | pushFront (TNode *elem) noexcept |
void | pushFront (TNode *elem) noexcept |
void | pushFront (TNode *first, TNode *last) |
void | pushFront (TNode *first, TNode *last) |
void | reset () noexcept |
Resets this list to zero elements. | |
void | reset () noexcept |
Resets this list to zero elements. | |
![]() | |
SidiNodeBase () noexcept=default | |
Default constructor. (Does not initialize the pointer.) | |
SidiNodeBase (const SidiNodeBase &)=delete | |
SidiNodeBase (SidiNodeBase &&) noexcept=default | |
Defaulted move constructor. | |
SidiNodeBase (TElement *next) noexcept | |
TElement * | addBehind (TElement *elem) noexcept |
integer | count (SidiNodeBase *end=nullptr) const noexcept |
bool | hasNext () const |
TElement * | next () const |
void | next (SidiNodeBase *p) |
SidiNodeBase & | operator= (const SidiNodeBase &)=delete |
SidiNodeBase & | operator= (SidiNodeBase &&) noexcept=default |
bool | pointsTo (const SidiNodeBase *elem) const |
TElement * | removeNext () noexcept |
TElement * | removeRangeBehind (TElement *last) noexcept |
|
friend |
Definition at line 402 of file recycling.inl.
|
protected |
Shortcut to a base class.
Definition at line 405 of file recycling.inl.
|
protected |
Shortcut to a base class.
Definition at line 408 of file recycling.inl.
|
inlinenoexcept |
Constructor taking no allocator, used with HeapAllocator.
Definition at line 413 of file recycling.inl.
|
inlinenoexcept |
Constructor taking an allocator.
pAllocator | The allocator to use. |
Definition at line 418 of file recycling.inl.
|
inlinenoexcept |
Destructor. Deletes all recyclables with the allocator.
Definition at line 422 of file recycling.inl.
|
inlinenoexcept |
Counts the number of recyclables.
Definition at line 439 of file recycling.inl.
|
inline |
Reserves space for at least the given number of recyclables.
qty | The expected number or increase of elements to be stored in the containers that share this recycler. |
reference | Denotes whether expected is meant as an absolute size or an increase . |
Definition at line 445 of file recycling.inl.
|
inlinenoexcept |
Reset. Deletes all recyclables with the allocator.
Definition at line 425 of file recycling.inl.