summaryrefslogtreecommitdiff
path: root/docs/data/remote/i_data_server.json
diff options
context:
space:
mode:
Diffstat (limited to 'docs/data/remote/i_data_server.json')
-rw-r--r--docs/data/remote/i_data_server.json53
1 files changed, 53 insertions, 0 deletions
diff --git a/docs/data/remote/i_data_server.json b/docs/data/remote/i_data_server.json
new file mode 100644
index 0000000..ecde59c
--- /dev/null
+++ b/docs/data/remote/i_data_server.json
@@ -0,0 +1,53 @@
+{
+ "format": 1,
+ "id": "saw-i_data_server",
+ "kind": "class",
+ "name": "i_data_server",
+ "namespace": "saw",
+ "module": "remote",
+ "header": "modules/remote/c++/transfer.hpp",
+ "brief_description": "Registry handle for a data server of unknown schema.",
+ "detailed_description": [
+ [
+ "The one place the library erases a type. A",
+ {"name": "remote", "id": "saw-remote"},
+ "holds servers for many schemas in one map, which is only possible if they share a type. The class id recovers what was erased: a caller which knows the schema it wants asks for exactly that one and gets an error if the stored server is a different one."
+ ],
+ [
+ "The destructor is protected, so nothing can be deleted through this handle."
+ ]
+ ],
+ "templates": [
+ {
+ "name": "Remote",
+ "kind": "type",
+ "brief_description": "Tag type of the backend."
+ }
+ ],
+ "functions": {
+ "saw-i_data_server-get_class_id": {
+ "id": "saw-i_data_server-get_class_id",
+ "name": "get_class_id",
+ "type": ["std::pair< uint32_t, uint32_t >"],
+ "const": true,
+ "virtual": true,
+ "brief_description": "Schema hash and encoding hash of the server behind this handle."
+ },
+ "saw-i_data_server-cast_to": {
+ "id": "saw-i_data_server-cast_to",
+ "name": "cast_to",
+ "type": ["error_or< ptr< To > >"],
+ "brief_description": "Recovers the concrete server.",
+ "detailed_description": [
+ ["Fails with invalid_state if the class ids don't match, which is what keeps the erasure honest."]
+ ],
+ "templates": [
+ {
+ "name": "To",
+ "kind": "type",
+ "brief_description": "The concrete data server expected behind this handle."
+ }
+ ]
+ }
+ }
+}