Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::concept::Stack< T > Class Template Reference

#include </home/casse/otawa/elm/src/concepts.h>

Public Member Functions

bool isEmpty (void) const
 
const T & top (void) const
 
pop (void)
 
void push (const T &item)
 
void reset (void)
 

Detailed Description

template<class T>
class elm::concept::Stack< T >

This concepts represents stack of items (First-In First-Out).

Parameters
TType of stacked items.

Member Function Documentation

template<class T >
bool elm::concept::Stack< T >::isEmpty ( void  ) const

Test if the stack is empty.

Returns
Return true if the stack is empty, false else.
template<class T >
T elm::concept::Stack< T >::pop ( void  )

Pop the top item of the stack.

Returns
Top item.
template<class T >
void elm::concept::Stack< T >::push ( const T &  item)

Push a new item in the stack.

Parameters
itemItem to push in the stack.
template<class T >
void elm::concept::Stack< T >::reset ( void  )

Reset the stack to empty.

template<class T >
const T& elm::concept::Stack< T >::top ( void  ) const

Get the item at the top of the stack.

Returns
Top item of the stack.

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