|
|
A generic container for an array of bytes.
bufferStore provides an array of bytes which can be accessed using various types.
|
Constructs a new bufferStore.
|
Constructs a new bufferStore and initializes its content.
Parameters:
buf | Pointer to data for initialization. |
len | Length of data for initialization. |
~ |
Destroys a bufferStore instance.
|
Constructs a new bufferStore and initializes its content.
Parameters:
b | A bufferStore, whose content is used for initialization. |
bufferStore & |
Copies a bufferStore.
unsigned long |
[const]
Retrieves the length of a bufferStore.
Returns: The current length of the contents in bytes.
unsigned char |
[const]
Retrieves the byte at index pos.
Parameters:
pos | The index of the byte to retrieve. |
Returns: The value of the byte at index pos
u_int16_t |
[const]
Retrieves the word at index pos.
Parameters:
pos | The index of the word to retrieve. |
Returns: The value of the word at index pos
u_int32_t |
[const]
Retrieves the dword at index pos.
Parameters:
pos | The index of the dword to retrieve. |
Returns: The value of the dword at index pos
const char * |
[const]
Retrieves the characters at index pos.
Parameters:
pos | The index of the characters to retrieve. |
Returns: A pointer to characters at index pos
void |
Removes bytes from the start of the buffer.
Parameters:
len | Number of bytes to remove. |
friend class std::ostream & |
Prints a dump of the content.
Mainly used for debugging purposes.
Parameters:
s | The stream to write to. |
b | The bufferStore do be dumped. |
Returns: The stream.
bool |
[const]
Tests if the bufferStore is empty.
Returns: true, if the bufferStore is empty. false, if it contains data.
void |
Initializes the bufferStore.
All data is removed, the length is reset to 0.
void |
Initializes the bufferStore with a given data.
Parameters:
buf | Pointer to data to initialize from. |
len | Length of data. |
void |
Appends a byte to the content of this instance.
Parameters:
c | The byte to append. |
void |
Appends a word to the content of this instance.
Parameters:
w | The word to append. |
void |
Appends a dword to the content of this instance.
Parameters:
dw | The dword to append. |
void |
Appends a string to the content of this instance.
The trailing zero byte is not copied to the content.
Parameters:
s | The string to append. |
void |
Appends a string to the content of this instance.
The trailing zero byte is copied to the content.
Parameters:
s | The string to append. |
void |
Appends data to the content of this instance.
Parameters:
buf | The data to append. |
len | Length of data. |
void |
Appends data to the content of this instance.
Parameters:
b | The bufferStore whose content to append. |
maxLen | Length of content to append. If
maxLen is less than 0 or greater than
the current length of b , then the
whole content of b is appended.
|
void |
Truncates the buffer. If the buffer is smaller, does nothing.
Parameters:
newLen | The new length of the buffer. |
void |
Prepends a byte to the content of this instance.
Parameters:
c | The byte to append. |
void |
Prepends a word to the content of this instance.
Parameters:
w | The word to append. |
Generated by: felfert@usw-pr-shell1.sourceforge.net on Sat Aug 10 18:46:04 2002, using kdoc 2.0a36. |