MFEM  v4.6.0
Finite element discretization library
Public Member Functions | List of all members
mfem::Stack< Elem, Num > Class Template Reference

#include <mem_alloc.hpp>

Public Member Functions

 Stack ()
 Construct an empty stack. More...
 
int Size () const
 Return the number of elements on the stack. More...
 
void Push (Elem E)
 Push element 'E' on the stack. More...
 
Elem Pop ()
 Pop an element off the stack and return it. More...
 
void Clear ()
 Clear the elements off the stack. More...
 
void Swap (Stack< Elem, Num > &other)
 Swap the data in this stack with the data in other. More...
 
size_t MemoryUsage () const
 Return the number of bytes used by the stack. More...
 
 ~Stack ()
 

Detailed Description

template<class Elem, int Num>
class mfem::Stack< Elem, Num >

Definition at line 30 of file mem_alloc.hpp.

Constructor & Destructor Documentation

◆ Stack()

template<class Elem, int Num>
mfem::Stack< Elem, Num >::Stack ( )
inline

Construct an empty stack.

Definition at line 37 of file mem_alloc.hpp.

◆ ~Stack()

template<class Elem, int Num>
mfem::Stack< Elem, Num >::~Stack ( )
inline

Definition at line 52 of file mem_alloc.hpp.

Member Function Documentation

◆ Clear()

template<class Elem , int Num>
void mfem::Stack< Elem, Num >::Clear ( )

Clear the elements off the stack.

Definition at line 93 of file mem_alloc.hpp.

◆ MemoryUsage()

template<class Elem , int Num>
size_t mfem::Stack< Elem, Num >::MemoryUsage ( ) const

Return the number of bytes used by the stack.

Definition at line 120 of file mem_alloc.hpp.

◆ Pop()

template<class Elem , int Num>
Elem mfem::Stack< Elem, Num >::Pop ( )

Pop an element off the stack and return it.

Definition at line 78 of file mem_alloc.hpp.

◆ Push()

template<class Elem, int Num>
void mfem::Stack< Elem, Num >::Push ( Elem  E)

Push element 'E' on the stack.

Definition at line 56 of file mem_alloc.hpp.

◆ Size()

template<class Elem, int Num>
int mfem::Stack< Elem, Num >::Size ( ) const
inline

Return the number of elements on the stack.

Definition at line 39 of file mem_alloc.hpp.

◆ Swap()

template<class Elem, int Num>
void mfem::Stack< Elem, Num >::Swap ( Stack< Elem, Num > &  other)

Swap the data in this stack with the data in other.

Definition at line 111 of file mem_alloc.hpp.


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