g2o
Loading...
Searching...
No Matches
SlamParser::Parser::stack< T, S >::slice Class Reference

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

#include <bison_parser.h>

Collaboration diagram for SlamParser::Parser::stack< T, S >::slice:

Public Member Functions

 slice (const stack &stack, index_type range) YY_NOEXCEPT
const T & operator[] (index_type i) const

Private Attributes

const stack & stack_
index_type range_

Detailed Description

template<typename T, typename S = std::vector<T>>
class SlamParser::Parser::stack< T, S >::slice

Present a slice of the top of a stack.

Definition at line 685 of file bison_parser.h.

Constructor & Destructor Documentation

◆ slice()

template<typename T, typename S = std::vector<T>>
SlamParser::Parser::stack< T, S >::slice::slice ( const stack & stack,
index_type range )
inline

Definition at line 687 of file bison_parser.h.

687 : stack_(stack),
688 range_(range) {}
A stack with random access from its top.

References range_, SlamParser::Parser::stack< T, S >::stack(), stack_, and YY_NOEXCEPT.

Member Function Documentation

◆ operator[]()

template<typename T, typename S = std::vector<T>>
const T & SlamParser::Parser::stack< T, S >::slice::operator[] ( index_type i) const
inline

Definition at line 690 of file bison_parser.h.

690{ return stack_[range_ - i]; }

References range_, and stack_.

Member Data Documentation

◆ range_

template<typename T, typename S = std::vector<T>>
index_type SlamParser::Parser::stack< T, S >::slice::range_
private

Definition at line 694 of file bison_parser.h.

Referenced by operator[](), and slice().

◆ stack_

template<typename T, typename S = std::vector<T>>
const stack& SlamParser::Parser::stack< T, S >::slice::stack_
private

Definition at line 693 of file bison_parser.h.

Referenced by operator[](), and slice().


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