libUTL++
utl::SkipListNode Class Reference

SkipList node. More...

#include <SkipListNode.h>

Public Member Functions

Objectget () const
 Get the contained object. More...
 
void set (const Object *object, uint_t level, SkipListNode **update)
 Set the contained object, update link pointers. More...
 
void set (const Object *object)
 Set the contained object. More...
 
bool isHead () const
 Determine whether self is the head node. More...
 
bool isTail () const
 Determine whether self is the tail node. More...
 
SkipListNodenext (uint_t idx=0) const
 Get the next node. More...
 
SkipListNodeprev () const
 Get the previous node. More...
 
void setNext (uint_t i, SkipListNode *node)
 Set the next node. More...
 
void setPrev (SkipListNode *node)
 Set the previous node. More...
 
void remove (uint_t level, SkipListNode **update)
 Remove self from the list. More...
 

Detailed Description

SkipList node.

You shouldn't need to use this class directly.

Attributes

  • prev : Previous node (= nullptr if head node).
  • next : Next node (= self if tail node).
  • object : Contained object (= nullptr if tail node).
Author
Adam McKee

Definition at line 30 of file SkipListNode.h.

Member Function Documentation

◆ get()

Object* utl::SkipListNode::get ( ) const
inline

Get the contained object.

Definition at line 37 of file SkipListNode.h.

◆ set() [1/2]

void utl::SkipListNode::set ( const Object object,
uint_t  level,
SkipListNode **  update 
)

Set the contained object, update link pointers.

◆ set() [2/2]

void utl::SkipListNode::set ( const Object object)
inline

Set the contained object.

Definition at line 47 of file SkipListNode.h.

◆ isHead()

bool utl::SkipListNode::isHead ( ) const
inline

Determine whether self is the head node.

Definition at line 54 of file SkipListNode.h.

◆ isTail()

bool utl::SkipListNode::isTail ( ) const
inline

Determine whether self is the tail node.

Definition at line 61 of file SkipListNode.h.

◆ next()

SkipListNode* utl::SkipListNode::next ( uint_t  idx = 0) const
inline

Get the next node.

Definition at line 68 of file SkipListNode.h.

◆ prev()

SkipListNode* utl::SkipListNode::prev ( ) const
inline

Get the previous node.

Definition at line 75 of file SkipListNode.h.

◆ setNext()

void utl::SkipListNode::setNext ( uint_t  i,
SkipListNode node 
)
inline

Set the next node.

Definition at line 82 of file SkipListNode.h.

◆ setPrev()

void utl::SkipListNode::setPrev ( SkipListNode node)
inline

Set the previous node.

Definition at line 89 of file SkipListNode.h.

◆ remove()

void utl::SkipListNode::remove ( uint_t  level,
SkipListNode **  update 
)

Remove self from the list.


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