MADARA  3.2.3
madara::utility::LQueueNode< T > Class Template Reference

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...
 
LQueueNodenext (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

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 >
 

Detailed Description

template<class T>
class madara::utility::LQueueNode< T >

Defines a node in the LQueue that's implemented as a circular linked list.

Definition at line 21 of file LQueue.cpp.

Constructor & Destructor Documentation

template<class T>
madara::utility::LQueueNode< T >::LQueueNode ( const T &  item,
LQueueNode< T > *  next = 0 
)

Constructor.

Definition at line 161 of file LQueue.cpp.

template<class T>
madara::utility::LQueueNode< T >::LQueueNode ( LQueueNode< T > *  next)

Constructor.

Definition at line 169 of file LQueue.cpp.

template<class T>
madara::utility::LQueueNode< T >::LQueueNode ( void  )

Default constructor that doesn't initialize item_.

Definition at line 178 of file LQueue.cpp.

Member Function Documentation

template<class T >
void madara::utility::LQueueNode< T >::free_list_allocate ( size_t  n)
static

Preallocate n LQueueNodes and store them on the free_list_.

Definition at line 143 of file LQueue.cpp.

template<class T >
void madara::utility::LQueueNode< T >::free_list_release ( void  )
static

Returns all dynamic memory on the free list to the free store.

Definition at line 128 of file LQueue.cpp.

template<class T >
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.

template<class T >
void madara::utility::LQueueNode< T >::operator delete ( void *  ptr)

Return ptr to the free_list_.

Definition at line 101 of file LQueue.cpp.

template<class T >
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.

Friends And Related Function Documentation

template<class T>
friend class LQueue< T >
friend

Definition at line 23 of file LQueue.cpp.

template<class T>
friend class LQueueConstIterator< T >
friend

Definition at line 25 of file LQueue.cpp.

template<class T>
friend class LQueueIterator< T >
friend

Definition at line 24 of file LQueue.cpp.

Member Data Documentation

template<class T>
madara::utility::LQueueNode< T > * madara::utility::LQueueNode< T >::free_list_ = 0
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.

template<class T>
T madara::utility::LQueueNode< T >::item_
private

Item in this node.

Definition at line 61 of file LQueue.cpp.

template<class T>
LQueueNode<T>* madara::utility::LQueueNode< T >::next_
private

Pointer to the next node.

Definition at line 64 of file LQueue.cpp.


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