This is the type that is exposed to users of the 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 393 of file recycler.hpp.
#include <recycler.hpp>
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. | |
Public Method Index: inherited from AllocatorMember< TAllocator > | |
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. | |
Protected Type Index: inherited from SidiListHook< TNode > | |
using | TNode |
An alias for the node type. | |
Additional Inherited Members | |
Public Type Index: inherited from AllocatorMember< TAllocator > | |
using | AllocatorType = TAllocator |
Exposes the allocator type. | |
Protected Field Index: inherited from AllocatorMember< TAllocator > | |
TAllocator & | allocator |
A reference to the allocator. | |
Protected Field Index: inherited from SidiNodeBase< TNode > | |
TNode * | n |
Protected Method Index: inherited from SidiListHook< TNode > | |
SidiListHook () noexcept | |
Default constructor. Initializes this list to be empty. | |
SidiListHook (const SidiListHook ©)=delete | |
SidiListHook (SidiListHook &&) noexcept=default | |
integer | count (TNode *end=nullptr) const noexcept |
TNode * | findAndRemove (TNode *elem) noexcept |
TNode * | findLast () const noexcept |
TNode * | findLast (TNode *hint) const noexcept |
TNode * | findLastBefore (TNode *elem) noexcept |
TNode * | first () const noexcept |
bool | isEmpty () const noexcept |
SidiListHook & | operator= (const SidiListHook &) noexcept=delete |
SidiListHook & | operator= (SidiListHook &&) noexcept=default |
TNode * | popFront () noexcept |
void | pushFront (TNode *elem) noexcept |
void | pushFront (TNode *first, TNode *last) |
void | reset () noexcept |
Resets this list to zero elements. | |
Protected Method Index: inherited from SidiNodeBase< TNode > | |
SidiNodeBase () noexcept=default | |
Default constructor. (Does not initialize the pointer.) | |
SidiNodeBase (const SidiNodeBase &)=delete | |
SidiNodeBase (SidiNodeBase &&) noexcept=default | |
Defaulted move constructor. | |
SidiNodeBase (TNode *next) noexcept | |
TNode * | addBehind (TNode *elem) noexcept |
integer | count (SidiNodeBase *end=nullptr) const noexcept |
bool | hasNext () const |
TNode * | next () const |
void | next (SidiNodeBase *p) |
SidiNodeBase & | operator= (const SidiNodeBase &)=delete |
SidiNodeBase & | operator= (SidiNodeBase &&) noexcept=default |
bool | pointsTo (const SidiNodeBase *elem) const |
TNode * | removeNext () noexcept |
TNode * | removeRangeBehind (TNode *last) noexcept |
|
friend |
Definition at line 398 of file recycler.hpp.
|
protected |
Shortcut to a base class.
Definition at line 401 of file recycler.hpp.
|
protected |
Shortcut to a base class.
Definition at line 404 of file recycler.hpp.
|
inlinenoexcept |
Constructor taking no allocator, used with HeapAllocator.
Definition at line 409 of file recycler.hpp.
|
inlinenoexcept |
Constructor taking an allocator.
pAllocator | The allocator to use. |
Definition at line 414 of file recycler.hpp.
|
inlinenoexcept |
Destructor. Deletes all recyclables with the allocator.
Definition at line 418 of file recycler.hpp.
Counts the number of recyclables.
Definition at line 435 of file recycler.hpp.
|
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 441 of file recycler.hpp.
|
inlinenoexcept |
Reset. Deletes all recyclables with the allocator.
Definition at line 421 of file recycler.hpp.