A Simple First-In-First-Out (FIFO) buffer This is used internally by our SOCKET classes. More...
#include <mi32/ringbuffer.h>
Public Member Functions | |
| RINGBUFFER () | |
| ~RINGBUFFER () | |
| INT32 | Append (const UINT8 *data, INT32 numbytes) |
| INT32 | GetBytes (UINT8 *data, INT32 numbytes) |
| INT32 | GetNumBytes () const |
| INT32 | Peek (const void *&ptr) |
| INT32 | StrChr (char c) const |
| INT32 | UCStrChr (MIUNICODE c) const |
A Simple First-In-First-Out (FIFO) buffer This is used internally by our SOCKET classes.
It's implemented in misystem, but I haven't decided if I should export it or move this include file to mi32p
| RINGBUFFER::RINGBUFFER | ( | ) | [inline] |
| RINGBUFFER::~RINGBUFFER | ( | ) |
Append bytes to the end of the buffer.
Pull bytes from the front of the buffer.
| data | Buffer to copy bytes into | |
| numbytes | The number of bytes to consume. Can be NULL if the data will just be ignored. |
| INT32 RINGBUFFER::GetNumBytes | ( | ) | const |
Return the number of bytes currently available in the buffer.
| INT32 RINGBUFFER::Peek | ( | const void *& | ptr | ) |
Peek at the head of the buffer.
Fills in a pointer pointing to the head of the buffer and returns the number of bytes available. Note, the number of bytes returned may not be the total number of bytes available, but it's the number of contiguous bytes that can be accessed through the returned pointer.
| INT32 RINGBUFFER::StrChr | ( | char | c | ) | const |
Peek at the buffer and find the offset to the given character.
Peek at the buffer and find the offset to the given unicode character.
1.6.1