Aprepro 5.0x

Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SEAMS::Parser::stack< T, S > Class Template Reference

A stack with random access from its top. More...

## Classes
class | slice
| Present a slice of the top of a stack. More...

## Public Types
typedef S::reverse_iterator | iterator
typedef S::const_reverse_iterator | const_iterator
typedef S::size_type | size_type

## Public Member Functions
| stack (size_type n=200)
T & | operator[] (size_type i)
T & | operator[] (int i)
const T & | operator[] (size_type i) const
const T & | operator[] (int i) const
void | push (YY_MOVE_REF(T) t)
void | pop (int n=1) YY_NOEXCEPT
| Pop elements from the stack. More...
void | clear () YY_NOEXCEPT
| Pop all elements from the stack. More...
size_type | size () const YY_NOEXCEPT
| Number of elements on the stack. More...
const_iterator | begin () const YY_NOEXCEPT
| Iterator on top of the stack (going downwards). More...
const_iterator | end () const YY_NOEXCEPT
| Bottom of the stack. More...

## Private Member Functions
| stack (const stack &)
stack & | operator= (const stack &)

## Private Attributes
S | seq_
| The wrapped container. More...

## Detailed Description

### template<typename T, typename S = std::vector<T>>
class SEAMS::Parser::stack< T, S >

A stack with random access from its top.

## Member Typedef Documentation

## ◆ const_iterator

template<typename T, typename S = std::vector<T>>

typedef S::const_reverse_iterator SEAMS::Parser::stack< T, S >::const_iterator

## ◆ iterator

template<typename T, typename S = std::vector<T>>

typedef S::reverse_iterator SEAMS::Parser::stack< T, S >::iterator

## ◆ size_type

template<typename T, typename S = std::vector<T>>

typedef S::size_type SEAMS::Parser::stack< T, S >::size_type

## Constructor & Destructor Documentation

## ◆ stack() [1/2]

template<typename T, typename S = std::vector<T>>

SEAMS::Parser::stack< T, S >::stack | ( | size_type | n = `200` | ) |
| inline

## ◆ stack() [2/2]

template<typename T, typename S = std::vector<T>>

SEAMS::Parser::stack< T, S >::stack | ( | const stack< T, S > & |  | ) |
| private

## Member Function Documentation

## ◆ begin()

template<typename T, typename S = std::vector<T>>

const_iterator SEAMS::Parser::stack< T, S >::begin | ( |  | ) | const
| inline

Iterator on top of the stack (going downwards).

## ◆ clear()

template<typename T, typename S = std::vector<T>>

void SEAMS::Parser::stack< T, S >::clear | ( |  | ) |
| inline

Pop all elements from the stack.

## ◆ end()

template<typename T, typename S = std::vector<T>>

const_iterator SEAMS::Parser::stack< T, S >::end | ( |  | ) | const
| inline

Bottom of the stack.

## ◆ operator=()

template<typename T, typename S = std::vector<T>>

stack& SEAMS::Parser::stack< T, S >::operator= | ( | const stack< T, S > & |  | ) |
| private

## ◆ operator[]() [1/4]

template<typename T, typename S = std::vector<T>>

T& SEAMS::Parser::stack< T, S >::operator[] | ( | int | i | ) |
| inline

Random access.

Index 0 returns the topmost element.

## ◆ operator[]() [2/4]

template<typename T, typename S = std::vector<T>>

const T& SEAMS::Parser::stack< T, S >::operator[] | ( | int | i | ) | const
| inline

Random access.

Index 0 returns the topmost element.

## ◆ operator[]() [3/4]

template<typename T, typename S = std::vector<T>>

T& SEAMS::Parser::stack< T, S >::operator[] | ( | size_type | i | ) |
| inline

Random access.

Index 0 returns the topmost element.

## ◆ operator[]() [4/4]

template<typename T, typename S = std::vector<T>>

const T& SEAMS::Parser::stack< T, S >::operator[] | ( | size_type | i | ) | const
| inline

Random access.

Index 0 returns the topmost element.

## ◆ pop()

template<typename T, typename S = std::vector<T>>

void SEAMS::Parser::stack< T, S >::pop | ( | int | n = `1` | ) |
| inline

Pop elements from the stack.

## ◆ push()

template<typename T, typename S = std::vector<T>>

void SEAMS::Parser::stack< T, S >::push | ( | YY_MOVE_REF(T) | t | ) |
| inline

Steal the contents of t.

Close to move-semantics.

## ◆ size()

template<typename T, typename S = std::vector<T>>

size_type SEAMS::Parser::stack< T, S >::size | ( |  | ) | const
| inline

Number of elements on the stack.

## Member Data Documentation

## ◆ seq_

template<typename T, typename S = std::vector<T>>

S SEAMS::Parser::stack< T, S >::seq_
| private

The wrapped container.

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

- aprepro_parser.h