6# pragma warning(disable: 4786)
20class FIFO :
private vector<_T>
23 FIFO (
unsigned int depth = 0)
24 : vector<
_T>(), m_depth(depth)
26 if (depth > 0) reserve ( depth );
34 : vector<
_T>(f), m_depth(f.m_depth)
43 if ((m_depth != 0) && (
size() >= m_depth))
return false;
64 _T&
front () {
return vector<_T>::front(); }
65 _T&
back () {
return vector<_T>::back(); }
67 const _T&
front ()
const {
return vector<_T>::front(); }
68 const _T&
back ()
const {
return vector<_T>::back(); }
81 return vector<_T>::size();
93 for (vector<_T>::reverse_iterator it =
rbegin(); it !=
rend(); ++it) {
95 if ((i % 8) == 0) out <<
"\n";
108 unsigned int m_depth;
FIFO(unsigned int depth=0)
unsigned int maxSize() const
unsigned int size() const
void printOn(std::ostream &out=cout)