Classes | Public Member Functions | Friends | List of all members
DLListBase Class Reference

Base doubly-linked list. More...

Inheritance diagram for DLListBase:
Inheritance graph
[legend]

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 ()
 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...
 
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 ( )
inline

Null construct.

Definition at line 37 of file DLListBaseI.H.

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 ( )
inline

Destructor.

Definition at line 58 of file DLListBaseI.H.

Member Function Documentation

Foam::label size ( ) const
inline
bool empty ( ) const
inline

Return true if the list is empty.

Definition at line 83 of file DLListBaseI.H.

Referenced by cellTable::combine(), and boundaryRegion::rename().

Here is the caller graph for this function:

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:

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:

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:

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:

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_.

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_.

Referenced by dictionary::add(), IOPosition< CloudType >::readData(), Foam::reconstructLagrangianPositions(), and rigidBodyMeshMotion::rigidBodyMeshMotion().

Here is the caller graph for this function:

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_.

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_.

Foam::DLListBase::link * removeHead ( )

Remove and return head.

Definition at line 175 of file DLListBase.C.

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

Here is the call graph for this function:

Remove and return element.

Definition at line 199 of file DLListBase.C.

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

Referenced by DLListBase::transfer().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 161 of file DLListBaseI.H.

References DLListBase::replace().

Here is the call graph for this function:

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

Replace oldLink with newLink and return element.

Definition at line 232 of file DLListBase.C.

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

Referenced by dictionary::add(), dictionary::changeKeyword(), DLListBase::remove(), and DLListBase::replace().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Replace oldIter with newLink and return element.

Definition at line 171 of file DLListBaseI.H.

References DLListBase::replace().

Here is the call graph for this function:

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:

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(), and DLListBase::remove().

Here is the call graph for this function:

Foam::DLListBase::iterator begin ( )
inline

Definition at line 253 of file DLListBaseI.H.

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

Here is the call graph for this function:

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

Definition at line 266 of file DLListBaseI.H.

References DLListBase::const_iterator::const_iterator().

Here is the call graph for this function:

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

Definition at line 352 of file DLListBaseI.H.

References DLListBase::const_iterator::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:

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

Definition at line 366 of file DLListBaseI.H.

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:

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

Definition at line 380 of file DLListBaseI.H.

References DLListBase::const_reverse_iterator::const_reverse_iterator().

Here is the call graph for this function:

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:

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

Definition at line 473 of file DLListBaseI.H.

Definition at line 480 of file DLListBaseI.H.

References DLListBase::crbegin().

Here is the call graph for this function:

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

Definition at line 487 of file DLListBaseI.H.

Friends And Related Function Documentation

friend class iterator
friend

Definition at line 96 of file DLListBase.H.

friend class const_iterator
friend

Definition at line 99 of file DLListBase.H.

friend class const_reverse_iterator
friend

Definition at line 102 of file DLListBase.H.

Referenced by DLListBase::crbegin().


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