BaseListLink< NODE > Class Template Reference Data Structures

#include <baselist.h>

Inheritance diagram for BaseListLink< NODE >:

详细描述

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

Link field for the pointers of a list node.

公共成员函数

  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 void  移除 (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

void *  _next
UInt   _prevFlag

构造函数 & 析构函数文档编制

◆  BaseListLink() [1/2]

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

◆  BaseListLink() [2/2]

BaseListLink ( BaseListLink < NODE > &&  src )

move constructor

成员函数文档编制

◆  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.

返回
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.

返回
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.

参数
[in] insert Node to insert.
[in] next The next object's link.

◆  InsertAfter()

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

Inserts this behind prev.

参数
[in] insert Node to insert.
[in] prev The 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)

返回
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).

返回
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  
)
static protected

Member Data Documentation

◆  HEAD_FLAG

const UInt HEAD_FLAG
static protected

◆  INFO_FLAG

const UInt INFO_FLAG
static protected

◆  INFO_MASK

const UInt INFO_MASK
static protected

◆  ADDRESS_MASK

const UInt ADDRESS_MASK
static protected