#include <FIFO.h>
Public Member Functions | |
bool | avail () const |
bool | avail () const |
const _T & | back () const |
_T & | back () |
const _T & | back () const |
_T & | back () |
void | clear () |
void | clear () |
bool | empty () const |
bool | empty () const |
const _T & | front () const |
_T & | front () |
const _T & | front () const |
_T & | front () |
bool | full () const |
bool | full () const |
m_depth (f.m_depth) | |
m_depth (depth) | |
m_depth (f.m_depth) | |
m_depth (depth) | |
unsigned int | maxSize () const |
unsigned int | maxSize () const |
_T | pop () |
_T | pop () |
void | printOn (std::ostream &out=cout) |
void | printOn (std::ostream &out=cout) |
bool | push (const _T &x) |
bool | push (const _T &x) |
unsigned int | size () const |
unsigned int | size () const |
Public Attributes | |
__pad0__: vector<_T>() | |
__pad1__: vector<_T>(f) | |
Private Attributes | |
unsigned int | m_depth |
|
00103 { return size() < m_depth; }
|
|
00103 { return size() < m_depth; }
|
|
00068 { return vector<_T>::back(); }
|
|
00065 { return vector<_T>::back(); }
|
|
00068 { return vector<_T>::back(); }
|
|
00065 { return vector<_T>::back(); }
|
|
00085 { 00086 vector<_T>::clear(); 00087 }
|
|
00085 { 00086 vector<_T>::clear(); 00087 }
|
|
00070 { return (size() == 0); }
|
|
00070 { return (size() == 0); }
|
|
00067 { return vector<_T>::front(); }
|
|
00064 { return vector<_T>::front(); }
|
|
00067 { return vector<_T>::front(); }
|
|
00064 { return vector<_T>::front(); }
|
|
00101 { return size() == m_depth; }
|
|
00101 { return size() == m_depth; }
|
|
00034 : vector<_T>(f), m_depth(f.m_depth) 00035 { 00036 }
|
|
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 }
|
|
00034 : vector<_T>(f), m_depth(f.m_depth) 00035 { 00036 }
|
|
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 }
|
|
00074 {
00075 return m_depth;
00076 }
|
|
00074 {
00075 return m_depth;
00076 }
|
|
00054 { 00055 assert(size()>0); 00056 _T value (*begin()); 00057 erase(begin()); 00058 00059 // limited depth mode 00060 00061 return value; 00062 }
|
|
00054 { 00055 assert(size()>0); 00056 _T value (*begin()); 00057 erase(begin()); 00058 00059 // limited depth mode 00060 00061 return value; 00062 }
|
|
00091 { 00092 short i = 1; 00093 for (vector<_T>::reverse_iterator it = rbegin(); it != rend(); ++it) { 00094 out << (*it)(); 00095 if ((i % 8) == 0) out << "\n"; 00096 else out << "\t"; 00097 i++; 00098 } 00099 }
|
|
00091 { 00092 short i = 1; 00093 for (vector<_T>::reverse_iterator it = rbegin(); it != rend(); ++it) { 00094 out << (*it)(); 00095 if ((i % 8) == 0) out << "\n"; 00096 else out << "\t"; 00097 i++; 00098 } 00099 }
|
|
00042 { 00043 if ((m_depth != 0) && (size() >= m_depth)) return false; 00044 00045 push_back( x ); 00046 00047 return true; 00048 }
|
|
00042 { 00043 if ((m_depth != 0) && (size() >= m_depth)) return false; 00044 00045 push_back( x ); 00046 00047 return true; 00048 }
|
|
00080 {
00081 return vector<_T>::size();
00082 }
|
|
00080 {
00081 return vector<_T>::size();
00082 }
|
|
|
|
|
|
|