|
TRF Language Model
|
A queue based the dynamic memory mangement. More...
#include <wb-vector.h>
Public Member Functions | |
| Queue (int size=DEFAULE_VECTOR_SIZE) | |
| constructor More... | |
| void | Clean () |
| clean the queue. Donot release the memory More... | |
| void | In (T p_t) |
| Add a value into queue. More... | |
| bool | Out (T *p_pT) |
| Move a value outof queue. More... | |
| bool | IsEmpty () |
| Return if the queue is empty. More... | |
| int | GetNum () |
| Return the value number. More... | |
Public Member Functions inherited from wb::Vector< T > | |
| Vector (int size=DEFAULE_VECTOR_SIZE) | |
| constructor, do not init the memeory to zero. More... | |
| ~Vector () | |
| desturctor More... | |
| int | Size () const |
| get the memory size More... | |
| T * | GetBuffer (int i=0) const |
| get the buffer pointer More... | |
| T & | Get (int i) |
| get the value at position i More... | |
| int | Size2Bits (int size) |
| Transform the size to bit. More... | |
| void | Fill (T m) |
| set all the values to m More... | |
| void | Zero () |
| Fill all the memory to ZERO. call 'memset'. More... | |
| void | Copy (const Vector< T > &vector) |
| Copy a vector to another, using '=' to set values. More... | |
| void | MemCopy (Vector< T > &vector) |
| Copy a vector to another, using 'memcpy' to set values. More... | |
| void | BufferOutside (T *&p_pt) |
| Set the buffer pointer to p_pt, and re-init the vector. More... | |
Public Attributes | |
| int | m_nTop |
| the top of the queue More... | |
| int | m_nBottom |
Additional Inherited Members | |
Protected Attributes inherited from wb::Vector< T > | |
| T * | m_pBuffer |
| buffer pointer More... | |
| int | m_nBits |
| bit number of memory size More... | |
A queue based the dynamic memory mangement.
This is not a circular quque. As ar result, the memory size will increase following the values added to the queue.
Definition at line 431 of file wb-vector.h.
|
inline |
constructor
Definition at line 437 of file wb-vector.h.
|
inline |
clean the queue. Donot release the memory
Definition at line 443 of file wb-vector.h.
|
inline |
Return the value number.
Definition at line 466 of file wb-vector.h.
|
inline |
Add a value into queue.
Definition at line 445 of file wb-vector.h.
|
inline |
Return if the queue is empty.
Definition at line 461 of file wb-vector.h.
|
inline |
Move a value outof queue.
Definition at line 451 of file wb-vector.h.
| int wb::Queue< T >::m_nBottom |
the bottom of the queue
Definition at line 435 of file wb-vector.h.
| int wb::Queue< T >::m_nTop |
the top of the queue
Definition at line 434 of file wb-vector.h.