torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::stack< T, S > Class Template Reference

#include <stack.hh>

Public Types

typedef S::reverse_iterator iterator
 
typedef S::const_reverse_iterator const_iterator
 

Public Member Functions

 stack ()
 
 stack (unsigned int n)
 
T & operator[] (unsigned int i)
 
const T & operator[] (unsigned int i) const
 
void push (const T &t)
 
void pop (unsigned int n=1)
 
unsigned int height () const
 
const_iterator begin () const
 
const_iterator end () const
 

Private Attributes

seq_
 

Detailed Description

template<class T, class S = std::deque<T>>
class torc::generic::stack< T, S >

Definition at line 48 of file generic/edif/stack.hh.

Member Typedef Documentation

template<class T , class S = std::deque<T>>
typedef S::const_reverse_iterator torc::generic::stack< T, S >::const_iterator

Definition at line 54 of file generic/edif/stack.hh.

template<class T , class S = std::deque<T>>
typedef S::reverse_iterator torc::generic::stack< T, S >::iterator

Definition at line 53 of file generic/edif/stack.hh.

Constructor & Destructor Documentation

template<class T , class S = std::deque<T>>
torc::generic::stack< T, S >::stack ( )
inline

Definition at line 56 of file generic/edif/stack.hh.

56  : seq_ ()
57  {
58  }
S seq_
Bison undocumented.
template<class T , class S = std::deque<T>>
torc::generic::stack< T, S >::stack ( unsigned int  n)
inline

Definition at line 60 of file generic/edif/stack.hh.

60  : seq_ (n)
61  {
62  }
S seq_
Bison undocumented.

Member Function Documentation

template<class T , class S = std::deque<T>>
const_iterator torc::generic::stack< T, S >::begin ( void  ) const
inline

Definition at line 100 of file generic/edif/stack.hh.

100 { return seq_.rbegin (); }
S seq_
Bison undocumented.
template<class T , class S = std::deque<T>>
const_iterator torc::generic::stack< T, S >::end ( void  ) const
inline

Definition at line 101 of file generic/edif/stack.hh.

101 { return seq_.rend (); }
S seq_
Bison undocumented.
template<class T , class S = std::deque<T>>
unsigned int torc::generic::stack< T, S >::height ( ) const
inline

Definition at line 95 of file generic/edif/stack.hh.

96  {
97  return seq_.size ();
98  }
S seq_
Bison undocumented.
template<class T , class S = std::deque<T>>
T& torc::generic::stack< T, S >::operator[] ( unsigned int  i)
inline

Definition at line 66 of file generic/edif/stack.hh.

67  {
68  return seq_[i];
69  }
S seq_
Bison undocumented.
template<class T , class S = std::deque<T>>
const T& torc::generic::stack< T, S >::operator[] ( unsigned int  i) const
inline

Definition at line 73 of file generic/edif/stack.hh.

74  {
75  return seq_[i];
76  }
S seq_
Bison undocumented.
template<class T , class S = std::deque<T>>
void torc::generic::stack< T, S >::pop ( unsigned int  n = 1)
inline

Definition at line 87 of file generic/edif/stack.hh.

88  {
89  for (; n; --n)
90  seq_.pop_front ();
91  }
S seq_
Bison undocumented.
template<class T , class S = std::deque<T>>
void torc::generic::stack< T, S >::push ( const T &  t)
inline

Definition at line 80 of file generic/edif/stack.hh.

81  {
82  seq_.push_front (t);
83  }
S seq_
Bison undocumented.

Field Documentation

template<class T , class S = std::deque<T>>
S torc::generic::stack< T, S >::seq_
private

Definition at line 105 of file generic/edif/stack.hh.


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