-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassSDL2pp_1_1CustomRWops.html
360 lines (336 loc) · 18.3 KB
/
classSDL2pp_1_1CustomRWops.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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
<!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" lang="en-US">
<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.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libSDL2pp: SDL2pp::CustomRWops Class 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">libSDL2pp
</div>
<div id="projectbrief">C++ bindings/wrapper for SDL2</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>SDL2pp</b></li><li class="navelem"><a class="el" href="classSDL2pp_1_1CustomRWops.html">CustomRWops</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="classSDL2pp_1_1CustomRWops-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">SDL2pp::CustomRWops Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__io.html">I/O abstraction</a></div></div></div>
</div><!--header-->
<div class="contents">
<p>Base class for custom <a class="el" href="classSDL2pp_1_1RWops.html" title="I/O abstraction.">RWops</a>.
<a href="classSDL2pp_1_1CustomRWops.html#details">More...</a></p>
<p><code>#include <<a class="el" href="RWops_8hh_source.html">SDL2pp/RWops.hh</a>></code></p>
<div class="dynheader">
Inheritance diagram for SDL2pp::CustomRWops:</div>
<div class="dyncontent">
<div class="center"><img src="classSDL2pp_1_1CustomRWops__inherit__graph.png" border="0" usemap="#aSDL2pp_1_1CustomRWops_inherit__map" alt="Inheritance graph"/></div>
<map name="aSDL2pp_1_1CustomRWops_inherit__map" id="aSDL2pp_1_1CustomRWops_inherit__map">
<area shape="rect" title="Base class for custom RWops." alt="" coords="151,5,325,31"/>
<area shape="rect" href="classSDL2pp_1_1ContainerRWops.html" title="RWops adaptor for random access STL containers." alt="" coords="5,79,231,104"/>
<area shape="poly" title=" " alt="" coords="208,40,139,81,136,76,205,35"/>
<area shape="rect" href="classSDL2pp_1_1StreamRWops.html" title="RWops adaptor for STL streams." alt="" coords="255,79,463,104"/>
<area shape="poly" title=" " alt="" coords="271,35,341,76,338,81,268,40"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1b94c134834623f06b459093a1a9fb78" id="r_a1b94c134834623f06b459093a1a9fb78"><td class="memItemLeft" align="right" valign="top"><a id="a1b94c134834623f06b459093a1a9fb78" name="a1b94c134834623f06b459093a1a9fb78"></a>
virtual </td><td class="memItemRight" valign="bottom"><b>~CustomRWops</b> ()</td></tr>
<tr class="memdesc:a1b94c134834623f06b459093a1a9fb78"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a1b94c134834623f06b459093a1a9fb78"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7c7f4bcb62e28019fdb4c14b607d5b6c" id="r_a7c7f4bcb62e28019fdb4c14b607d5b6c"><td class="memItemLeft" align="right" valign="top">virtual Sint64 </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDL2pp_1_1CustomRWops.html#a7c7f4bcb62e28019fdb4c14b607d5b6c">Size</a> ()=0</td></tr>
<tr class="memdesc:a7c7f4bcb62e28019fdb4c14b607d5b6c"><td class="mdescLeft"> </td><td class="mdescRight">Get the size of the data stream. <br /></td></tr>
<tr class="separator:a7c7f4bcb62e28019fdb4c14b607d5b6c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a24bef64049660593348ee92b10466e83" id="r_a24bef64049660593348ee92b10466e83"><td class="memItemLeft" align="right" valign="top">virtual Sint64 </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDL2pp_1_1CustomRWops.html#a24bef64049660593348ee92b10466e83">Seek</a> (Sint64 offset, int whence)=0</td></tr>
<tr class="memdesc:a24bef64049660593348ee92b10466e83"><td class="mdescLeft"> </td><td class="mdescRight">Seek within the data stream. <br /></td></tr>
<tr class="separator:a24bef64049660593348ee92b10466e83"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3fd3b6cc29c0ecb15de01569a18e70f1" id="r_a3fd3b6cc29c0ecb15de01569a18e70f1"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDL2pp_1_1CustomRWops.html#a3fd3b6cc29c0ecb15de01569a18e70f1">Read</a> (void *ptr, size_t size, size_t maxnum)=0</td></tr>
<tr class="memdesc:a3fd3b6cc29c0ecb15de01569a18e70f1"><td class="mdescLeft"> </td><td class="mdescRight">Read from a data stream. <br /></td></tr>
<tr class="separator:a3fd3b6cc29c0ecb15de01569a18e70f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a60f46247e54f8ea1843b9410b9cb8847" id="r_a60f46247e54f8ea1843b9410b9cb8847"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDL2pp_1_1CustomRWops.html#a60f46247e54f8ea1843b9410b9cb8847">Write</a> (const void *ptr, size_t size, size_t num)=0</td></tr>
<tr class="memdesc:a60f46247e54f8ea1843b9410b9cb8847"><td class="mdescLeft"> </td><td class="mdescRight">Write to a data stream. <br /></td></tr>
<tr class="separator:a60f46247e54f8ea1843b9410b9cb8847"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a059b1b89f564dad4d7c049a0bea238cf" id="r_a059b1b89f564dad4d7c049a0bea238cf"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDL2pp_1_1CustomRWops.html#a059b1b89f564dad4d7c049a0bea238cf">Close</a> ()=0</td></tr>
<tr class="memdesc:a059b1b89f564dad4d7c049a0bea238cf"><td class="mdescLeft"> </td><td class="mdescRight">Close data source. <br /></td></tr>
<tr class="separator:a059b1b89f564dad4d7c049a0bea238cf"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for custom <a class="el" href="classSDL2pp_1_1RWops.html" title="I/O abstraction.">RWops</a>. </p>
<p>Derive from this class and override 4 virtual methods used to Seek, Read, Write and Close the data stream. The derived class is expected to be moved-into <a class="el" href="classSDL2pp_1_1RWops.html" title="I/O abstraction.">RWops</a> via RWops(C&& custom_rwops).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classSDL2pp_1_1ContainerRWops.html" title="RWops adaptor for random access STL containers.">SDL2pp::ContainerRWops</a>, <a class="el" href="classSDL2pp_1_1StreamRWops.html" title="RWops adaptor for STL streams.">SDL2pp::StreamRWops</a> </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a059b1b89f564dad4d7c049a0bea238cf" name="a059b1b89f564dad4d7c049a0bea238cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a059b1b89f564dad4d7c049a0bea238cf">◆ </a></span>Close()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int SDL2pp::CustomRWops::Close </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Close data source. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on success or a negative error code on failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="http://wiki.libsdl.org/SDL_RWclose">http://wiki.libsdl.org/SDL_RWclose</a> </dd></dl>
<p>Implemented in <a class="el" href="classSDL2pp_1_1ContainerRWops.html#a3c679385fdbab1fc12cc44730f054cf5">SDL2pp::ContainerRWops< C ></a>, and <a class="el" href="classSDL2pp_1_1StreamRWops.html#a392e5fa933469a82789164865fd45d0f">SDL2pp::StreamRWops< S ></a>.</p>
</div>
</div>
<a id="a3fd3b6cc29c0ecb15de01569a18e70f1" name="a3fd3b6cc29c0ecb15de01569a18e70f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fd3b6cc29c0ecb15de01569a18e70f1">◆ </a></span>Read()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual size_t SDL2pp::CustomRWops::Read </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>maxnum</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Read from a data stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>Pointer to a buffer to read data into </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of each object to read, in bytes </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">maxnum</td><td>Maximum number of objects to be read</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of objects read, or 0 at error or end of file</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="http://wiki.libsdl.org/SDL_RWread">http://wiki.libsdl.org/SDL_RWread</a> </dd></dl>
<p>Implemented in <a class="el" href="classSDL2pp_1_1ContainerRWops.html#a3526d08c531971c5ea8aac2abd7a4987">SDL2pp::ContainerRWops< C ></a>, and <a class="el" href="classSDL2pp_1_1StreamRWops.html#a60d6e9eb4ee3ed6484ba44a2e49f6608">SDL2pp::StreamRWops< S ></a>.</p>
</div>
</div>
<a id="a24bef64049660593348ee92b10466e83" name="a24bef64049660593348ee92b10466e83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24bef64049660593348ee92b10466e83">◆ </a></span>Seek()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual Sint64 SDL2pp::CustomRWops::Seek </td>
<td>(</td>
<td class="paramtype">Sint64 </td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>whence</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Seek within the data stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>Offset in bytes, relative to whence location; can be negative </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">whence</td><td>Any of RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Final offset in the data stream after the seek or -1 on error</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="http://wiki.libsdl.org/SDL_RWseek">http://wiki.libsdl.org/SDL_RWseek</a> </dd></dl>
<p>Implemented in <a class="el" href="classSDL2pp_1_1ContainerRWops.html#aa5d9771583e2a4b7d16174ff3ee4858d">SDL2pp::ContainerRWops< C ></a>, and <a class="el" href="classSDL2pp_1_1StreamRWops.html#a7d257204670a124f5a77f2726c6363ea">SDL2pp::StreamRWops< S ></a>.</p>
</div>
</div>
<a id="a7c7f4bcb62e28019fdb4c14b607d5b6c" name="a7c7f4bcb62e28019fdb4c14b607d5b6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c7f4bcb62e28019fdb4c14b607d5b6c">◆ </a></span>Size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual Sint64 SDL2pp::CustomRWops::Size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the size of the data stream. </p>
<dl class="section return"><dt>Returns</dt><dd>Size of the data stream on success, -1 if unknown</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="http://wiki.libsdl.org/SDL_RWsize">http://wiki.libsdl.org/SDL_RWsize</a> </dd></dl>
<p>Implemented in <a class="el" href="classSDL2pp_1_1ContainerRWops.html#a0faa5bb145df9634951f5e16e68b1c3d">SDL2pp::ContainerRWops< C ></a>, and <a class="el" href="classSDL2pp_1_1StreamRWops.html#a0b0ad832e6c49c21e8b0de4c595450e2">SDL2pp::StreamRWops< S ></a>.</p>
</div>
</div>
<a id="a60f46247e54f8ea1843b9410b9cb8847" name="a60f46247e54f8ea1843b9410b9cb8847"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60f46247e54f8ea1843b9410b9cb8847">◆ </a></span>Write()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual size_t SDL2pp::CustomRWops::Write </td>
<td>(</td>
<td class="paramtype">const void * </td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>num</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Write to a data stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>Pointer to a buffer containing data to write </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of each object to write, in bytes </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>Maximum number of objects to be write</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of objects written, which will be less than num on error</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="http://wiki.libsdl.org/SDL_RWwrite">http://wiki.libsdl.org/SDL_RWwrite</a> </dd></dl>
<p>Implemented in <a class="el" href="classSDL2pp_1_1ContainerRWops.html#aff805227c38fa0329131b797f09f3bc3">SDL2pp::ContainerRWops< C ></a>, and <a class="el" href="classSDL2pp_1_1StreamRWops.html#a7758763a8ce9c9b9547fdb983e8b75ba">SDL2pp::StreamRWops< S ></a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>SDL2pp/<a class="el" href="RWops_8hh_source.html">RWops.hh</a></li>
</ul>
</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.8
</small></address>
</body>
</html>