{ "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." } } }