ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
RecyclerShared< TSidiNode > Struct Template Reference

Description:

template<typename TSidiNode>
struct alib::monomem::detail::RecyclerShared< TSidiNode >

Implements internal recycling interface. Used by container types of module ALib Memory that use shared recycling (when their template parameter TRecycling evaluates to Recycling::Shared ).

Template Parameters
TSidiNodeThe type to recycle. Has to be derived of lang::SidiNodeBase .

Definition at line 217 of file recycler.inl.

Inheritance diagram for RecyclerShared< TSidiNode >:
[legend]
Collaboration diagram for RecyclerShared< TSidiNode >:
[legend]

Public Method Index:

 RecyclerShared (const RecyclerShared &copy)
 
 RecyclerShared (lang::SidiListHelper< TSidiNode > &sharedRecyclables)
 
 RecyclerShared (RecyclerShared &&move)
 
void disposeRecyclablesIfPrivate ()
 
- Public Method Index: inherited from RecyclerPSBase< TSidiNode, lang::SidiListHelper< TSidiNode > & >
 RecyclerPSBase ()=default
 
 RecyclerPSBase (lang::SidiListHelper< TSidiNode > &sharedRecyclables)
 
integer count () const
 
TSidiNode * get ()
 
void recycle (TSidiNode *elem)
 
void recycle (TSidiNode *first, TSidiNode *last)
 
void recycleChunk (TChunk *chunk, size_t count)
 

Constructor(s) / Destructor Details::

◆ RecyclerShared() [1/3]

template<typename TSidiNode >
RecyclerShared ( lang::SidiListHelper< TSidiNode > & sharedRecyclables)
inline

Constructor, selected when TRecycling equals to Recycling::Shared .

Parameters
sharedRecyclablesThe external list of recyclables.

Definition at line 222 of file recycler.inl.

◆ RecyclerShared() [2/3]

template<typename TSidiNode >
RecyclerShared ( const RecyclerShared< TSidiNode > & copy)
inline

Copy constructor. Copies the reference to the shared recycler.

Parameters
copyThe private recycler to copy.

Definition at line 228 of file recycler.inl.

◆ RecyclerShared() [3/3]

template<typename TSidiNode >
RecyclerShared ( RecyclerShared< TSidiNode > && move)
inline

Move constructor. Just copies the reference but leaves original intact. (We don't care)

Parameters
moveThe private recycler to move.

Definition at line 234 of file recycler.inl.

Method Details:

◆ disposeRecyclablesIfPrivate()

template<typename TSidiNode >
void disposeRecyclablesIfPrivate ( )
inline

As the method name indicates, this implementation is empty. This method is invoked by Reset() methods of containers which indicate that the monotonic memory is about to be reset likewise.

Definition at line 241 of file recycler.inl.


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