BaseListHead< T, NODE > Class Template Reference Data Structures

#include <baselist.h>

Inheritance diagram for BaseListHead< T, NODE >:

详细描述

template<typename T, typename NODE>
class maxon::BaseListHead< T, NODE >

Template for list head pointing to elements of T.

Template Parameters
T Content of the list node.
NODE List node containing T.

公共成员函数

  BaseListHead ()
  ~BaseListHead ()
  BaseListHead ( BaseListHead && src )
  MAXON_OPERATOR_MOVE_ASSIGNMENT ( BaseListHead )
Int   GetCount () const
Bool   IsEmpty () const
Bool   IsPopulated () const
T *  GetElement ( Int idx) const
NODE *  GetNode ( Int idx) const
NODE *  GetInsertEraseNode ( Int idx) const
Int   GetIndex (const T *x) const
NODE *  Begin () const
NODE *  End () const
  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)

Additional Inherited Members

static void  移除 (NODE *remove)
static void  InsertBefore (NODE *insert, NODE *next)
static void  InsertAfter (NODE *insert, NODE *prev)
void *  _next
UInt   _prevFlag
void  SetListHead ( Bool val)
static UInt   ComputePrevFlag (const NODE *prev, Bool head)
static const UInt   HEAD_FLAG
static const UInt   INFO_FLAG
static const UInt   INFO_MASK
static const UInt   ADDRESS_MASK

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

◆  BaseListHead() [1/2]

BaseListHead ( )

◆  ~BaseListHead()

~ BaseListHead ( )

◆  BaseListHead() [2/2]

BaseListHead ( BaseListHead < T, NODE > &&  src )

move constructor

成员函数文档编制

◆  MAXON_OPERATOR_MOVE_ASSIGNMENT()

MAXON_OPERATOR_MOVE_ASSIGNMENT ( BaseListHead < T, NODE >  )

move assignment operator

◆  GetCount()

Int GetCount ( ) const

Gets the number of elements.

返回
Number of elements.

◆  IsEmpty()

Bool IsEmpty ( ) const

Checks if the list is empty. This is the same as GetCount() == 0

返回
True if the list does not contain any elements.

◆  IsPopulated()

Bool IsPopulated ( ) const

Checks if the list contains anything. This is the same as GetCount() != 0

返回
True if the list contains any elements.

◆  GetElement()

T* GetElement ( Int   idx ) const

Gets the element by index.

返回
Element or nullptr (not element of this)

◆  GetNode()

NODE* GetNode ( Int   idx ) const

◆  GetInsertEraseNode()

NODE* GetInsertEraseNode ( Int   idx ) const

◆  GetIndex()

Int GetIndex ( const T *  x ) const

Gets the index of the element. The element must be part of the array, otherwise (e.g. if x is a copy of an array element) InvalidArrayIndex will be returned.

返回
Index of element or InvalidArrayIndex (not element of this)

◆  Begin()

NODE* Begin ( ) const

Gets the pointer to the first node.

返回
Pointer to the first element (equal to End() if the list is empty)

◆  End()

NODE* End ( ) const

Gets the pointer to the virtual end node (the node after the last node). This is the address of a virtual (non-existing) node that contains this list head.

返回
Pointer to the end node (the node after the last node)