| 38 | class Printer; |
| 39 | |
| 40 | class CircularBuffer |
| 41 | { |
| 42 | public: |
| 43 | explicit CircularBuffer(int capacity = CAPACITY); |
| 44 | virtual ~CircularBuffer(); |
| 45 | |
| 46 | void Put(int); |
| 47 | int Get(); |
| 48 | bool IsEmpty(); |
| 49 | bool IsFull(); |
| 50 | int Capacity(); |
| 51 | int Next(int i); |
| 52 | void Print(Printer*); |
| 53 | |
| 54 | private: |
| 55 | |
| 56 | int index; |
| 57 | int outdex; |
| 58 | int* buffer; |
| 59 | int capacity; |
| 60 | enum |
| 61 | { |
| 62 | CAPACITY = 5 |
| 63 | }; |
| 64 | bool empty; |
| 65 | bool full; |
| 66 | |
| 67 | CircularBuffer(const CircularBuffer&); |
| 68 | CircularBuffer& operator=(const CircularBuffer&); |
| 69 | |
| 70 | }; |
| 71 | |
| 72 | #endif // D_CircularBuffer_H |
nothing calls this directly
no outgoing calls
no test coverage detected