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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
{
"format": 1,
"id": "saw-data_server-loopback",
"kind": "class",
"name": "data_server",
"namespace": "saw",
"module": "remote",
"header": "modules/remote/c++/transfer_loopback.hpp",
"is_special": true,
"specializes": "saw-data_server",
"arguments": ["Schema", "Encoding", "rmt::Loopback"],
"brief_description": "Keeps the values of one schema in a map in this process.",
"detailed_description": [
[
"Registers itself with its",
{"name": "remote", "id": "saw-remote-loopback"},
"on construction and deregisters on destruction, so its lifetime is what a client sees as the server being reachable."
],
[
"Ids are owned by the server, since it is the only instance which knows about every client."
]
],
"templates": [
{"name": "Schema", "kind": "type"},
{"name": "Encoding", "kind": "type"}
],
"attributes": {
"saw-data_server-loopback-class_id": {
"id": "saw-data_server-loopback-class_id",
"name": "class_id",
"type": ["std::pair< uint32_t, uint32_t >"],
"visibility": "public",
"static": true,
"constexpr": true,
"initializer": "{schema_hash<Schema>::apply(), schema_hash<Encoding>::apply()}",
"brief_description": "Unique key for identifying an underlying data type without using typeid."
},
"saw-data_server-loopback-values_": {
"id": "saw-data_server-loopback-values_",
"name": "values_",
"type": ["std::unordered_map< uint64_t, data< Schema, Encoding > >"],
"visibility": "private"
},
"saw-data_server-loopback-next_id_": {
"id": "saw-data_server-loopback-next_id_",
"name": "next_id_",
"type": ["uint64_t"],
"visibility": "private",
"initializer": "0u",
"brief_description": "Counter for handing out ids."
}
},
"functions": {
"saw-data_server-loopback-get_class_id": {
"id": "saw-data_server-loopback-get_class_id",
"name": "get_class_id",
"type": ["std::pair< uint32_t, uint32_t >"],
"const": true,
"override": true,
"brief_description": "Returns the schema id."
},
"saw-data_server-loopback-next_free_id": {
"id": "saw-data_server-loopback-next_free_id",
"name": "next_free_id",
"type": ["id< Schema >"],
"brief_description": "Hands out the next id which is not in use yet.",
"detailed_description": [
[
"The id is not reserved by this call. It is only in use once something is stored under it, so two calls without a store in between return the same id."
]
]
},
"saw-data_server-loopback-send-1": {
"id": "saw-data_server-loopback-send-1",
"name": "send",
"type": ["error_or< void >"],
"brief_description": "Stores a value under an id without taking over the source.",
"detailed_description": [
["Fails with already_exists if the id is taken."]
],
"parameters": [
{"name": "dat", "type": ["ref< data< Schema, Encoding > >"]},
{"name": "store_id", "type": ["id< Schema >"]}
]
},
"saw-data_server-loopback-send-2": {
"id": "saw-data_server-loopback-send-2",
"name": "send",
"type": ["error_or< void >"],
"brief_description": "Stores a value under an id, taking it over.",
"detailed_description": [
["Fails with already_exists if the id is taken."]
],
"parameters": [
{"name": "dat", "type": ["data< Schema, Encoding >"]},
{"name": "store_id", "type": ["id< Schema >"]}
]
},
"saw-data_server-loopback-allocate": {
"id": "saw-data_server-loopback-allocate",
"name": "allocate",
"type": ["error_or< void >"],
"brief_description": "Reserves storage described by the meta schema without sending a value.",
"detailed_description": [
[
"The counterpart to sending for backends where the output has to exist before it is written, such as a device buffer."
]
],
"parameters": [
{
"name": "meta",
"type": ["data< typename meta_schema< Schema >::MetaSchema, Encoding >"],
"brief_description": "Dimensions and whatever else the schema needs to exist."
},
{"name": "store_id", "type": ["id< Schema >"]}
]
},
"saw-data_server-loopback-receive": {
"id": "saw-data_server-loopback-receive",
"name": "receive",
"type": ["error_or< data< Schema, Encoding > >"],
"brief_description": "Returns a copy of the value stored under an id.",
"detailed_description": [
["Fails with not_found if nothing is stored under that id."]
],
"parameters": [
{"name": "store_id", "type": ["id< Schema >"]}
]
},
"saw-data_server-loopback-erase": {
"id": "saw-data_server-loopback-erase",
"name": "erase",
"type": ["error_or< void >"],
"brief_description": "Drops the value stored under an id.",
"detailed_description": [
["Fails with not_found if nothing is stored under that id."]
],
"parameters": [
{"name": "store_id", "type": ["id< Schema >"]}
]
},
"saw-data_server-loopback-find": {
"id": "saw-data_server-loopback-find",
"name": "find",
"type": ["error_or< ptr< data< Schema, Encoding > > >"],
"brief_description": "Returns a pointer to the stored value itself.",
"detailed_description": [
[
"An exception for this backend. Only meaningful because the data is in process, and a store may invalidate the pointer."
],
[
"The",
{"name": "rpc_server", "id": "saw-rpc_server-loopback"},
"uses it to hand a parameter to an interface function without copying it out of the server first."
]
],
"parameters": [
{"name": "store_id", "type": ["id< Schema >"]}
]
}
},
"notes": [
"Copy and move are forbidden, because the remote holds a pointer to this object while it is registered."
]
}
|