OSDN Git Service

[General] Completely merge upstream 2019-01-11.
[csp-qt/common_source_project-fm7.git] / source / src / fifo.h
1 /*
2         Skelton for retropc emulator
3
4         Author : Takeda.Toshiya
5         Date   : 2006.09.17-
6
7         [ fifo buffer ]
8 */
9
10 #ifndef _FIFO_H_
11 #define _FIFO_H_
12
13 #include "common.h"
14
15 class csp_state_data_saver;
16 class DLL_PREFIX FIFO
17 {
18 private:
19         int size;
20         int* buf;
21         int cnt, rpt, wpt;
22
23 public:
24         FIFO(int s);
25         void release();
26         void clear();
27         void write(int val);
28         int read();
29         int read_not_remove(int pt);
30         void write_not_push(int pt, int d);
31         int count();
32         bool full();
33         bool empty();
34         bool process_state(void *f, bool loading);
35 };
36
37 #endif
38