#include <FIFO.h>
Public Member Functions | |
m_depth (depth) | |
m_depth (f.m_depth) | |
bool | push (const _T &x) |
_T | pop () |
_T & | front () |
_T & | back () |
const _T & | front () const |
const _T & | back () const |
bool | empty () const |
unsigned int | maxSize () const |
unsigned int | size () const |
void | clear () |
void | printOn (std::ostream &out=cout) |
bool | full () const |
bool | avail () const |
Public Attributes | |
__pad0__: vector<_T>() | |
__pad1__: vector<_T>(f) | |
Private Attributes | |
unsigned int | m_depth |
Definition at line 20 of file FIFO.h.
const _T& FIFO< _T >::back | ( | ) | const [inline] |
_T& FIFO< _T >::back | ( | ) | [inline] |
void FIFO< _T >::clear | ( | ) | [inline] |
const _T& FIFO< _T >::front | ( | ) | const [inline] |
_T& FIFO< _T >::front | ( | ) | [inline] |
Definition at line 24 of file FIFO.h.
00024 : vector<_T>(), m_depth(depth) 00025 { 00026 if (depth > 0) reserve ( depth ); 00027 00028 // if the depth of the fifo is fixed, then reserve enough space to contain it entirely 00029 // FIFO operates in two modes: one for a fixed depth, 00030 // and another for a non-fixed depth (unlimited) 00031 }
unsigned int FIFO< _T >::maxSize | ( | ) | const [inline] |
Definition at line 73 of file FIFO.h.
References FIFO< _T >::m_depth.
00074 { 00075 return m_depth; 00076 }
_T FIFO< _T >::pop | ( | ) | [inline] |
void FIFO< _T >::printOn | ( | std::ostream & | out = cout |
) | [inline] |
Definition at line 41 of file FIFO.h.
References FIFO< _T >::m_depth, push_back(), and FIFO< _T >::size().
00042 { 00043 if ((m_depth != 0) && (size() >= m_depth)) return false; 00044 00045 push_back( x ); 00046 00047 return true; 00048 }
unsigned int FIFO< _T >::size | ( | ) | const [inline] |
Definition at line 79 of file FIFO.h.
References delete_small_size::size.
Referenced by FIFO< _T >::avail(), FIFO< _T >::empty(), FIFO< _T >::full(), FIFO< _T >::pop(), and FIFO< _T >::push().
00080 { 00081 return vector<_T>::size(); 00082 }
Definition at line 108 of file FIFO.h.
Referenced by FIFO< _T >::avail(), FIFO< _T >::full(), FIFO< _T >::maxSize(), and FIFO< _T >::push().