1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{
"format": 1,
"id": "saw-ring_buffer",
"kind": "class",
"name": "ring_buffer",
"namespace": "saw",
"module": "core",
"header": "modules/core/c++/buffer.hpp",
"brief_description": "Buffer wrapping around if the read cursor caught up.",
"detailed_description": [
[
"Fixed capacity, reused in place. Suited to a stream where bytes are produced and consumed continuously, since nothing is allocated after construction."
],
[
"The capacity does not grow, so a write beyond what the reader has freed fails with",
{"name": "buffer_exhausted", "id": "saw-err-buffer_exhausted"},
"rather than resizing."
]
],
"bases": [
[{"name": "buffer", "id": "saw-buffer"}]
],
"attributes": {
"saw-ring_buffer-write_reached_read_": {
"id": "saw-ring_buffer-write_reached_read_",
"name": "write_reached_read_",
"type": ["bool"],
"visibility": "private",
"brief_description": "Distinguishes a full buffer from an empty one, since both have equal cursors."
}
},
"functions": {
"saw-ring_buffer-ctor-1": {
"id": "saw-ring_buffer-ctor-1",
"name": "ring_buffer",
"type": [],
"brief_description": "With the default capacity of RING_BUFFER_MAX_SIZE bytes."
},
"saw-ring_buffer-ctor-2": {
"id": "saw-ring_buffer-ctor-2",
"name": "ring_buffer",
"type": [],
"parameters": [
{"name": "size", "type": ["size_t"]}
]
},
"saw-ring_buffer-size": {
"id": "saw-ring_buffer-size",
"name": "size",
"type": ["size_t"],
"const": true,
"brief_description": "Total capacity, not the amount currently held."
}
}
}
|