All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LIFOStack< T > Class Template Reference

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

Inheritance diagram for LIFOStack< T >:
Collaboration diagram for LIFOStack< 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 top 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 initializer 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 initializer 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::LIFOStack< T >

A LIFO stack based on a singly-linked list.

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

Source files

Definition at line 51 of file LIFOStack.H.

Member Function Documentation

◆ top()

T top ( ) const
inline

Return a copy of the top element.

Definition at line 69 of file LIFOStack.H.

◆ bottom()

T bottom ( ) const
inline

Return a copy of the bottom element.

Definition at line 75 of file LIFOStack.H.

◆ push()

void push ( const T a)
inline

Push an element onto the stack.

Definition at line 84 of file LIFOStack.H.

Referenced by Foam::readFields(), and Foam::readUniformFields().

Here is the caller graph for this function:

◆ pop()

T pop ( )
inline

Pop the top element off the stack.

Definition at line 90 of file LIFOStack.H.


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