JunkBox_Lib++ (for Windows) 1.10.1
|
#include <RingBuffer.h>
Public Member Functions | |
CRingBuffer (void) | |
CRingBuffer (int rsz, int dsz) | |
virtual | ~CRingBuffer (void) |
BOOL | init (int ring_size, int data_size) |
void | free (void) |
void | clear (void) |
void * | get (void) |
void * | get (int pos) |
void | put (void *ptr) |
void | put (void *ptr, int pos) |
Public Attributes | |
int | state |
BOOL | enable |
Protected Member Functions | |
void | init_data (void) |
Protected Attributes | |
void ** | buf |
int | bufsz |
int | datasz |
int | spoint |
int | epoint |
int | datano |
Definition at line 16 of file RingBuffer.h.
|
inline |
Definition at line 19 of file RingBuffer.h.
References CRingBuffer::init_data().
|
inline |
Definition at line 20 of file RingBuffer.h.
References CRingBuffer::init().
|
inlinevirtual |
Definition at line 21 of file RingBuffer.h.
References CRingBuffer::free().
void clear | ( | void | ) |
Definition at line 69 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, CRingBuffer::datano, CRingBuffer::datasz, CRingBuffer::epoint, CRingBuffer::spoint, and CRingBuffer::state.
void free | ( | void | ) |
Definition at line 53 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, CRingBuffer::free(), CRingBuffer::init_data(), and jbxl::isNull().
Referenced by CRingBuffer::free(), CRingBuffer::init(), and CRingBuffer::~CRingBuffer().
void * get | ( | int | pos | ) |
Definition at line 98 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, and CRingBuffer::epoint.
void * get | ( | void | ) |
Definition at line 83 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, CRingBuffer::datano, and CRingBuffer::spoint.
BOOL init | ( | int | ring_size, |
int | data_size ) |
Definition at line 26 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, CRingBuffer::datasz, CRingBuffer::enable, FALSE, CRingBuffer::free(), CRingBuffer::init_data(), CRingBuffer::state, and TRUE.
Referenced by CRingBuffer::CRingBuffer().
|
protected |
Definition at line 13 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, CRingBuffer::datano, CRingBuffer::datasz, CRingBuffer::enable, CRingBuffer::epoint, FALSE, CRingBuffer::spoint, and CRingBuffer::state.
Referenced by CRingBuffer::CRingBuffer(), CRingBuffer::free(), and CRingBuffer::init().
void put | ( | void * | ptr | ) |
Definition at line 108 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, CRingBuffer::datano, CRingBuffer::datasz, and CRingBuffer::epoint.
void put | ( | void * | ptr, |
int | pos ) |
Definition at line 119 of file RingBuffer.cpp.
References CRingBuffer::buf, CRingBuffer::bufsz, CRingBuffer::datasz, and CRingBuffer::epoint.
|
protected |
Definition at line 24 of file RingBuffer.h.
Referenced by CRingBuffer::clear(), CRingBuffer::free(), CRingBuffer::get(), CRingBuffer::get(), CRingBuffer::init(), CRingBuffer::init_data(), CRingBuffer::put(), and CRingBuffer::put().
|
protected |
Definition at line 26 of file RingBuffer.h.
Referenced by CRingBuffer::clear(), CRingBuffer::free(), CRingBuffer::get(), CRingBuffer::get(), CRingBuffer::init(), CRingBuffer::init_data(), CRingBuffer::put(), and CRingBuffer::put().
|
protected |
Definition at line 30 of file RingBuffer.h.
Referenced by CRingBuffer::clear(), CRingBuffer::get(), CRingBuffer::init_data(), and CRingBuffer::put().
|
protected |
Definition at line 27 of file RingBuffer.h.
Referenced by CRingBuffer::clear(), CRingBuffer::init(), CRingBuffer::init_data(), CRingBuffer::put(), and CRingBuffer::put().
BOOL enable |
Definition at line 34 of file RingBuffer.h.
Referenced by CRingBuffer::init(), and CRingBuffer::init_data().
|
protected |
Definition at line 29 of file RingBuffer.h.
Referenced by CRingBuffer::clear(), CRingBuffer::get(), CRingBuffer::init_data(), CRingBuffer::put(), and CRingBuffer::put().
|
protected |
Definition at line 28 of file RingBuffer.h.
Referenced by CRingBuffer::clear(), CRingBuffer::get(), and CRingBuffer::init_data().
int state |
Definition at line 33 of file RingBuffer.h.
Referenced by CRingBuffer::clear(), CRingBuffer::init(), and CRingBuffer::init_data().