Chops a buffer up in to smaller pieces.
More...
#include <BufferChopper.h>
|
| BufferChopper (size_t chopSize=1024) |
| Constructor passing the chop size.
|
|
void | assign (char *data, size_t sz) |
| Assigns the buffer to be chopped.
|
|
char * | getChunkData () |
| Gets the pointer to the next chop of data. Each call moves the internal pointer up until no more data is available.
|
|
size_t | getChunkSize () const |
| Gets the size of the chop pointed at by getChunkData().
|
|
bool | moveNext () |
| Moves to the next chuck when available.
|
|
bool | isDone () const |
| Get the status on the chopping being done or not.
|
|
Chops a buffer up in to smaller pieces.
◆ BufferChopper()
sf::BufferChopper::BufferChopper |
( |
size_t |
chopSize = 1024 | ) |
|
|
explicit |
Constructor passing the chop size.
- Parameters
-
◆ assign()
void sf::BufferChopper::assign |
( |
char * |
data, |
|
|
size_t |
sz |
|
) |
| |
Assigns the buffer to be chopped.
- Parameters
-
data | Pointer to the data. |
sz | Size of the data pointed at. |
◆ getChunkData()
char * sf::BufferChopper::getChunkData |
( |
| ) |
|
Gets the pointer to the next chop of data. Each call moves the internal pointer up until no more data is available.
- Returns
- Pointer to the chop.
◆ getChunkSize()
size_t sf::BufferChopper::getChunkSize |
( |
| ) |
const |
Gets the size of the chop pointed at by getChunkData().
- Returns
- Size of the current data chop.
◆ isDone()
bool sf::BufferChopper::isDone |
( |
| ) |
const |
Get the status on the chopping being done or not.
- Returns
- True when done.
◆ moveNext()
bool sf::BufferChopper::moveNext |
( |
| ) |
|
Moves to the next chuck when available.
- Returns
- True on success to do so.
The documentation for this class was generated from the following file: