Public Types | Public Member Functions | Public Attributes
icl_core::SearchableStack< T, TCompare, TAlloc > Class Template Reference

#include <SearchableStack.h>

Inheritance diagram for icl_core::SearchableStack< T, TCompare, TAlloc >:
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.
 SearchableStack ()
 Constructs an empty 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.

Public Attributes

TCompare m_comp

Detailed Description

template<typename T, typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
class icl_core::SearchableStack< T, TCompare, TAlloc >

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 42 of file SearchableStack.h.


Member Typedef Documentation

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
typedef std::vector<T>::const_iterator icl_core::SearchableStack< T, TCompare, TAlloc >::const_iterator

Const iterator type. Non-const iterators are not provided, only the top element may be modified.

Definition at line 48 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
typedef std::vector<T>::const_reverse_iterator icl_core::SearchableStack< T, TCompare, TAlloc >::const_reverse_iterator

Const reverse iterator type.

Definition at line 50 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
typedef std::vector<T>::size_type icl_core::SearchableStack< T, TCompare, TAlloc >::size_type

Size type.

Definition at line 52 of file SearchableStack.h.


Constructor & Destructor Documentation

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
icl_core::SearchableStack< T, TCompare, TAlloc >::SearchableStack ( ) [inline]

Constructs an empty stack.

Definition at line 55 of file SearchableStack.h.


Member Function Documentation

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
const_iterator icl_core::SearchableStack< T, TCompare, TAlloc >::begin ( ) const [inline]

Returns an iterator to the bottom element of the stack.

Definition at line 74 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
void icl_core::SearchableStack< T, TCompare, TAlloc >::clear ( ) [inline]

Clears the stack.

Definition at line 58 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
bool icl_core::SearchableStack< T, TCompare, TAlloc >::empty ( ) const [inline]

Returns true if the stack is empty.

Definition at line 60 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
const_iterator icl_core::SearchableStack< T, TCompare, TAlloc >::end ( ) const [inline]

Returns an iterator to the top end of the stack.

Definition at line 76 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
const_iterator icl_core::SearchableStack< T, TCompare, TAlloc >::find ( typename ConvertToRef< T >::ToConstRef  t) const [inline]

Finds a specific element on the stack by linear search.

Definition at line 83 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
void icl_core::SearchableStack< T, TCompare, TAlloc >::pop ( ) [inline]

Pops an element off the stack.

Definition at line 67 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
void icl_core::SearchableStack< T, TCompare, TAlloc >::push ( typename ConvertToRef< T >::ToConstRef  t) [inline]

Pushes an element onto the stack.

Definition at line 65 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
const_reverse_iterator icl_core::SearchableStack< T, TCompare, TAlloc >::rbegin ( ) const [inline]

Returns a reverse iterator to the top element of the stack.

Definition at line 78 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
const_reverse_iterator icl_core::SearchableStack< T, TCompare, TAlloc >::rend ( ) const [inline]

Returns a reverse iterator to the bottom end of the stack.

Definition at line 80 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
size_type icl_core::SearchableStack< T, TCompare, TAlloc >::size ( ) const [inline]

Returns the number of elements on the stack.

Definition at line 62 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
ConvertToRef<T>::ToRef icl_core::SearchableStack< T, TCompare, TAlloc >::top ( ) [inline]

Returns a reference to the top stack element.

Definition at line 69 of file SearchableStack.h.

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
ConvertToRef<T>::ToConstRef icl_core::SearchableStack< T, TCompare, TAlloc >::top ( ) const [inline]

Returns a const reference to the top stack element.

Definition at line 71 of file SearchableStack.h.


Member Data Documentation

template<typename T , typename TCompare = std::equal_to<T>, typename TAlloc = std::allocator<T>>
TCompare icl_core::SearchableStack< T, TCompare, TAlloc >::m_comp

Definition at line 92 of file SearchableStack.h.


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


schunk_svh_driver
Author(s): Georg Heppner
autogenerated on Fri Aug 28 2015 12:59:20