torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::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 torc::generic::slice< T, S >

Present a slice of the top of a stack.

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

Constructor & Destructor Documentation

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

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

115  : stack_ (stack),
116  range_ (range)
117  {
118  }
unsigned int range_
Bison undocumented.
const S & stack_
Bison undocumented.

Member Function Documentation

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

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

123  {
124  return stack_[range_ - i];
125  }
unsigned int range_
Bison undocumented.
const S & stack_
Bison undocumented.

Field Documentation

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

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

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

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


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