libUTL++
utl::ListNode Class Reference

List node. More...

#include <ListNode.h>

Public Member Functions

 ListNode ()
 Constructor.
 
 ListNode (const Object *object)
 Constructor. More...
 
void addAfter (ListNode *node)
 Add self after the given node. More...
 
void addBefore (ListNode *node)
 Add self before the given node. More...
 
Objectget () const
 Get 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...
 
bool isSentinelTail () const
 Determine whether self is a "sentinal" tail node. More...
 
ListNodenext () const
 Get the next node (= self if self is tail node). More...
 
void setNext (ListNode *node)
 Set the next node. More...
 
ListNodeprev () const
 Get the previous node (= nullptr if self is head node). More...
 
void setPrev (ListNode *prev)
 Set the previous node. More...
 
void remove ()
 Remove self from the list. More...
 
void set (const Object *object)
 Set the contained object. More...
 

Detailed Description

List node.

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 28 of file ListNode.h.

Constructor & Destructor Documentation

◆ ListNode()

utl::ListNode::ListNode ( const Object object)
inline

Constructor.

Parameters
objectcontained object

Definition at line 43 of file ListNode.h.

References utl::init().

Member Function Documentation

◆ addAfter()

void utl::ListNode::addAfter ( ListNode node)

Add self after the given node.

◆ addBefore()

void utl::ListNode::addBefore ( ListNode node)

Add self before the given node.

◆ get()

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

Get the contained object.

Definition at line 56 of file ListNode.h.

◆ isHead()

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

Determine whether self is the head node.

Definition at line 63 of file ListNode.h.

◆ isTail()

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

Determine whether self is the tail node.

Definition at line 70 of file ListNode.h.

◆ isSentinelTail()

bool utl::ListNode::isSentinelTail ( ) const
inline

Determine whether self is a "sentinal" tail node.

Definition at line 77 of file ListNode.h.

References utl::maxObject.

◆ next()

ListNode* utl::ListNode::next ( ) const
inline

Get the next node (= self if self is tail node).

Definition at line 84 of file ListNode.h.

◆ setNext()

void utl::ListNode::setNext ( ListNode node)
inline

Set the next node.

Definition at line 91 of file ListNode.h.

◆ prev()

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

Get the previous node (= nullptr if self is head node).

Definition at line 98 of file ListNode.h.

◆ setPrev()

void utl::ListNode::setPrev ( ListNode prev)
inline

Set the previous node.

Definition at line 105 of file ListNode.h.

◆ remove()

void utl::ListNode::remove ( )

Remove self from the list.

◆ set()

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

Set the contained object.

Definition at line 115 of file ListNode.h.

References utl::init().

Referenced by utl::Hashtable::setHashFunction().


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