#include <PackBuf.h>
Public Methods | |
| void | setup (char *buf_, int size_, int flag=0) |
| Method that does the setup for the constructors. | |
| UnPackBuffer () | |
| Default constructor. | |
| UnPackBuffer (int size_) | |
| Constructor that specifies the size of the buffer. | |
| UnPackBuffer (char *buf_, int size_, int flag=0) | |
| Constructor that sets the internal buffer to the given array. | |
| ~UnPackBuffer () | |
| Destructor. | |
| void | resize (const int newsize) |
| Resizes the internal buffer. | |
| const char * | buf () |
| Returns a pointer to the internal buffer. | |
| int | len () |
| Returns the length of the buffer. | |
| int | curr () |
| Returns the number of bytes that have been unpacked from the buffer. | |
| void | reset () |
| Resets the index of the internal buffer. | |
| void | unpack (int *data, const int num=1) |
| Unpack one or more int's. | |
| void | unpack (unsigned_int *data, const int num=1) |
| Unpack one or more unsigned int's. | |
| void | unpack (long *data, const int num=1) |
| Unpack one or more long's. | |
| void | unpack (unsigned_long *data, const int num=1) |
| Unpack one or more unsigned long's. | |
| void | unpack (short *data, const int num=1) |
| Unpack one or more short's. | |
| void | unpack (unsigned_short *data, const int num=1) |
| Unpack one or more unsigned short's. | |
| void | unpack (char *data, const int num=1) |
| Unpack one or more char's. | |
| void | unpack (unsigned_char *data, const int num=1) |
| Unpack one or more unsigned char's. | |
| void | unpack (double *data, const int num=1) |
| Unpack one or more double's. | |
| void | unpack (float *data, const int num=1) |
| Unpack one or more float's. | |
| void | unpack (bool *data, const int num=1) |
| Unpack one or more bool's. | |
| void | unpack (int &data) |
| Unpack a int. | |
| void | unpack (unsigned_int &data) |
| Unpack a unsigned int. | |
| void | unpack (long &data) |
| Unpack a long. | |
| void | unpack (unsigned_long &data) |
| Unpack a unsigned long. | |
| void | unpack (short &data) |
| Unpack a short. | |
| void | unpack (unsigned_short &data) |
| Unpack a unsigned short. | |
| void | unpack (char &data) |
| Unpack a char. | |
| void | unpack (unsigned_char &data) |
| Unpack a unsigned char. | |
| void | unpack (double &data) |
| Unpack a double. | |
| void | unpack (float &data) |
| Unpack a float. | |
| void | unpack (bool &data) |
| Unpack a bool. | |
Protected Attributes | |
| char * | buffer |
| The internal buffer for unpacking. | |
| int | index |
| The index into the current buffer. | |
| int | size |
| The total size that has been allocated for the buffer. | |
| int | own_flag |
If TRUE, then this class owns the internal buffer. | |