#include <tSearchableStack.h>
Public Types | |
typedef std::vector< T > ::const_iterator | const_iterator |
typedef std::vector< T > ::const_reverse_iterator | const_reverse_iterator |
Const reverse iterator type. | |
typedef std::vector< T >::size_type | size_type |
Size type. | |
Public Member Functions | |
const_iterator | begin () const |
Returns an iterator to the bottom element of the stack. | |
void | clear () |
Clears the stack. | |
bool | empty () const |
Returns true if the stack is empty. | |
const_iterator | end () const |
Returns an iterator to the top end of the stack. | |
const_iterator | find (typename ConvertToRef< T >::ToConstRef t) const |
Finds a specific element on the stack by linear search. | |
void | pop () |
Pops an element off the stack. | |
void | push (typename ConvertToRef< T >::ToConstRef t) |
Pushes an element onto the stack. | |
const_reverse_iterator | rbegin () const |
Returns a reverse iterator to the top element of the stack. | |
const_reverse_iterator | rend () const |
Returns a reverse iterator to the bottom end of the stack. | |
size_type | size () const |
Returns the number of elements on the stack. | |
ConvertToRef< T >::ToRef | top () |
Returns a reference to the top stack element. | |
ConvertToRef< T >::ToConstRef | top () const |
Returns a const reference to the top stack element. | |
tSearchableStack () | |
Constructs an empty stack. | |
Public Attributes | |
Compare | m_comp |
A stack implementation that allows const-iteration over the stored elements and searching for a specific element. Apart from these additional features it behaves like std::stack.
Definition at line 43 of file tSearchableStack.h.
typedef std::vector<T>::const_iterator icl_core::tSearchableStack< T, Compare, Alloc >::const_iterator |
Const iterator type. Non-const iterators are not provided, only the top element may be modified.
Definition at line 49 of file tSearchableStack.h.
typedef std::vector<T>::const_reverse_iterator icl_core::tSearchableStack< T, Compare, Alloc >::const_reverse_iterator |
Const reverse iterator type.
Definition at line 51 of file tSearchableStack.h.
typedef std::vector<T>::size_type icl_core::tSearchableStack< T, Compare, Alloc >::size_type |
Size type.
Definition at line 53 of file tSearchableStack.h.
icl_core::tSearchableStack< T, Compare, Alloc >::tSearchableStack | ( | ) | [inline] |
Constructs an empty stack.
Definition at line 56 of file tSearchableStack.h.
const_iterator icl_core::tSearchableStack< T, Compare, Alloc >::begin | ( | ) | const [inline] |
Returns an iterator to the bottom element of the stack.
Definition at line 75 of file tSearchableStack.h.
void icl_core::tSearchableStack< T, Compare, Alloc >::clear | ( | ) | [inline] |
Clears the stack.
Definition at line 59 of file tSearchableStack.h.
bool icl_core::tSearchableStack< T, Compare, Alloc >::empty | ( | ) | const [inline] |
Returns true
if the stack is empty.
Definition at line 61 of file tSearchableStack.h.
const_iterator icl_core::tSearchableStack< T, Compare, Alloc >::end | ( | ) | const [inline] |
Returns an iterator to the top end of the stack.
Definition at line 77 of file tSearchableStack.h.
const_iterator icl_core::tSearchableStack< T, Compare, Alloc >::find | ( | typename ConvertToRef< T >::ToConstRef | t | ) | const [inline] |
Finds a specific element on the stack by linear search.
Definition at line 84 of file tSearchableStack.h.
void icl_core::tSearchableStack< T, Compare, Alloc >::pop | ( | ) | [inline] |
Pops an element off the stack.
Definition at line 68 of file tSearchableStack.h.
void icl_core::tSearchableStack< T, Compare, Alloc >::push | ( | typename ConvertToRef< T >::ToConstRef | t | ) | [inline] |
Pushes an element onto the stack.
Definition at line 66 of file tSearchableStack.h.
const_reverse_iterator icl_core::tSearchableStack< T, Compare, Alloc >::rbegin | ( | ) | const [inline] |
Returns a reverse iterator to the top element of the stack.
Definition at line 79 of file tSearchableStack.h.
const_reverse_iterator icl_core::tSearchableStack< T, Compare, Alloc >::rend | ( | ) | const [inline] |
Returns a reverse iterator to the bottom end of the stack.
Definition at line 81 of file tSearchableStack.h.
size_type icl_core::tSearchableStack< T, Compare, Alloc >::size | ( | ) | const [inline] |
Returns the number of elements on the stack.
Definition at line 63 of file tSearchableStack.h.
ConvertToRef<T>::ToRef icl_core::tSearchableStack< T, Compare, Alloc >::top | ( | ) | [inline] |
Returns a reference to the top stack element.
Definition at line 70 of file tSearchableStack.h.
ConvertToRef<T>::ToConstRef icl_core::tSearchableStack< T, Compare, Alloc >::top | ( | ) | const [inline] |
Returns a const reference to the top stack element.
Definition at line 72 of file tSearchableStack.h.
Compare icl_core::tSearchableStack< T, Compare, Alloc >::m_comp |
Definition at line 93 of file tSearchableStack.h.