MADARA
3.1.8
|
Defines a node in the LQueue that's implemented as a circular linked list. More...
#include <LQueue.h>
Public Member Functions | |
LQueueNode (const T &item, LQueueNode< T > *next=0) | |
Constructor. More... | |
LQueueNode (LQueueNode< T > *next) | |
Constructor. More... | |
LQueueNode (void) | |
Default constructor that doesn't initialize item_. More... | |
LQueueNode * | next (void) |
Return the next node to which this node points. More... | |
void | operator delete (void *ptr) |
Return ptr to the free_list_. More... | |
void * | operator new (size_t bytes) |
Allocate a new LQueueNode, trying first from the free_list_ and if that's empty try from the global operator new. More... | |
Static Public Member Functions | |
static void | free_list_allocate (size_t n) |
Preallocate n LQueueNodes and store them on the free_list_. More... | |
static void | free_list_release (void) |
Returns all dynamic memory on the free list to the free store. More... | |
Private Attributes | |
T | item_ |
Item in this node. More... | |
LQueueNode< T > * | next_ |
Pointer to the next node. More... | |
Static Private Attributes | |
static LQueueNode< T > * | free_list_ = 0 |
Head of the free list, which is a stack of LQueueNodes used to speed up allocation. More... | |
Friends | |
class | LQueue< T > |
class | LQueueConstIterator< T > |
class | LQueueIterator< T > |
Defines a node in the LQueue that's implemented as a circular linked list.
Definition at line 21 of file LQueue.cpp.
madara::utility::LQueueNode< T >::LQueueNode | ( | const T & | item, |
LQueueNode< T > * | next = 0 |
||
) |
Constructor.
Definition at line 161 of file LQueue.cpp.
madara::utility::LQueueNode< T >::LQueueNode | ( | LQueueNode< T > * | next | ) |
Constructor.
Definition at line 169 of file LQueue.cpp.
madara::utility::LQueueNode< T >::LQueueNode | ( | void | ) |
Default constructor that doesn't initialize item_.
Definition at line 178 of file LQueue.cpp.
|
static |
Preallocate n LQueueNodes and store them on the free_list_.
Definition at line 143 of file LQueue.cpp.
|
static |
Returns all dynamic memory on the free list to the free store.
Definition at line 128 of file LQueue.cpp.
madara::utility::LQueueNode< T > * madara::utility::LQueueNode< T >::next | ( | void | ) |
Return the next node to which this node points.
Definition at line 119 of file LQueue.cpp.
void madara::utility::LQueueNode< T >::operator delete | ( | void * | ptr | ) |
Return ptr to the free_list_.
Definition at line 101 of file LQueue.cpp.
void * madara::utility::LQueueNode< T >::operator new | ( | size_t | bytes | ) |
Allocate a new LQueueNode, trying first from the free_list_ and if that's empty try from the global operator new.
Definition at line 81 of file LQueue.cpp.
|
friend |
Definition at line 23 of file LQueue.cpp.
|
friend |
Definition at line 25 of file LQueue.cpp.
|
friend |
Definition at line 24 of file LQueue.cpp.
|
staticprivate |
Head of the free list, which is a stack of LQueueNodes used to speed up allocation.
Definition at line 58 of file LQueue.cpp.
|
private |
Item in this node.
Definition at line 61 of file LQueue.cpp.
|
private |
Pointer to the next node.
Definition at line 64 of file LQueue.cpp.