FIFOStack< T > Class Template Reference

A FIFO stack based on a singly-linked list. More...

Inheritance diagram for FIFOStack< T >:
Collaboration diagram for FIFOStack< T >:

Public Member Functions

T top () const
 Return a copy of the top element. More...
 
T bottom () const
 Return a copy of the bottom element. More...
 
void push (const T &a)
 Push an element onto the stack. More...
 
T pop ()
 Pop the bottom element off the stack. More...
 
- Public Member Functions inherited from LList< LListBase, T >
 LList ()
 Null construct. More...
 
 LList (T a)
 Construct given initial T. More...
 
 LList (Istream &)
 Construct from Istream. More...
 
 LList (const LList< LListBase, T > &)
 Copy constructor. More...
 
 LList (LList< LListBase, T > &&)
 Move constructor. More...
 
 LList (std::initializer_list< T >)
 Construct from an initialiser list. More...
 
 ~LList ()
 Destructor. More...
 
Tfirst ()
 Return the first entry added. More...
 
const Tfirst () const
 Return const access to the first entry added. More...
 
Tlast ()
 Return the last entry added. More...
 
const Tlast () const
 Return const access to the last entry added. More...
 
void insert (const T &a)
 Add at head of list. More...
 
void append (const T &a)
 Add at tail of list. More...
 
T removeHead ()
 Remove and return head. More...
 
T remove (link *l)
 Remove and return element. More...
 
T remove (iterator &it)
 Remove and return element specified by iterator. More...
 
void clear ()
 Delete contents of list. More...
 
void transfer (LList< LListBase, T > &)
 Transfer the contents of the argument into this List. More...
 
void operator= (const LList< LListBase, T > &)
 Assignment operator. More...
 
void operator= (LList< LListBase, T > &&)
 Move assignment operator. More...
 
void operator= (std::initializer_list< T >)
 Assignment to an initialiser list. More...
 
iterator begin ()
 
const iteratorend ()
 
const_iterator cbegin () const
 
const const_iteratorcend () const
 
const_iterator begin () const
 
const const_iteratorend () const
 

Additional Inherited Members

- Public Types inherited from LList< LListBase, T >
typedef T value_type
 Type of values the LList contains. More...
 
typedef Treference
 Type that can be used for storing into value_type. More...
 
typedef const Tconst_reference
 Type that can be used for storing into constant. More...
 
typedef label size_type
 The type that can represent the size of a LList. More...
 
typedef LListBase::iterator LListBase_iterator
 
typedef LListBase::const_iterator LListBase_const_iterator
 

Detailed Description

template<class T>
class Foam::FIFOStack< T >

A FIFO stack based on a singly-linked list.

Operations are push(), pop(), top(), bottom() and empty().

Source files

Definition at line 51 of file FIFOStack.H.

Member Function Documentation

◆ top()

T top ( ) const
inline

Return a copy of the top element.

Definition at line 69 of file FIFOStack.H.

References LList< LListBase, T >::last().

Here is the call graph for this function:

◆ bottom()

T bottom ( ) const
inline

Return a copy of the bottom element.

Definition at line 75 of file FIFOStack.H.

References LList< LListBase, T >::first().

Here is the call graph for this function:

◆ push()

void push ( const T a)
inline

Push an element onto the stack.

Definition at line 84 of file FIFOStack.H.

References LList< LListBase, T >::append().

Referenced by DAC< ThermoType >::reduceMechanism(), DRG< ThermoType >::reduceMechanism(), DRGEP< ThermoType >::reduceMechanism(), and PFA< ThermoType >::reduceMechanism().

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

◆ pop()

T pop ( )
inline

Pop the bottom element off the stack.

Definition at line 90 of file FIFOStack.H.

References LList< LListBase, T >::removeHead().

Referenced by DAC< ThermoType >::reduceMechanism(), DRG< ThermoType >::reduceMechanism(), DRGEP< ThermoType >::reduceMechanism(), and PFA< ThermoType >::reduceMechanism().

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

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