summaryrefslogtreecommitdiff
path: root/docs/data/remote/data_or_id.json
blob: c3152e9fa9e141415ffcd975f81ecc7a8a783a58 (plain)
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
{
	"format": 1,
	"id": "saw-data_or_id",
	"kind": "class",
	"name": "data_or_id",
	"namespace": "saw",
	"module": "remote",
	"header": "modules/remote/c++/remote.hpp",
	"brief_description": "Helper for rpc calls. Either a value or its place on the remote.",
	"detailed_description": [
		[
			"A parameter is in one of two states: still here, or already on the remote from an earlier call. This carries both so a call site doesn't have to branch, and so a result can be fed into the next call without a roundtrip."
		],
		[
			"Both constructors are implicit, which is what lets a plain value be passed where a call expects one of these."
		]
	],
	"templates": [
		{"name": "T", "kind": "type", "brief_description": "Schema of the data."},
		{"name": "Encoding", "kind": "type"}
	],
	"attributes": {
		"saw-data_or_id-doi_": {
			"id": "saw-data_or_id-doi_",
			"name": "doi_",
			"type": ["std::variant< id< T >, data< T, Encoding > >"],
			"visibility": "private",
			"brief_description": "Variant representing either the id or the data class."
		}
	},
	"functions": {
		"saw-data_or_id-ctor-1": {
			"id": "saw-data_or_id-ctor-1",
			"name": "data_or_id",
			"type": [],
			"brief_description": "Refers to data already on the remote.",
			"parameters": [
				{"name": "val", "type": ["const id< T > &"]}
			]
		},
		"saw-data_or_id-ctor-2": {
			"id": "saw-data_or_id-ctor-2",
			"name": "data_or_id",
			"type": [],
			"brief_description": "Carries data which still has to be sent.",
			"parameters": [
				{"name": "val", "type": ["data< T, Encoding >"]}
			]
		},
		"saw-data_or_id-is_id": {
			"id": "saw-data_or_id-is_id",
			"name": "is_id",
			"type": ["bool"],
			"const": true,
			"brief_description": "Checks if this class holds an id."
		},
		"saw-data_or_id-is_data": {
			"id": "saw-data_or_id-is_data",
			"name": "is_data",
			"type": ["bool"],
			"const": true,
			"brief_description": "Checks if this class holds data."
		},
		"saw-data_or_id-get_id": {
			"id": "saw-data_or_id-get_id",
			"name": "get_id",
			"type": ["id< T >"],
			"const": true,
			"brief_description": "Returns the id."
		},
		"saw-data_or_id-get_data": {
			"id": "saw-data_or_id-get_data",
			"name": "get_data",
			"type": ["data< T, Encoding > &"],
			"brief_description": "Returns a data reference."
		}
	}
}