|
TRF Language Model
|
A dynamic stack. More...
#include <wb-vector.h>
Public Member Functions | |
| Stack (int size=DEFAULE_VECTOR_SIZE) | |
| constructor More... | |
| void | Clean () |
| clean the stack. Donot release the memory More... | |
| void | Push (T p_t) |
| Push a value into the stack. More... | |
| bool | Pop (T *p_pT) |
| Pop a value outof the stack. More... | |
| T | Top () |
| Get the Top value of stack. More... | |
| int | GetNum () const |
| Get the number of the stack. 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 |
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 dynamic stack.
Definition at line 381 of file wb-vector.h.
|
inline |
constructor
Definition at line 386 of file wb-vector.h.
|
inline |
clean the stack. Donot release the memory
Definition at line 391 of file wb-vector.h.
|
inline |
Get the number of the stack.
Definition at line 418 of file wb-vector.h.
|
inline |
Pop a value outof the stack.
Definition at line 399 of file wb-vector.h.
|
inline |
Push a value into the stack.
Definition at line 393 of file wb-vector.h.
|
inline |
Get the Top value of stack.
Definition at line 411 of file wb-vector.h.
| int wb::Stack< T >::m_nTop |
top of the stack
Definition at line 384 of file wb-vector.h.