MCPcopy Create free account
hub / github.com/cpputest/cpputest / CircularBuffer

Class CircularBuffer

examples/ApplicationLib/CircularBuffer.h:40–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38class Printer;
39
40class CircularBuffer
41{
42public:
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
54private:
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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected