1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>I/O object service requirements</title> 5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../reference.html" title="Reference"> 9<link rel="prev" href="IoControlCommand.html" title="I/O control command requirements"> 10<link rel="next" href="IteratorConnectHandler.html" title="Iterator connect handler requirements"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 15<td align="center"><a href="../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="IoControlCommand.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="IteratorConnectHandler.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_asio.reference.IoObjectService"></a><a class="link" href="IoObjectService.html" title="I/O object service requirements">I/O object service 28 requirements</a> 29</h3></div></div></div> 30<p> 31 An I/O object service must meet the requirements for a <a class="link" href="Service.html" title="Service requirements">service</a>, 32 as well as the requirements listed below. 33 </p> 34<p> 35 In the table below, <code class="computeroutput">X</code> denotes an I/O object service class, 36 <code class="computeroutput">a</code> and <code class="computeroutput">ao</code> denote values of type <code class="computeroutput">X</code>, 37 <code class="computeroutput">b</code> and <code class="computeroutput">c</code> denote values of type <code class="computeroutput">X::implementation_type</code>, 38 and <code class="computeroutput">u</code> denotes an identifier. 39 </p> 40<div class="table"> 41<a name="boost_asio.reference.IoObjectService.t0"></a><p class="title"><b>Table 21. IoObjectService requirements</b></p> 42<div class="table-contents"><table class="table" summary="IoObjectService requirements"> 43<colgroup> 44<col> 45<col> 46<col> 47</colgroup> 48<thead><tr> 49<th> 50 <p> 51 expression 52 </p> 53 </th> 54<th> 55 <p> 56 return type 57 </p> 58 </th> 59<th> 60 <p> 61 assertion/note<br> pre/post-condition 62 </p> 63 </th> 64</tr></thead> 65<tbody> 66<tr> 67<td> 68 <p> 69 <code class="computeroutput">X::implementation_type</code> 70 </p> 71 </td> 72<td> 73 </td> 74<td> 75 </td> 76</tr> 77<tr> 78<td> 79 <p> 80 <code class="computeroutput">X::implementation_type u;</code> 81 </p> 82 </td> 83<td> 84 </td> 85<td> 86 <p> 87 note: <code class="computeroutput">X::implementation_type</code> has a public default 88 constructor and destructor. 89 </p> 90 </td> 91</tr> 92<tr> 93<td> 94 <p> 95</p> 96<pre class="programlisting">a.construct(b); 97</pre> 98<p> 99 </p> 100 </td> 101<td> 102 </td> 103<td> 104 </td> 105</tr> 106<tr> 107<td> 108 <p> 109</p> 110<pre class="programlisting">a.destroy(b); 111</pre> 112<p> 113 </p> 114 </td> 115<td> 116 </td> 117<td> 118 <p> 119 note: <code class="computeroutput">destroy()</code> will only be called on a value that 120 has previously been initialised with <code class="computeroutput">construct()</code> or 121 <code class="computeroutput">move_construct()</code>. 122 </p> 123 </td> 124</tr> 125<tr> 126<td> 127 <p> 128</p> 129<pre class="programlisting">a.move_construct(b, c); 130</pre> 131<p> 132 </p> 133 </td> 134<td> 135 </td> 136<td> 137 <p> 138 note: only required for I/O objects that support movability. 139 </p> 140 </td> 141</tr> 142<tr> 143<td> 144 <p> 145</p> 146<pre class="programlisting">a.move_assign(b, ao, c); 147</pre> 148<p> 149 </p> 150 </td> 151<td> 152 </td> 153<td> 154 <p> 155 note: only required for I/O objects that support movability. 156 </p> 157 </td> 158</tr> 159</tbody> 160</table></div> 161</div> 162<br class="table-break"> 163</div> 164<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 165<td align="left"></td> 166<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 167 Kohlhoff<p> 168 Distributed under the Boost Software License, Version 1.0. (See accompanying 169 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 170 </p> 171</div></td> 172</tr></table> 173<hr> 174<div class="spirit-nav"> 175<a accesskey="p" href="IoControlCommand.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="IteratorConnectHandler.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 176</div> 177</body> 178</html> 179