lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::ListBase Class Reference

Node of an intrusive doubly linked list; an object can be a list head (label) or an element. More...

#include <LinkedList.hh>

Inherited by Pds::LinkedList< EbEpoch >, Pds::LinkedList< EbEvent >, Pds::LinkedList< Pds::Eb::EbEvent >, Pds::LinkedList< Pds::Eb::EbEpoch >, and Pds::LinkedListSL< T > [private].

Public Member Functions

 ~ListBase ()
 Does nothing; empty body.
 
 ListBase ()
 Construct as an empty list head: both links point to itself.
 
 ListBase (ListBase *listhead)
 Append this object at the tail of the list whose head is listhead.
 
ListBase * connect (ListBase *after)
 Insert this object after after and return after.
 
ListBase * disconnect ()
 Unlink this object from its list and return it (its own links are left unchanged).
 
ListBase * insert (ListBase *)
 Treating this object as a list head, append entry at the tail; returns the previous tail.
 
ListBase * insertList (ListBase *)
 Treating this object and entry as list heads, move all elements of entry to the tail of this list, leaving entry empty; returns this.
 
ListBase * remove ()
 Treating this object as a list head, unlink and return the head element (the head itself, i.e.
 
ListBase * empty () const
 Return the address of this object as the list label, which forward() returns when the list is empty.
 
ListBase * forward () const
 Return the next node (the head element when this is a list head).
 
ListBase * reverse () const
 Return the previous node (the tail element when this is a list head).
 

Detailed Description

Node of an intrusive doubly linked list; an object can be a list head (label) or an element.

No locking (see LinkedListSL for a locked version).

Constructor & Destructor Documentation

◆ ~ListBase()

Pds::ListBase::~ListBase ( )
inline

Does nothing; empty body.

◆ ListBase() [1/2]

Pds::ListBase::ListBase ( )
inline

Construct as an empty list head: both links point to itself.

◆ ListBase() [2/2]

Pds::ListBase::ListBase ( ListBase *  listhead)
inline

Append this object at the tail of the list whose head is listhead.

Member Function Documentation

◆ connect()

Pds::ListBase * Pds::ListBase::connect ( ListBase *  after)
inline

Insert this object after after and return after.

◆ disconnect()

Pds::ListBase * Pds::ListBase::disconnect ( )
inline

Unlink this object from its list and return it (its own links are left unchanged).

◆ empty()

Pds::ListBase * Pds::ListBase::empty ( ) const
inline

Return the address of this object as the list label, which forward() returns when the list is empty.

◆ forward()

Pds::ListBase * Pds::ListBase::forward ( ) const
inline

Return the next node (the head element when this is a list head).

◆ insert()

Pds::ListBase * Pds::ListBase::insert ( ListBase *  entry)
inline

Treating this object as a list head, append entry at the tail; returns the previous tail.

◆ insertList()

Pds::ListBase * Pds::ListBase::insertList ( ListBase *  entry)
inline

Treating this object and entry as list heads, move all elements of entry to the tail of this list, leaving entry empty; returns this.

◆ remove()

Pds::ListBase * Pds::ListBase::remove ( )
inline

Treating this object as a list head, unlink and return the head element (the head itself, i.e.

empty(), if the list is empty).

◆ reverse()

Pds::ListBase * Pds::ListBase::reverse ( ) const
inline

Return the previous node (the tail element when this is a list head).


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