BaseListLink< NODE > Class Template Reference

#include <baselist.h>

Inheritance diagram for BaseListLink< NODE >:

Detailed Description

template<typename NODE>
class maxon::BaseListLink< NODE >

Link field for the pointers of a list node.

Public Member Functions

 BaseListLink (NODE *prev=nullptr, NODE *next=nullptr, Bool is_head=false)
 
 BaseListLink (BaseListLink &&src)
 
void MoveFrom (NODE *thisNode, BaseListLink &src)
 
 MAXON_OPERATOR_MOVE_ASSIGNMENT (BaseListLink)
 
NODE * _GetNext () const
 
NODE * _GetPrev () const
 
Bool IsListHead () const
 
Bool IsInList () const
 
NODE * _GetNextChecked () const
 
NODE * _GetPrevChecked () const
 
void SetNext (NODE *val)
 
void SetPrev (NODE *val)
 

Static Public Member Functions

static void Remove (NODE *remove)
 
static void InsertBefore (NODE *insert, NODE *next)
 
static void InsertAfter (NODE *insert, NODE *prev)
 

Protected Member Functions

void SetListHead (Bool val)
 

Static Protected Member Functions

static UInt ComputePrevFlag (const NODE *prev, Bool head)
 

Static Protected Attributes

static const UInt HEAD_FLAG
 
static const UInt INFO_FLAG
 
static const UInt INFO_MASK
 
static const UInt ADDRESS_MASK
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ BaseListLink() [1/2]

BaseListLink ( NODE *  prev = nullptr,
NODE *  next = nullptr,
Bool  is_head = false 
)
explicit

◆ BaseListLink() [2/2]

BaseListLink ( BaseListLink< NODE > &&  src)

move constructor

Member Function Documentation

◆ MoveFrom()

void MoveFrom ( NODE *  thisNode,
BaseListLink< NODE > &  src 
)

◆ MAXON_OPERATOR_MOVE_ASSIGNMENT()

MAXON_OPERATOR_MOVE_ASSIGNMENT ( BaseListLink< NODE >  )

move assignment operator

◆ _GetNext()

NODE* _GetNext ( ) const

Gets the next element.

Returns
Next element (can never be null, but points to list head if this is the last element)

◆ _GetPrev()

NODE* _GetPrev ( ) const

Gets the previous element.

Returns
Previous element (can never be null, but points to list head if this is the first element)

◆ Remove()

static void Remove ( NODE *  remove)
static

Removes the element (just removes it from the list, does not delete it).

◆ InsertBefore()

static void InsertBefore ( NODE *  insert,
NODE *  next 
)
static

Inserts this before next.

Parameters
[in]insertNode to insert.
[in]nextThe next object's link.

◆ InsertAfter()

static void InsertAfter ( NODE *  insert,
NODE *  prev 
)
static

Inserts this behind prev.

Parameters
[in]insertNode to insert.
[in]prevThe previous object's link.

◆ IsListHead()

Bool IsListHead ( ) const

Returns true if this is a list head (_GetNext() would return pointer to the first element of the list, _GetPrev() to the last)

Returns
True if this is a list head.

◆ IsInList()

Bool IsInList ( ) const

Returns true if this link is contained in a list, but not a list head (i.e., _GetNext() and _GetPrev() are valid).

Returns
True if this is contained in a list.

◆ _GetNextChecked()

NODE* _GetNextChecked ( ) const

◆ _GetPrevChecked()

NODE* _GetPrevChecked ( ) const

◆ SetNext()

void SetNext ( NODE *  val)

◆ SetPrev()

void SetPrev ( NODE *  val)

◆ SetListHead()

void SetListHead ( Bool  val)
protected

◆ ComputePrevFlag()

static UInt ComputePrevFlag ( const NODE *  prev,
Bool  head 
)
staticprotected

Member Data Documentation

◆ HEAD_FLAG

const UInt HEAD_FLAG
staticprotected

◆ INFO_FLAG

const UInt INFO_FLAG
staticprotected

◆ INFO_MASK

const UInt INFO_MASK
staticprotected

◆ ADDRESS_MASK

const UInt ADDRESS_MASK
staticprotected