g2o
Public Types | Public Member Functions | Private Attributes | List of all members
SlamParser::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 SlamParser::stack< T, S >

Definition at line 49 of file stack.hh.

Member Typedef Documentation

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

Definition at line 55 of file stack.hh.

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

Definition at line 54 of file stack.hh.

Constructor & Destructor Documentation

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

Definition at line 57 of file stack.hh.

57  : seq_ ()
58  {
59  }
template<class T, class S = std::deque<T>>
SlamParser::stack< T, S >::stack ( unsigned int  n)
inline

Definition at line 61 of file stack.hh.

61  : seq_ (n)
62  {
63  }

Member Function Documentation

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

Definition at line 101 of file stack.hh.

Referenced by SlamParser::Parser::yysyntax_error_().

101 { return seq_.rbegin (); }
template<class T, class S = std::deque<T>>
const_iterator SlamParser::stack< T, S >::end ( ) const
inline

Definition at line 102 of file stack.hh.

Referenced by SlamParser::Parser::yysyntax_error_().

102 { return seq_.rend (); }
template<class T, class S = std::deque<T>>
unsigned int SlamParser::stack< T, S >::height ( ) const
inline

Definition at line 96 of file stack.hh.

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

Definition at line 67 of file stack.hh.

68  {
69  return seq_[i];
70  }
template<class T, class S = std::deque<T>>
const T& SlamParser::stack< T, S >::operator[] ( unsigned int  i) const
inline

Definition at line 74 of file stack.hh.

75  {
76  return seq_[i];
77  }
template<class T, class S = std::deque<T>>
void SlamParser::stack< T, S >::pop ( unsigned int  n = 1)
inline

Definition at line 88 of file stack.hh.

Referenced by SlamParser::Parser::yypop_().

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

Definition at line 81 of file stack.hh.

Referenced by SlamParser::Parser::parse().

82  {
83  seq_.push_front (t);
84  }

Member Data Documentation

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

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