SLListBase Class Reference

Base singly-linked list. More...

Classes

class  const_iterator
 An STL-conforming const_iterator. More...
 
class  iterator
 An STL-conforming iterator. More...
 
struct  link
 Link structure. More...
 

Public Member Functions

 SLListBase ()
 Null construct. More...
 
 SLListBase (link *)
 Construct given initial entry. More...
 
 SLListBase (const SLListBase &)=delete
 Disallow default bitwise copy construction. More...
 
 ~SLListBase ()
 Destructor. More...
 
label size () const
 Return number of elements in list. More...
 
bool empty () const
 Return true if the list is empty. More...
 
linkfirst ()
 Return first entry. More...
 
const linkfirst () const
 Return const access to first entry. More...
 
linklast ()
 Return last entry. More...
 
const linklast () const
 Return const access to last entry. More...
 
void insert (link *)
 Add at head of list. More...
 
void append (link *)
 Add at tail of list. More...
 
linkremoveHead ()
 Remove and return head. More...
 
linkremove (link *)
 
linkremove (iterator &)
 
void clear ()
 Clear the list. More...
 
void transfer (SLListBase &)
 Transfer the contents of the argument into this List. More...
 
void operator= (const SLListBase &)=delete
 Disallow default bitwise assignment. More...
 
iterator begin ()
 
const iteratorend ()
 
const_iterator cbegin () const
 
const const_iteratorcend () const
 
const_iterator begin () const
 
const const_iteratorend () const
 

Friends

class iterator
 
class const_iterator
 

Detailed Description

Base singly-linked list.

Source files

Definition at line 50 of file SLListBase.H.

Constructor & Destructor Documentation

◆ SLListBase() [1/3]

SLListBase ( )
inline

Null construct.

Definition at line 45 of file SLListBaseI.H.

◆ SLListBase() [2/3]

SLListBase ( link a)
inline

Construct given initial entry.

Definition at line 52 of file SLListBaseI.H.

◆ SLListBase() [3/3]

SLListBase ( const SLListBase )
delete

Disallow default bitwise copy construction.

◆ ~SLListBase()

~SLListBase ( )
inline

Destructor.

Definition at line 61 of file SLListBaseI.H.

Member Function Documentation

◆ size()

Foam::label size ( ) const
inline

Return number of elements in list.

Definition at line 67 of file SLListBaseI.H.

Referenced by SLListBase::begin(), and SLListBase::cbegin().

Here is the caller graph for this function:

◆ empty()

bool empty ( ) const
inline

Return true if the list is empty.

Definition at line 73 of file SLListBaseI.H.

◆ first() [1/2]

Foam::SLListBase::link * first ( )
inline

Return first entry.

Definition at line 80 of file SLListBaseI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and SLListBase::link::next_.

Referenced by SLListBase::begin(), and SLListBase::cbegin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ first() [2/2]

const Foam::SLListBase::link * first ( ) const
inline

Return const access to first entry.

Definition at line 93 of file SLListBaseI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and SLListBase::link::next_.

Here is the call graph for this function:

◆ last() [1/2]

Foam::SLListBase::link * last ( )
inline

Return last entry.

Definition at line 106 of file SLListBaseI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ last() [2/2]

const Foam::SLListBase::link * last ( ) const
inline

Return const access to last entry.

Definition at line 119 of file SLListBaseI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ insert()

void insert ( SLListBase::link a)

Add at head of list.

Definition at line 45 of file SLListBase.C.

References SLListBase::link::next_.

◆ append()

void append ( SLListBase::link a)

Add at tail of list.

Definition at line 62 of file SLListBase.C.

References SLListBase::link::next_.

◆ removeHead()

Foam::SLListBase::link * removeHead ( )

Remove and return head.

Definition at line 78 of file SLListBase.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, and SLListBase::link::next_.

Referenced by SLListBase::remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [1/2]

Definition at line 104 of file SLListBase.C.

References SLListBase::begin(), SLListBase::end(), SLListBase::link::next_, p, and SLListBase::removeHead().

Referenced by SLListBase::transfer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [2/2]

Foam::SLListBase::link * remove ( SLListBase::iterator it)
inline

Definition at line 148 of file SLListBaseI.H.

◆ clear()

void clear ( )
inline

Clear the list.

Definition at line 131 of file SLListBaseI.H.

Referenced by SLListBase::transfer().

Here is the caller graph for this function:

◆ transfer()

void transfer ( SLListBase lst)
inline

Transfer the contents of the argument into this List.

and annul the argument list.

Definition at line 138 of file SLListBaseI.H.

References SLListBase::clear(), and SLListBase::remove().

Here is the call graph for this function:

◆ operator=()

void operator= ( const SLListBase )
delete

Disallow default bitwise assignment.

◆ begin() [1/2]

Foam::SLListBase::iterator begin ( )
inline

Definition at line 225 of file SLListBaseI.H.

References SLListBase::first(), and SLListBase::size().

Referenced by SLListBase::remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end() [1/2]

const Foam::SLListBase::iterator & end ( )
inline

Definition at line 239 of file SLListBaseI.H.

References SLListBase::const_iterator::const_iterator().

Referenced by SLListBase::remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbegin()

Foam::SLListBase::const_iterator cbegin ( ) const
inline

Definition at line 325 of file SLListBaseI.H.

References SLListBase::const_iterator::const_iterator(), SLListBase::first(), and SLListBase::size().

Referenced by SLListBase::begin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cend()

const Foam::SLListBase::const_iterator & cend ( ) const
inline

Definition at line 339 of file SLListBaseI.H.

◆ begin() [2/2]

Foam::SLListBase::const_iterator begin ( ) const
inline

Definition at line 346 of file SLListBaseI.H.

References SLListBase::cbegin().

Here is the call graph for this function:

◆ end() [2/2]

const Foam::SLListBase::const_iterator & end ( ) const
inline

Definition at line 353 of file SLListBaseI.H.

Friends And Related Function Documentation

◆ iterator

friend class iterator
friend

Definition at line 85 of file SLListBase.H.

◆ const_iterator

friend class const_iterator
friend

Definition at line 88 of file SLListBase.H.


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