Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
StaticStack< T, N > Class Template Reference

#include <elm/data/StaticStack.h>

Classes

class  Iter
 

Public Member Functions

 StaticStack (void)
 
 StaticStack (const StaticStack< T, N > &s)
 
void copy (const StaticStack< T, N > &s)
 
StaticStack< T, N > & operator= (const StaticStack< T, N > &s)
 
bool isEmpty (void) const
 
const T & top (void) const
 
const T & pop (void)
 
void push (const T &v)
 
void reset (void)
 
int count (void) const
 
bool contains (const T &v)
 
template<class C >
bool containsAll (const C &coll)
 
 operator bool (void) const
 
Iter begin (void) const
 
Iter end (void) const
 
Iter items (void) const
 
Iter operator* (void) const
 
bool equals (const StaticStack< T, N > &s) const
 
bool contains (const StaticStack< T, N > &s) const
 
bool operator== (const StaticStack< T, N > &s) const
 
bool operator!= (const StaticStack< T, N > &s) const
 
bool operator<= (const StaticStack< T, N > &s) const
 
bool operator>= (const StaticStack< T, N > &s) const
 
bool operator< (const StaticStack< T, N > &s) const
 
bool operator> (const StaticStack< T, N > &s) const
 

Detailed Description

template<class T, int N>
class elm::StaticStack< T, N >

Implements a stack locally allocated, that is, whose stack data structure is allocated in system stack if the object is local, in the static memory is the object is a global variable or wherever the object is embedded. To sum up, no heap allocation is performed. This is why its size is fixed.

Implemented concepts:

Performances:

  • push – O(1) (~ value copy)
  • pop – O(1) (~ value copy)
Parameters
TType of values stored in the stack.
NSize of the stack.

Constructor & Destructor Documentation

◆ StaticStack() [1/2]

StaticStack ( void  )
inline

Build an empty stack.

◆ StaticStack() [2/2]

StaticStack ( const StaticStack< T, N > &  s)
inline

Build a stack by copy.

Parameters
sCopied stack.

Member Function Documentation

◆ begin()

◆ contains() [1/2]

bool contains ( const StaticStack< T, N > &  s) const
inline

◆ contains() [2/2]

◆ containsAll()

bool containsAll ( const C &  coll)
inline

◆ copy()

void copy ( const StaticStack< T, N > &  s)
inline

◆ count()

int count ( void  ) const
inline

◆ end()

Iter end ( void  ) const
inline

◆ equals()

◆ isEmpty()

◆ items()

Iter items ( void  ) const
inline

◆ operator bool()

operator bool ( void  ) const
inline

◆ operator!=()

bool operator!= ( const StaticStack< T, N > &  s) const
inline

◆ operator*()

Iter operator* ( void  ) const
inline

◆ operator<()

bool operator< ( const StaticStack< T, N > &  s) const
inline

◆ operator<=()

bool operator<= ( const StaticStack< T, N > &  s) const
inline

◆ operator=()

StaticStack<T, N>& operator= ( const StaticStack< T, N > &  s)
inline

◆ operator==()

bool operator== ( const StaticStack< T, N > &  s) const
inline

◆ operator>()

bool operator> ( const StaticStack< T, N > &  s) const
inline

◆ operator>=()

bool operator>= ( const StaticStack< T, N > &  s) const
inline

◆ pop()

◆ push()

◆ reset()

void reset ( void  )
inline

◆ top()


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