OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
osg::fast_back_stack< T > Class Template Reference

#include <fast_back_stack.h>

Collaboration diagram for osg::fast_back_stack< T >:
Collaboration graph
[legend]

Public Member Functions

 fast_back_stack ()
 
 fast_back_stack (const fast_back_stack &fbs)
 
 fast_back_stack (const T &value)
 
fast_back_stackoperator= (const fast_back_stack &fbs)
 
void clear ()
 
bool empty () const
 
unsigned int size () const
 
T & back ()
 
const T & back () const
 
void push_back ()
 
void push_back (const T &value)
 
void pop_back ()
 

Public Attributes

_value
 
std::vector< T > _stack
 
unsigned int _size
 

Detailed Description

template<class T>
class osg::fast_back_stack< T >

Simple stack implementation that keeps the back() cached locally for fast access rather than at the back of the vector which is the traditional stack implementation. A conventional std::vector<> stores the rest of the stack. Although fast_back_stack contains a stl container it only implements the back push_back(),pop_back() and back() methods so is not as general purpose as stl stack implementation. The focus of the fast_back_stack is purely to maximize the speed at which the back can be accessed.

Definition at line 30 of file fast_back_stack.h.

Constructor & Destructor Documentation

template<class T>
osg::fast_back_stack< T >::fast_back_stack ( )
inline

Definition at line 34 of file fast_back_stack.h.

template<class T>
osg::fast_back_stack< T >::fast_back_stack ( const fast_back_stack< T > &  fbs)
inline

Definition at line 36 of file fast_back_stack.h.

template<class T>
osg::fast_back_stack< T >::fast_back_stack ( const T &  value)
inline

Definition at line 38 of file fast_back_stack.h.

Member Function Documentation

template<class T>
T& osg::fast_back_stack< T >::back ( )
inline

Definition at line 54 of file fast_back_stack.h.

Here is the caller graph for this function:

template<class T>
const T& osg::fast_back_stack< T >::back ( ) const
inline

Definition at line 56 of file fast_back_stack.h.

template<class T>
void osg::fast_back_stack< T >::clear ( )
inline

Definition at line 48 of file fast_back_stack.h.

template<class T>
bool osg::fast_back_stack< T >::empty ( ) const
inline

Definition at line 50 of file fast_back_stack.h.

Here is the caller graph for this function:

template<class T>
fast_back_stack& osg::fast_back_stack< T >::operator= ( const fast_back_stack< T > &  fbs)
inline

Definition at line 40 of file fast_back_stack.h.

template<class T>
void osg::fast_back_stack< T >::pop_back ( )
inline

Definition at line 77 of file fast_back_stack.h.

template<class T>
void osg::fast_back_stack< T >::push_back ( )
inline

Definition at line 58 of file fast_back_stack.h.

template<class T>
void osg::fast_back_stack< T >::push_back ( const T &  value)
inline

Definition at line 67 of file fast_back_stack.h.

template<class T>
unsigned int osg::fast_back_stack< T >::size ( ) const
inline

Definition at line 52 of file fast_back_stack.h.

Member Data Documentation

template<class T>
unsigned int osg::fast_back_stack< T >::_size

Definition at line 92 of file fast_back_stack.h.

template<class T>
std::vector<T> osg::fast_back_stack< T >::_stack

Definition at line 91 of file fast_back_stack.h.

template<class T>
T osg::fast_back_stack< T >::_value

Definition at line 90 of file fast_back_stack.h.


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