-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrpc_8hpp.html
210 lines (207 loc) · 18.4 KB
/
rpc_8hpp.html
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rpc.hpp: include/rpc.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">rpc.hpp<span id="projectnumber"> 0.8.1</span>
</div>
<div id="projectbrief">Simple RPC Header-Only Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#namespaces">Namespaces</a> |
<a href="#define-members">Macros</a> |
<a href="#enum-members">Enumerations</a> </div>
<div class="headertitle"><div class="title">rpc.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Header-only library for serialized RPC usage.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include <cassert></code><br />
<code>#include <cstddef></code><br />
<code>#include <optional></code><br />
<code>#include <stdexcept></code><br />
<code>#include <string></code><br />
<code>#include <tuple></code><br />
<code>#include <type_traits></code><br />
<code>#include <utility></code><br />
<code>#include <functional></code><br />
<code>#include <unordered_map></code><br />
</div>
<p><a href="rpc_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1rpc__exception.html">rpc_hpp::rpc_exception</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1function__not__found.html">rpc_hpp::function_not_found</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1remote__exec__error.html">rpc_hpp::remote_exec_error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1serialization__error.html">rpc_hpp::serialization_error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1deserialization__error.html">rpc_hpp::deserialization_error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1function__mismatch.html">rpc_hpp::function_mismatch</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1client__send__error.html">rpc_hpp::client_send_error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1client__receive__error.html">rpc_hpp::client_receive_error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1server__send__error.html">rpc_hpp::server_send_error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1server__receive__error.html">rpc_hpp::server_receive_error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1server_1_1server__interface.html">rpc_hpp::server::server_interface< Serial ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class defining an interface for serving functions via RPC. <a href="classrpc__hpp_1_1server_1_1server__interface.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrpc__hpp_1_1client_1_1client__interface.html">rpc_hpp::client::client_interface< Serial ></a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class defining an interface for calling into an RPC server or module. <a href="classrpc__hpp_1_1client_1_1client__interface.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacerpc__hpp"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacerpc__hpp.html">rpc_hpp</a></td></tr>
<tr class="memdesc:namespacerpc__hpp"><td class="mdescLeft"> </td><td class="mdescRight">Top-level namespace for <a class="el" href="rpc_8hpp.html" title="Header-only library for serialized RPC usage.">rpc.hpp</a> classes and functions. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:namespacerpc__hpp_1_1detail"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacerpc__hpp_1_1detail.html">rpc_hpp::detail</a></td></tr>
<tr class="memdesc:namespacerpc__hpp_1_1detail"><td class="mdescLeft"> </td><td class="mdescRight">Namespace for implementation details, should not be used outside of the library. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:namespacerpc__hpp_1_1server"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacerpc__hpp_1_1server.html">rpc_hpp::server</a></td></tr>
<tr class="memdesc:namespacerpc__hpp_1_1server"><td class="mdescLeft"> </td><td class="mdescRight">Namespace containing functions and classes only relevant to "server-side" implentations. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:namespacerpc__hpp_1_1client"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacerpc__hpp_1_1client.html">rpc_hpp::client</a></td></tr>
<tr class="memdesc:namespacerpc__hpp_1_1client"><td class="mdescLeft"> </td><td class="mdescRight">Namespace containing functions and classes only relevant to "client-side" implentations. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aa68fe684faf759e42e530ec4584f09fa"><td class="memItemLeft" align="right" valign="top"><a id="aa68fe684faf759e42e530ec4584f09fa" name="aa68fe684faf759e42e530ec4584f09fa"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HPP_ENABLE_SERVER_CACHE</b></td></tr>
<tr class="memdesc:aa68fe684faf759e42e530ec4584f09fa"><td class="mdescLeft"> </td><td class="mdescRight">Enables server-side caching abilities. <br /></td></tr>
<tr class="separator:aa68fe684faf759e42e530ec4584f09fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af56044a2d07e951cbf315821dd3f1a41"><td class="memItemLeft" align="right" valign="top"><a id="af56044a2d07e951cbf315821dd3f1a41" name="af56044a2d07e951cbf315821dd3f1a41"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HPP_CLIENT_IMPL</b></td></tr>
<tr class="memdesc:af56044a2d07e951cbf315821dd3f1a41"><td class="mdescLeft"> </td><td class="mdescRight">Indicates that <a class="el" href="rpc_8hpp.html" title="Header-only library for serialized RPC usage.">rpc.hpp</a> is being consumed by a client translation unit. <br /></td></tr>
<tr class="separator:af56044a2d07e951cbf315821dd3f1a41"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae19f6e09c9f97b2789404cc054dd8811"><td class="memItemLeft" align="right" valign="top"><a id="ae19f6e09c9f97b2789404cc054dd8811" name="ae19f6e09c9f97b2789404cc054dd8811"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HPP_MODULE_IMPL</b></td></tr>
<tr class="memdesc:ae19f6e09c9f97b2789404cc054dd8811"><td class="mdescLeft"> </td><td class="mdescRight">Indicates that <a class="el" href="rpc_8hpp.html" title="Header-only library for serialized RPC usage.">rpc.hpp</a> is being consumed by a module (dynamically loaded .dll/.so) translation unit. <br /></td></tr>
<tr class="separator:ae19f6e09c9f97b2789404cc054dd8811"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a036051135b9379ac43ff4d6023827325"><td class="memItemLeft" align="right" valign="top"><a id="a036051135b9379ac43ff4d6023827325" name="a036051135b9379ac43ff4d6023827325"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HPP_SERVER_IMPL</b></td></tr>
<tr class="memdesc:a036051135b9379ac43ff4d6023827325"><td class="mdescLeft"> </td><td class="mdescRight">Indicates that <a class="el" href="rpc_8hpp.html" title="Header-only library for serialized RPC usage.">rpc.hpp</a> is being consumed by a server translation unit. <br /></td></tr>
<tr class="separator:a036051135b9379ac43ff4d6023827325"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5dd38bf0af7418fc8568b5c1703d4b5b"><td class="memItemLeft" align="right" valign="top"><a id="a5dd38bf0af7418fc8568b5c1703d4b5b" name="a5dd38bf0af7418fc8568b5c1703d4b5b"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HEADER_FUNC</b>(RETURN, FUNCNAME, ...)   extern RETURN FUNCNAME(__VA_ARGS__)</td></tr>
<tr class="separator:a5dd38bf0af7418fc8568b5c1703d4b5b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a53a4881352a60e1c47d8c77d234d2d02"><td class="memItemLeft" align="right" valign="top"><a id="a53a4881352a60e1c47d8c77d234d2d02" name="a53a4881352a60e1c47d8c77d234d2d02"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HPP_PRECONDITION</b>(EXPR)   assert(EXPR)</td></tr>
<tr class="separator:a53a4881352a60e1c47d8c77d234d2d02"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0ef84d007a1c19782e2a835d3376b828"><td class="memItemLeft" align="right" valign="top"><a id="a0ef84d007a1c19782e2a835d3376b828" name="a0ef84d007a1c19782e2a835d3376b828"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HPP_POSTCONDITION</b>(EXPR)   assert(EXPR)</td></tr>
<tr class="separator:a0ef84d007a1c19782e2a835d3376b828"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a89cb82ec67a8ed2cd1f1f89ca8ac3eab"><td class="memItemLeft" align="right" valign="top"><a id="a89cb82ec67a8ed2cd1f1f89ca8ac3eab" name="a89cb82ec67a8ed2cd1f1f89ca8ac3eab"></a>
#define </td><td class="memItemRight" valign="bottom"><b>RPC_HPP_INLINE</b></td></tr>
<tr class="separator:a89cb82ec67a8ed2cd1f1f89ca8ac3eab"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a03dd5c61908b7860d6f56a806133668e"><td class="memItemLeft" align="right" valign="top"><a id="a03dd5c61908b7860d6f56a806133668e" name="a03dd5c61908b7860d6f56a806133668e"></a>
#define </td><td class="memItemRight" valign="bottom"><b>call_header_func</b>(FUNCNAME, ...)   call_header_func_impl(FUNCNAME, # FUNCNAME, __VA_ARGS__)</td></tr>
<tr class="separator:a03dd5c61908b7860d6f56a806133668e"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a92d5711b1e5a7d8007ebff50acffb8b8"><td class="memItemLeft" align="right" valign="top"><a id="a92d5711b1e5a7d8007ebff50acffb8b8" name="a92d5711b1e5a7d8007ebff50acffb8b8"></a>enum class  </td><td class="memItemRight" valign="bottom"><b>exception_type</b> { <br />
  <b>none</b>
, <b>func_not_found</b>
, <b>remote_exec</b>
, <b>serialization</b>
, <br />
  <b>deserialization</b>
, <b>signature_mismatch</b>
, <b>client_send</b>
, <b>client_receive</b>
, <br />
  <b>server_send</b>
, <b>server_receive</b>
<br />
}</td></tr>
<tr class="separator:a92d5711b1e5a7d8007ebff50acffb8b8"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Header-only library for serialized RPC usage. </p>
<dl class="section author"><dt>Author</dt><dd>Jackson Harmer (<a href="#" onclick="location.href='mai'+'lto:'+'jha'+'rm'+'er9'+'5@'+'gma'+'il'+'.co'+'m'; return false;">jharm<span class="obfuscator">.nosp@m.</span>er95<span class="obfuscator">.nosp@m.</span>@gmai<span class="obfuscator">.nosp@m.</span>l.co<span class="obfuscator">.nosp@m.</span>m</a>) </dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.8.1</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>BSD 3-Clause License</dd></dl>
<p>Copyright (c) 2020-2022, Jackson Harmer All rights reserved.</p>
<p >Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
<ol type="1">
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
<li>Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ol>
<p >THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>