g2o
Public Member Functions | Private Attributes | List of all members
SlamParser::slice< T, S > Class Template Reference

Present a slice of the top of a stack. More...

#include <stack.hh>

Public Member Functions

 slice (const S &stack, unsigned int range)
 
const T & operator[] (unsigned int i) const
 

Private Attributes

const S & stack_
 
unsigned int range_
 

Detailed Description

template<class T, class S = stack<T>>
class SlamParser::slice< T, S >

Present a slice of the top of a stack.

Definition at line 111 of file stack.hh.

Constructor & Destructor Documentation

template<class T, class S = stack<T>>
SlamParser::slice< T, S >::slice ( const S &  stack,
unsigned int  range 
)
inline

Definition at line 115 of file stack.hh.

116  : stack_ (stack),
117  range_ (range)
118  {
119  }
const S & stack_
Definition: stack.hh:130
unsigned int range_
Definition: stack.hh:131

Member Function Documentation

template<class T, class S = stack<T>>
const T& SlamParser::slice< T, S >::operator[] ( unsigned int  i) const
inline

Definition at line 123 of file stack.hh.

124  {
125  return stack_[range_ - i];
126  }
const S & stack_
Definition: stack.hh:130
unsigned int range_
Definition: stack.hh:131

Member Data Documentation

template<class T, class S = stack<T>>
unsigned int SlamParser::slice< T, S >::range_
private

Definition at line 131 of file stack.hh.

template<class T, class S = stack<T>>
const S& SlamParser::slice< T, S >::stack_
private

Definition at line 130 of file stack.hh.


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