From 4fdfa202eef2419a9f043cd45a3075d6b5e3063f Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Wed, 21 Aug 2024 18:01:16 +0200 Subject: Pulling out Storage template --- modules/remote/c++/remote.hpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/remote/c++/remote.hpp') diff --git a/modules/remote/c++/remote.hpp b/modules/remote/c++/remote.hpp index 571a4e7..807213e 100644 --- a/modules/remote/c++/remote.hpp +++ b/modules/remote/c++/remote.hpp @@ -14,13 +14,13 @@ namespace saw { /** * This class acts as a helper for rpc calls and representing data on the remote. */ -template +template class data_or_id { private: /** * Variant representing the either id or data class. */ - std::variant, data> doi_; + std::variant, data> doi_; public: /** * Constructor for instantiating. @@ -32,7 +32,7 @@ public: /** * Constructor for instantiating. */ - data_or_id(data val): + data_or_id(data val): doi_{std::move(val)} {} @@ -47,7 +47,7 @@ public: * Check if this class holds data. */ bool is_data() const { - return std::holds_alternative>(doi_); + return std::holds_alternative>(doi_); } /** @@ -60,15 +60,15 @@ public: /** * Return a data reference. */ - data& get_data(){ - return std::get>(doi_); + data& get_data(){ + return std::get>(doi_); } /** * Return a data reference. */ - const data& get_data() const { - return std::get>(doi_); + const data& get_data() const { + return std::get>(doi_); } }; @@ -76,21 +76,21 @@ public: /** * Representing data on the remote */ -template +template class remote_data; -template +template class rpc_client; /** * Implementation of a remote server on the backend */ -template +template class rpc_server { private: - interface iface_; + interface iface_; public: - rpc_server(interface iface): + rpc_server(interface iface): iface_{std::move(iface)} {} }; -- cgit v1.2.3