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.
Public Fields
-
T _value
-
std::vector<T> _stack
-
unsigned int _size
Public Methods
-
inline fast_back_stack()
-
inline fast_back_stack(const fast_back_stack& fbs)
-
inline fast_back_stack(const T& value)
-
fast_back_stack& operator = (const fast_back_stack& fbs)
-
inline void clear()
-
inline bool empty() const
-
inline unsigned int size() const
-
inline T& back()
-
inline const T& back() const
-
inline void push_back()
-
inline void push_back(const T& value)
-
inline void pop_back()
Documentation
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. The fast_back_stack
although contains a stl container it only implments 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 purly to maximize the speed at which the
back can be accessed.
- inline fast_back_stack()
- inline fast_back_stack(const fast_back_stack& fbs)
- inline fast_back_stack(const T& value)
- fast_back_stack& operator = (const fast_back_stack& fbs)
- inline void clear()
- inline bool empty() const
- inline unsigned int size() const
- inline T& back()
- inline const T& back() const
- inline void push_back()
- inline void push_back(const T& value)
- inline void pop_back()
- T _value
- std::vector<T> _stack
- unsigned int _size
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.