JunkBox_Lib++ (for Windows) 1.10.1
Loading...
Searching...
No Matches
RingBuffer.h
Go to the documentation of this file.
1#ifndef __JBXL_CPP_RINGBUFFER_H_
2#define __JBXL_CPP_RINGBUFFER_H_
3
10#include "tools++.h"
11
12
13namespace jbxl {
14
15
17{
18public:
20 CRingBuffer(int rsz, int dsz) { init(rsz, dsz);}
21 virtual ~CRingBuffer(void) { free();}
22
23protected:
24 void** buf;
25
26 int bufsz;
27 int datasz;
28 int spoint;
29 int epoint;
30 int datano;
31
32public:
33 int state;
34 BOOL enable;
35
36protected:
37 void init_data(void);
38
39public:
40 BOOL init(int ring_size, int data_size);
41 void free(void);
42 void clear(void);
43
44 void* get(void);
45 void* get(int pos);
46 void put(void* ptr);
47 void put(void* ptr, int pos);
48};
49
50
51} // namespace
52
53
54#endif
CRingBuffer(int rsz, int dsz)
Definition RingBuffer.h:20
BOOL init(int ring_size, int data_size)
void put(void *ptr)
virtual ~CRingBuffer(void)
Definition RingBuffer.h:21
void * get(void)
void init_data(void)
Definition Brep.h:29
ツールライブラリ ヘッダ for C++