Public Types | Public Member Functions | Public Attributes
icl_core::tSearchableStack< T, Compare, Alloc > Class Template Reference

#include <tSearchableStack.h>

Inheritance diagram for icl_core::tSearchableStack< T, Compare, Alloc >:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

template<typename T, typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
class icl_core::tSearchableStack< T, Compare, Alloc >

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.


Member Typedef Documentation

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
typedef std::vector<T>::size_type icl_core::tSearchableStack< T, Compare, Alloc >::size_type

Size type.

Definition at line 53 of file tSearchableStack.h.


Constructor & Destructor Documentation

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
icl_core::tSearchableStack< T, Compare, Alloc >::tSearchableStack ( ) [inline]

Constructs an empty stack.

Definition at line 56 of file tSearchableStack.h.


Member Function Documentation

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
void icl_core::tSearchableStack< T, Compare, Alloc >::clear ( ) [inline]

Clears the stack.

Definition at line 59 of file tSearchableStack.h.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
void icl_core::tSearchableStack< T, Compare, Alloc >::pop ( ) [inline]

Pops an element off the stack.

Definition at line 68 of file tSearchableStack.h.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
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.


Member Data Documentation

template<typename T , typename Compare = std::equal_to<T>, typename Alloc = std::allocator<T>>
Compare icl_core::tSearchableStack< T, Compare, Alloc >::m_comp

Definition at line 93 of file tSearchableStack.h.


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


fzi_icl_core
Author(s):
autogenerated on Thu Jun 6 2019 20:22:26