example::slice< T, S > Class Template Reference

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

#include <stack.hh>

List of all members.

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 example::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>>
example::slice< T, S >::slice ( const S &  stack,
unsigned int  range 
) [inline]

Definition at line 115 of file stack.hh.


Member Function Documentation

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

Definition at line 123 of file stack.hh.

References example::slice< T, S >::range_, and example::slice< T, S >::stack_.


Member Data Documentation

template<class T, class S = stack<T>>
unsigned int example::slice< T, S >::range_ [private]

Definition at line 131 of file stack.hh.

Referenced by example::slice< T, S >::operator[]().

template<class T, class S = stack<T>>
const S& example::slice< T, S >::stack_ [private]

Definition at line 130 of file stack.hh.

Referenced by example::slice< T, S >::operator[]().


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

Generated on Sat Sep 5 10:26:25 2009 for Flex Bison C++ Example by  doxygen 1.5.9