Welcome to mirror list, hosted at ThFree Co, Russian Federation.

classllfio__v2__xxx_1_1mapped.html - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5aa6b84d63ac1f4a8e0ff4c9b20cfcac8161263b (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
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LLFIO: llfio_v2_xxx::mapped&lt; T &gt; Class Template 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</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 style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LLFIO
   &#160;<span id="projectnumber">v2.00 late alpha</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classllfio__v2__xxx_1_1mapped.html','');});
</script>
<div id="doc-content">
<!-- 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 class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classllfio__v2__xxx_1_1mapped-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">llfio_v2_xxx::mapped&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides an owning, typed view of memory mapped from a <code>section_handle</code> or a <code>file_handle</code> suitable for feeding to STL algorithms or the Ranges TS.  
 <a href="classllfio__v2__xxx_1_1mapped.html#details">More...</a></p>

<p><code>#include &quot;mapped.hpp&quot;</code></p>
<div class="dynheader">
Inheritance diagram for llfio_v2_xxx::mapped&lt; T &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classllfio__v2__xxx_1_1mapped.png" usemap="#llfio_5Fv2_5Fxxx::mapped_3C_20T_20_3E_map" alt=""/>
  <map id="llfio_5Fv2_5Fxxx::mapped_3C_20T_20_3E_map" name="llfio_5Fv2_5Fxxx::mapped_3C_20T_20_3E_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:acfd0ab21349fb0eb56172b81d6a7fa83"><td class="memItemLeft" align="right" valign="top"><a id="acfd0ab21349fb0eb56172b81d6a7fa83"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#acfd0ab21349fb0eb56172b81d6a7fa83">extent_type</a> = typename section_handle::extent_type</td></tr>
<tr class="memdesc:acfd0ab21349fb0eb56172b81d6a7fa83"><td class="mdescLeft">&#160;</td><td class="mdescRight">The extent type. <br /></td></tr>
<tr class="separator:acfd0ab21349fb0eb56172b81d6a7fa83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25d56aca213617d530ab3c9cb6f43df5"><td class="memItemLeft" align="right" valign="top"><a id="a25d56aca213617d530ab3c9cb6f43df5"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a> = typename section_handle::size_type</td></tr>
<tr class="memdesc:a25d56aca213617d530ab3c9cb6f43df5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size type. <br /></td></tr>
<tr class="separator:a25d56aca213617d530ab3c9cb6f43df5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9a6b8b22c06bf6e9362496cdcc3ac40d"><td class="memItemLeft" align="right" valign="top"><a id="a9a6b8b22c06bf6e9362496cdcc3ac40d"></a>
constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">mapped</a> ()</td></tr>
<tr class="memdesc:a9a6b8b22c06bf6e9362496cdcc3ac40d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:a9a6b8b22c06bf6e9362496cdcc3ac40d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb843c564a96365ee7eacb529b028a70"><td class="memItemLeft" align="right" valign="top"><a id="acb843c564a96365ee7eacb529b028a70"></a>
const <a class="el" href="classllfio__v2__xxx_1_1section__handle.html">section_handle</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#acb843c564a96365ee7eacb529b028a70">section</a> () const noexcept</td></tr>
<tr class="memdesc:acb843c564a96365ee7eacb529b028a70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the internal section handle. <br /></td></tr>
<tr class="separator:acb843c564a96365ee7eacb529b028a70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a242f94515ea03ad443afe5ecefa297a0"><td class="memItemLeft" align="right" valign="top"><a id="a242f94515ea03ad443afe5ecefa297a0"></a>
const <a class="el" href="classllfio__v2__xxx_1_1map__handle.html">map_handle</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a242f94515ea03ad443afe5ecefa297a0">map</a> () const noexcept</td></tr>
<tr class="memdesc:a242f94515ea03ad443afe5ecefa297a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the internal map handle. <br /></td></tr>
<tr class="separator:a242f94515ea03ad443afe5ecefa297a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb5d860d3f7fc1d4bad147f0a121d144"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#afb5d860d3f7fc1d4bad147f0a121d144">mapped</a> (<a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a> <a class="el" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a>, bool zeroed=false, section_handle::flag _flag=section_handle::flag::readwrite)</td></tr>
<tr class="separator:afb5d860d3f7fc1d4bad147f0a121d144"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6396b66fe61498bf18eaed6df6f7a2b9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a6396b66fe61498bf18eaed6df6f7a2b9">mapped</a> (<a class="el" href="classllfio__v2__xxx_1_1section__handle.html">section_handle</a> &amp;sh, <a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a> <a class="el" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a>=(<a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>) -1, <a class="el" href="classllfio__v2__xxx_1_1mapped.html#acfd0ab21349fb0eb56172b81d6a7fa83">extent_type</a> byteoffset=0, section_handle::flag _flag=section_handle::flag::readwrite)</td></tr>
<tr class="separator:a6396b66fe61498bf18eaed6df6f7a2b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c0b040a5d05978636dd20289fe5d16a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a0c0b040a5d05978636dd20289fe5d16a">mapped</a> (<a class="el" href="classllfio__v2__xxx_1_1file__handle.html">file_handle</a> &amp;backing, <a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a> <a class="el" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a>=(<a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>) -1, <a class="el" href="classllfio__v2__xxx_1_1mapped.html#acfd0ab21349fb0eb56172b81d6a7fa83">extent_type</a> maximum_size=0, <a class="el" href="classllfio__v2__xxx_1_1mapped.html#acfd0ab21349fb0eb56172b81d6a7fa83">extent_type</a> byteoffset=0, section_handle::flag _flag=section_handle::flag::readwrite)</td></tr>
<tr class="separator:a0c0b040a5d05978636dd20289fe5d16a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br />
class llfio_v2_xxx::mapped&lt; T &gt;</h3>

<p>Provides an owning, typed view of memory mapped from a <code>section_handle</code> or a <code>file_handle</code> suitable for feeding to STL algorithms or the Ranges TS. </p>
<p>This opens a new <code>map_handle</code> (and if necessary a <code>section_handle</code>) onto the requested offset and length of the supplied source, and thus is an <em>owning</em> view of mapped memory. It can be moved, but not copied. If you wish to pass around a non-owning view, see <code>map_view&lt;T&gt;</code>.</p>
<p>Optionally can issue a blocking write barrier on destruction of the mapped view by setting the flag <code>section_handle::flag::barrier_on_close</code>, thus forcing any changes to data referred to by this to storage before the destructor returns. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="afb5d860d3f7fc1d4bad147f0a121d144"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb5d860d3f7fc1d4bad147f0a121d144">&#9670;&nbsp;</a></span>mapped() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classllfio__v2__xxx_1_1mapped.html">llfio_v2_xxx::mapped</a>&lt; T &gt;::<a class="el" href="classllfio__v2__xxx_1_1mapped.html">mapped</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>zeroed</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">section_handle::flag&#160;</td>
          <td class="paramname"><em>_flag</em> = <code>section_handle::flag::readwrite</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a view of newly allocated unused memory, creating new memory if insufficient unused memory is available. Note that the memory mapped by this call may contain non-zero bits (recycled memory) unless <code>zeroed</code> is true.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">length</td><td>The number of items to map. </td></tr>
    <tr><td class="paramname">zeroed</td><td>Whether to ensure that the viewed memory returned is all bits zero or not. </td></tr>
    <tr><td class="paramname">_flag</td><td>The flags to pass to <code>map_handle::map()</code>. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      : _maph(<a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(<a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a> * <span class="keyword">sizeof</span>(T), zeroed, _flag).value())</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  {</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    byte *addr = _maph.<a class="code" href="classllfio__v2__xxx_1_1map__handle.html#a7456b95e191ec373af61af6541dd4737">address</a>();</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keyword">static_cast&lt;</span>span&lt;T&gt; &amp;<span class="keyword">&gt;</span>(*this) = span&lt;T&gt;(<span class="keyword">reinterpret_cast&lt;</span>T *<span class="keyword">&gt;</span>(addr), <a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a>);  <span class="comment">// NOLINT</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  }</div><div class="ttc" id="namespacellfio__v2__xxx_html_aa3676f0dd69f4b54cf7e14e3f86d32b9"><div class="ttname"><a href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">llfio_v2_xxx::length</a></div><div class="ttdeci">result&lt; section_handle::extent_type &gt; length(const section_handle &amp;self) noexcept</div><div class="ttdoc">Return the current maximum permitted extent of the memory section. </div><div class="ttdef"><b>Definition:</b> map_handle.hpp:675</div></div>
<div class="ttc" id="classllfio__v2__xxx_1_1map__handle_html_a7456b95e191ec373af61af6541dd4737"><div class="ttname"><a href="classllfio__v2__xxx_1_1map__handle.html#a7456b95e191ec373af61af6541dd4737">llfio_v2_xxx::map_handle::address</a></div><div class="ttdeci">byte * address() const noexcept</div><div class="ttdoc">The address in memory where this mapped view resides. </div><div class="ttdef"><b>Definition:</b> map_handle.hpp:487</div></div>
<div class="ttc" id="classllfio__v2__xxx_1_1map__handle_html_adf0cad925c9d6accd5bd7fc3aa49884c"><div class="ttname"><a href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">llfio_v2_xxx::map_handle::map</a></div><div class="ttdeci">static result&lt; map_handle &gt; map(size_type bytes, bool zeroed=false, section_handle::flag _flag=section_handle::flag::readwrite) noexcept</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a6396b66fe61498bf18eaed6df6f7a2b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6396b66fe61498bf18eaed6df6f7a2b9">&#9670;&nbsp;</a></span>mapped() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classllfio__v2__xxx_1_1mapped.html">llfio_v2_xxx::mapped</a>&lt; T &gt;::<a class="el" href="classllfio__v2__xxx_1_1mapped.html">mapped</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1section__handle.html">section_handle</a> &amp;&#160;</td>
          <td class="paramname"><em>sh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>&#160;</td>
          <td class="paramname"><em>length</em> = <code>(<a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>)&#160;-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#acfd0ab21349fb0eb56172b81d6a7fa83">extent_type</a>&#160;</td>
          <td class="paramname"><em>byteoffset</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">section_handle::flag&#160;</td>
          <td class="paramname"><em>_flag</em> = <code>section_handle::flag::readwrite</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construct a mapped view of the given section handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sh</td><td>The section handle to use as the data source for creating the map. </td></tr>
    <tr><td class="paramname">length</td><td>The number of items to map, use -1 to mean the length of the section handle divided by <code>sizeof(T)</code>. </td></tr>
    <tr><td class="paramname">byteoffset</td><td>The byte offset into the section handle, this does not need to be a multiple of the page size. </td></tr>
    <tr><td class="paramname">_flag</td><td>The flags to pass to <code>map_handle::map()</code>. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  : <a class="code" href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">mapped</a>((<a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a> == 0) ? <a class="code" href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">mapped</a>() : <a class="code" href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">mapped</a>(<span class="keyword">nullptr</span>, 0,</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;#ifdef _WIN32</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                                             byteoffset &amp; ~65535,</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;#<span class="keywordflow">else</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                                             <a class="code" href="namespacellfio__v2__xxx_1_1utils.html#a5499feaf6b774e774a26e7decd11e3fa">utils::round_down_to_page_size</a>(byteoffset, <a class="code" href="namespacellfio__v2__xxx_1_1utils.html#a42fc69cae3dbbf66498545cbe358e2ba">utils::page_size</a>()),</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;#endif</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                                             byteoffset, &amp;sh, (<a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a> == (<a class="code" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>) -1) ? 0 : <a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a> * <span class="keyword">sizeof</span>(T), _flag))  <span class="comment">// NOLINT</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  }</div><div class="ttc" id="classllfio__v2__xxx_1_1mapped_html_a25d56aca213617d530ab3c9cb6f43df5"><div class="ttname"><a href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">llfio_v2_xxx::mapped::size_type</a></div><div class="ttdeci">typename section_handle::size_type size_type</div><div class="ttdoc">The size type. </div><div class="ttdef"><b>Definition:</b> mapped.hpp:52</div></div>
<div class="ttc" id="namespacellfio__v2__xxx_html_aa3676f0dd69f4b54cf7e14e3f86d32b9"><div class="ttname"><a href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">llfio_v2_xxx::length</a></div><div class="ttdeci">result&lt; section_handle::extent_type &gt; length(const section_handle &amp;self) noexcept</div><div class="ttdoc">Return the current maximum permitted extent of the memory section. </div><div class="ttdef"><b>Definition:</b> map_handle.hpp:675</div></div>
<div class="ttc" id="namespacellfio__v2__xxx_1_1utils_html_a5499feaf6b774e774a26e7decd11e3fa"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1utils.html#a5499feaf6b774e774a26e7decd11e3fa">llfio_v2_xxx::utils::round_down_to_page_size</a></div><div class="ttdeci">T round_down_to_page_size(T i, size_t pagesize) noexcept</div><div class="ttdoc">Round a value to its next lowest page size multiple. </div><div class="ttdef"><b>Definition:</b> utils.hpp:51</div></div>
<div class="ttc" id="namespacellfio__v2__xxx_1_1utils_html_a42fc69cae3dbbf66498545cbe358e2ba"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1utils.html#a42fc69cae3dbbf66498545cbe358e2ba">llfio_v2_xxx::utils::page_size</a></div><div class="ttdeci">size_t page_size() noexcept</div><div class="ttdoc">Returns the smallest page size of this architecture which is useful for calculating direct i/o multip...</div></div>
<div class="ttc" id="classllfio__v2__xxx_1_1mapped_html_a9a6b8b22c06bf6e9362496cdcc3ac40d"><div class="ttname"><a href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">llfio_v2_xxx::mapped::mapped</a></div><div class="ttdeci">constexpr mapped()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> mapped.hpp:77</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a0c0b040a5d05978636dd20289fe5d16a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c0b040a5d05978636dd20289fe5d16a">&#9670;&nbsp;</a></span>mapped() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classllfio__v2__xxx_1_1mapped.html">llfio_v2_xxx::mapped</a>&lt; T &gt;::<a class="el" href="classllfio__v2__xxx_1_1mapped.html">mapped</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1file__handle.html">file_handle</a> &amp;&#160;</td>
          <td class="paramname"><em>backing</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>&#160;</td>
          <td class="paramname"><em>length</em> = <code>(<a class="el" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>)&#160;-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#acfd0ab21349fb0eb56172b81d6a7fa83">extent_type</a>&#160;</td>
          <td class="paramname"><em>maximum_size</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1mapped.html#acfd0ab21349fb0eb56172b81d6a7fa83">extent_type</a>&#160;</td>
          <td class="paramname"><em>byteoffset</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">section_handle::flag&#160;</td>
          <td class="paramname"><em>_flag</em> = <code>section_handle::flag::readwrite</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construct a mapped view of the given file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">backing</td><td>The handle to use as backing storage. </td></tr>
    <tr><td class="paramname">length</td><td>The number of items to map, use -1 to mean the length of the section handle divided by <code>sizeof(T)</code>. </td></tr>
    <tr><td class="paramname">maximum_size</td><td>The initial size of this section <em>in bytes</em>, which cannot be larger than any backing file. Zero means to use <code>backing.maximum_extent()</code>. </td></tr>
    <tr><td class="paramname">byteoffset</td><td>The byte offset into the section handle, this does not need to be a multiple of the page size. </td></tr>
    <tr><td class="paramname">_flag</td><td>The flags to pass to <code>map_handle::map()</code>. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  : <a class="code" href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">mapped</a>((<a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a> == 0) ? <a class="code" href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">mapped</a>() : <a class="code" href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">mapped</a>(&amp;backing, maximum_size,</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;#ifdef _WIN32</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                                             byteoffset &amp; ~65535,</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;#<span class="keywordflow">else</span></div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                                             <a class="code" href="namespacellfio__v2__xxx_1_1utils.html#a5499feaf6b774e774a26e7decd11e3fa">utils::round_down_to_page_size</a>(byteoffset, <a class="code" href="namespacellfio__v2__xxx_1_1utils.html#a42fc69cae3dbbf66498545cbe358e2ba">utils::page_size</a>()),</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;#endif</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                                             byteoffset, <span class="keyword">nullptr</span>, (<a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a> == (<a class="code" href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">size_type</a>) -1) ? 0 : <a class="code" href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">length</a> * <span class="keyword">sizeof</span>(T), _flag))  <span class="comment">// NOLINT</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  {</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  }</div><div class="ttc" id="classllfio__v2__xxx_1_1mapped_html_a25d56aca213617d530ab3c9cb6f43df5"><div class="ttname"><a href="classllfio__v2__xxx_1_1mapped.html#a25d56aca213617d530ab3c9cb6f43df5">llfio_v2_xxx::mapped::size_type</a></div><div class="ttdeci">typename section_handle::size_type size_type</div><div class="ttdoc">The size type. </div><div class="ttdef"><b>Definition:</b> mapped.hpp:52</div></div>
<div class="ttc" id="namespacellfio__v2__xxx_html_aa3676f0dd69f4b54cf7e14e3f86d32b9"><div class="ttname"><a href="namespacellfio__v2__xxx.html#aa3676f0dd69f4b54cf7e14e3f86d32b9">llfio_v2_xxx::length</a></div><div class="ttdeci">result&lt; section_handle::extent_type &gt; length(const section_handle &amp;self) noexcept</div><div class="ttdoc">Return the current maximum permitted extent of the memory section. </div><div class="ttdef"><b>Definition:</b> map_handle.hpp:675</div></div>
<div class="ttc" id="namespacellfio__v2__xxx_1_1utils_html_a5499feaf6b774e774a26e7decd11e3fa"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1utils.html#a5499feaf6b774e774a26e7decd11e3fa">llfio_v2_xxx::utils::round_down_to_page_size</a></div><div class="ttdeci">T round_down_to_page_size(T i, size_t pagesize) noexcept</div><div class="ttdoc">Round a value to its next lowest page size multiple. </div><div class="ttdef"><b>Definition:</b> utils.hpp:51</div></div>
<div class="ttc" id="namespacellfio__v2__xxx_1_1utils_html_a42fc69cae3dbbf66498545cbe358e2ba"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1utils.html#a42fc69cae3dbbf66498545cbe358e2ba">llfio_v2_xxx::utils::page_size</a></div><div class="ttdeci">size_t page_size() noexcept</div><div class="ttdoc">Returns the smallest page size of this architecture which is useful for calculating direct i/o multip...</div></div>
<div class="ttc" id="classllfio__v2__xxx_1_1mapped_html_a9a6b8b22c06bf6e9362496cdcc3ac40d"><div class="ttname"><a href="classllfio__v2__xxx_1_1mapped.html#a9a6b8b22c06bf6e9362496cdcc3ac40d">llfio_v2_xxx::mapped::mapped</a></div><div class="ttdeci">constexpr mapped()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> mapped.hpp:77</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/llfio/v2.0/<a class="el" href="mapped_8hpp.html">mapped.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacellfio__v2__xxx.html">llfio_v2_xxx</a></li><li class="navelem"><a class="el" href="classllfio__v2__xxx_1_1mapped.html">mapped</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>