OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

LIFOStack< T > Class Template Reference

A LIFO stack based on a singly-linked list. Operations are push(), pop(), top(), bottom() and empty(). More...

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

List of all members.


Public Member Functions

 LIFOStack ()
 Construct null.
 LIFOStack (T a)
 Construct given initial T.
 LIFOStack (Istream &is)
 Construct from Istream.
T top () const
 Return a copy of the top element.
T bottom () const
 Return a copy of the bottom element.
void push (const T &a)
 Push an element onto the stack.
T pop ()
 Pop the top element off the stack.

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 46 of file LIFOStack.H.


Constructor & Destructor Documentation

LIFOStack (  )  [inline]

Construct null.

Definition at line 56 of file LIFOStack.H.

LIFOStack ( T  a  )  [inline]

Construct given initial T.

Definition at line 60 of file LIFOStack.H.

LIFOStack ( Istream &  is  )  [inline]

Construct from Istream.

Definition at line 66 of file LIFOStack.H.


Member Function Documentation

T top (  )  const [inline]

Return a copy of the top element.

Definition at line 77 of file LIFOStack.H.

T bottom (  )  const [inline]

Return a copy of the bottom element.

Definition at line 83 of file LIFOStack.H.

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

Here is the call graph for this function:

void push ( const T &  a  )  [inline]

Push an element onto the stack.

Definition at line 92 of file LIFOStack.H.

T pop (  )  [inline]

Pop the top element off the stack.

Definition at line 98 of file LIFOStack.H.

References LList< SLListBase, T >::insert().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Copyright © 2000-2009 OpenCFD Ltd