DLListBase Class Reference

Base doubly-linked list. More...

Classes

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

Public Member Functions

 DLListBase ()
 Null construct. More...
 
 DLListBase (link *)
 Construct given initial entry. More...
 
 DLListBase (const DLListBase &)=delete
 Disallow default bitwise copy construction. More...
 
 ~DLListBase ()
 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...
 
bool swapUp (link *)
 Swap this element with the one above unless it is at the top. More...
 
bool swapDown (link *)
 Swap this element with the one below unless it is at the bottom. More...
 
linkremoveHead ()
 Remove and return head. More...
 
linkremove (link *)
 Remove and return element. More...
 
linkremove (iterator &)
 
linkreplace (link *oldLink, link *newLink)
 Replace oldLink with newLink and return element. More...
 
linkreplace (iterator &oldIter, link *newLink)
 Replace oldIter with newLink and return element. More...
 
void clear ()
 Clear the list. More...
 
void transfer (DLListBase &)
 Transfer the contents of the argument into this List. More...
 
void operator= (const DLListBase &)=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
 
const_reverse_iterator crbegin () const
 
const const_reverse_iteratorcrend () const
 
const_reverse_iterator rbegin () const
 
const const_reverse_iteratorrend () const
 

Friends

class iterator
 
class const_iterator
 
class const_reverse_iterator
 

Detailed Description

Base doubly-linked list.

Source files

Definition at line 50 of file DLListBase.H.

Constructor & Destructor Documentation

◆ DLListBase() [1/3]

DLListBase ( )
inline

Null construct.

Definition at line 37 of file DLListBaseI.H.

◆ DLListBase() [2/3]

DLListBase ( link a)
inline

Construct given initial entry.

Definition at line 45 of file DLListBaseI.H.

References DLListBase::link::next_, and DLListBase::link::prev_.

◆ DLListBase() [3/3]

DLListBase ( const DLListBase )
delete

Disallow default bitwise copy construction.

◆ ~DLListBase()

~DLListBase ( )
inline

Destructor.

Definition at line 58 of file DLListBaseI.H.

Member Function Documentation

◆ size()

Foam::label size ( ) const
inline

Return number of elements in list.

Definition at line 77 of file DLListBaseI.H.

Referenced by DLListBase::begin(), DLListBase::cbegin(), and DLListBase::crbegin().

Here is the caller graph for this function:

◆ empty()

bool empty ( ) const
inline

Return true if the list is empty.

Definition at line 83 of file DLListBaseI.H.

◆ first() [1/2]

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

Return first entry.

Definition at line 90 of file DLListBaseI.H.

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

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

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

◆ first() [2/2]

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

Return const access to first entry.

Definition at line 103 of file DLListBaseI.H.

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

Here is the call graph for this function:

◆ last() [1/2]

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

Return last entry.

Definition at line 116 of file DLListBaseI.H.

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

Referenced by DLListBase::crbegin().

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

◆ last() [2/2]

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

Return const access to last entry.

Definition at line 129 of file DLListBaseI.H.

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

Here is the call graph for this function:

◆ insert()

void insert ( DLListBase::link a)

Add at head of list.

Definition at line 53 of file DLListBase.C.

References DLListBase::link::next_, and DLListBase::link::prev_.

◆ append()

void append ( DLListBase::link a)

Add at tail of list.

Definition at line 73 of file DLListBase.C.

References DLListBase::link::next_, and DLListBase::link::prev_.

◆ swapUp()

bool swapUp ( DLListBase::link a)

Swap this element with the one above unless it is at the top.

Definition at line 93 of file DLListBase.C.

References DLListBase::link::next_, and DLListBase::link::prev_.

◆ swapDown()

bool swapDown ( DLListBase::link a)

Swap this element with the one below unless it is at the bottom.

Definition at line 134 of file DLListBase.C.

References DLListBase::link::next_, and DLListBase::link::prev_.

◆ removeHead()

Foam::DLListBase::link * removeHead ( )

Remove and return head.

Definition at line 175 of file DLListBase.C.

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

Here is the call graph for this function:

◆ remove() [1/2]

Remove and return element.

Definition at line 199 of file DLListBase.C.

References DLListBase::link::deregister(), DLListBase::link::next_, and DLListBase::link::prev_.

Here is the call graph for this function:

◆ remove() [2/2]

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

Definition at line 160 of file DLListBaseI.H.

◆ replace() [1/2]

Foam::DLListBase::link * replace ( DLListBase::link oldLink,
DLListBase::link newLink 
)

Replace oldLink with newLink and return element.

Definition at line 231 of file DLListBase.C.

References DLListBase::link::deregister(), DLListBase::link::next_, and DLListBase::link::prev_.

Here is the call graph for this function:

◆ replace() [2/2]

Foam::DLListBase::link * replace ( DLListBase::iterator oldIter,
DLListBase::link newLink 
)
inline

Replace oldIter with newLink and return element.

Definition at line 170 of file DLListBaseI.H.

◆ clear()

void clear ( )
inline

Clear the list.

Definition at line 141 of file DLListBaseI.H.

Referenced by DLListBase::transfer().

Here is the caller graph for this function:

◆ transfer()

void transfer ( DLListBase lst)
inline

Transfer the contents of the argument into this List.

and annul the argument list.

Definition at line 149 of file DLListBaseI.H.

References DLListBase::clear().

Here is the call graph for this function:

◆ operator=()

void operator= ( const DLListBase )
delete

Disallow default bitwise assignment.

◆ begin() [1/2]

Foam::DLListBase::iterator begin ( )
inline

Definition at line 253 of file DLListBaseI.H.

References DLListBase::first(), DLListBase::iterator, and DLListBase::size().

Here is the call graph for this function:

◆ end() [1/2]

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

Definition at line 266 of file DLListBaseI.H.

◆ cbegin()

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

Definition at line 352 of file DLListBaseI.H.

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

Referenced by DLListBase::begin().

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

◆ cend()

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

Definition at line 366 of file DLListBaseI.H.

◆ begin() [2/2]

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

Definition at line 373 of file DLListBaseI.H.

References DLListBase::cbegin().

Here is the call graph for this function:

◆ end() [2/2]

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

Definition at line 380 of file DLListBaseI.H.

◆ crbegin()

Foam::DLListBase::const_reverse_iterator crbegin ( ) const
inline

Definition at line 459 of file DLListBaseI.H.

References DLListBase::const_reverse_iterator, DLListBase::last(), and DLListBase::size().

Referenced by DLListBase::rbegin().

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

◆ crend()

const Foam::DLListBase::const_reverse_iterator & crend ( ) const
inline

Definition at line 473 of file DLListBaseI.H.

◆ rbegin()

Definition at line 480 of file DLListBaseI.H.

References DLListBase::crbegin().

Here is the call graph for this function:

◆ rend()

const Foam::DLListBase::const_reverse_iterator & rend ( ) const
inline

Definition at line 487 of file DLListBaseI.H.

Friends And Related Function Documentation

◆ iterator

friend class iterator
friend

Definition at line 88 of file DLListBase.H.

Referenced by DLListBase::begin().

◆ const_iterator

friend class const_iterator
friend

Definition at line 91 of file DLListBase.H.

Referenced by DLListBase::cbegin().

◆ const_reverse_iterator

friend class const_reverse_iterator
friend

Definition at line 94 of file DLListBase.H.

Referenced by DLListBase::crbegin().


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