#include <history.h>


Public Member Functions | |
| CircBuffer (u_int16_t n) | |
| void | push_back (const _Tp &e) |
| When push_back'ing, call std::vector<>'s push_back, then "bounds check". | |
| std::vector< _Tp >::size_type | max_size () const |
| Override max_size() so it returns circ_size, not the maximum size the std::vector<> can be allocated to. | |
Private Attributes | |
| u_int16_t | circ_size |
| size limit of the buffer/vector | |
This template class is a subclass of std::vector<> that manages to be of a limited size. If the vector<> grows beyond the specified size, it trims the elements off of the top automatically.
Definition at line 67 of file history.h.
| CircBuffer< _Tp >::CircBuffer | ( | u_int16_t | n | ) | [inline] |
| void CircBuffer< _Tp >::push_back | ( | const _Tp & | e | ) | [inline] |
When push_back'ing, call std::vector<>'s push_back, then "bounds check".
..
Definition at line 75 of file history.h.
Referenced by History::write().

| std::vector<_Tp>::size_type CircBuffer< _Tp >::max_size | ( | ) | const [inline] |
Override max_size() so it returns circ_size, not the maximum size the std::vector<> can be allocated to.
..
Definition at line 83 of file history.h.
Referenced by History::get_id().

u_int16_t CircBuffer< _Tp >::circ_size [private] |
size limit of the buffer/vector
Definition at line 87 of file history.h.
Referenced by CircBuffer< std::string >::max_size(), and CircBuffer< std::string >::push_back().
1.5.5