Insane_DNS/libraries/asio-1.28.1/doc/asio/reference/any_completion_handler.html

265 lines
10 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>any_completion_handler</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Asio">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="any_completion_executor/_any_completion_executor.html" title="any_completion_executor::~any_completion_executor">
<link rel="next" href="any_completion_handler/any_completion_handler.html" title="any_completion_handler::any_completion_handler">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="any_completion_executor/_any_completion_executor.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="any_completion_handler/any_completion_handler.html"><img src="../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="asio.reference.any_completion_handler"></a><a class="link" href="any_completion_handler.html" title="any_completion_handler">any_completion_handler</a>
</h3></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.any_completion_handler"></a>
</p>
<p>
Polymorphic wrapper for completion handlers.
</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
<span class="keyword">typename</span><span class="special">...</span> <span class="identifier">Signatures</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">any_completion_handler</span>
</pre>
<h5>
<a name="asio.reference.any_completion_handler.h0"></a>
<span><a name="asio.reference.any_completion_handler.member_functions"></a></span><a class="link" href="any_completion_handler.html#asio.reference.any_completion_handler.member_functions">Member Functions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/any_completion_handler.html" title="any_completion_handler::any_completion_handler"><span class="bold"><strong>any_completion_handler</strong></span></a> <span class="silver">[constructor]</span>
</p>
</td>
<td>
<p>
Construct an any_completion_handler in an empty state, without
a target object. <br> <span class="silver"></span><br> Construct an any_completion_handler
to contain the specified target. <br> <span class="silver"></span><br> Move-construct an
any_completion_handler from another.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/get_allocator.html" title="any_completion_handler::get_allocator"><span class="bold"><strong>get_allocator</strong></span></a>
</p>
</td>
<td>
<p>
Get the associated allocator.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/get_cancellation_slot.html" title="any_completion_handler::get_cancellation_slot"><span class="bold"><strong>get_cancellation_slot</strong></span></a>
</p>
</td>
<td>
<p>
Get the associated cancellation slot.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/operator_bool.html" title="any_completion_handler::operator bool"><span class="bold"><strong>operator bool</strong></span></a>
</p>
</td>
<td>
<p>
Test if the polymorphic wrapper is empty.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/operator_not_.html" title="any_completion_handler::operator!"><span class="bold"><strong>operator!</strong></span></a>
</p>
</td>
<td>
<p>
Test if the polymorphic wrapper is non-empty.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/operator_lp__rp_.html" title="any_completion_handler::operator()"><span class="bold"><strong>operator()</strong></span></a>
</p>
</td>
<td>
<p>
Function call operator.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/operator_eq_.html" title="any_completion_handler::operator="><span class="bold"><strong>operator=</strong></span></a>
</p>
</td>
<td>
<p>
Move-assign an any_completion_handler from another. <br> <span class="silver"></span><br>
Assignment operator that sets the polymorphic wrapper to the empty
state.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/swap.html" title="any_completion_handler::swap"><span class="bold"><strong>swap</strong></span></a>
</p>
</td>
<td>
<p>
Swap the content of an any_completion_handler with another.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/_any_completion_handler.html" title="any_completion_handler::~any_completion_handler"><span class="bold"><strong>~any_completion_handler</strong></span></a> <span class="silver">[destructor]</span>
</p>
</td>
<td>
<p>
Destructor.
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="asio.reference.any_completion_handler.h1"></a>
<span><a name="asio.reference.any_completion_handler.friends"></a></span><a class="link" href="any_completion_handler.html#asio.reference.any_completion_handler.friends">Friends</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/operator_not__eq_.html" title="any_completion_handler::operator!="><span class="bold"><strong>operator!=</strong></span></a>
</p>
</td>
<td>
<p>
Inequality operator.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="any_completion_handler/operator_eq__eq_.html" title="any_completion_handler::operator=="><span class="bold"><strong>operator==</strong></span></a>
</p>
</td>
<td>
<p>
Equality operator.
</p>
</td>
</tr>
</tbody>
</table></div>
<p>
The <code class="computeroutput"><span class="identifier">any_completion_handler</span></code>
class template is a polymorphic wrapper for completion handlers that propagates
the associated executor, associated allocator, and associated cancellation
slot through a type-erasing interface.
</p>
<p>
When using <code class="computeroutput"><span class="identifier">any_completion_handler</span></code>,
specify one or more completion signatures as template parameters. These will
dictate the arguments that may be passed to the handler through the polymorphic
interface.
</p>
<p>
Typical uses for <code class="computeroutput"><span class="identifier">any_completion_handler</span></code>
include:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Separate compilation of asynchronous operation implementations.
</li>
<li class="listitem">
Enabling interoperability between asynchronous operations and virtual
functions.
</li>
</ul></div>
<h5>
<a name="asio.reference.any_completion_handler.h2"></a>
<span><a name="asio.reference.any_completion_handler.requirements"></a></span><a class="link" href="any_completion_handler.html#asio.reference.any_completion_handler.requirements">Requirements</a>
</h5>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">asio/any_completion_handler.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">asio.hpp</code>
</p>
</div>
<div class="copyright-footer">Copyright © 2003-2023 Christopher M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="any_completion_executor/_any_completion_executor.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="any_completion_handler/any_completion_handler.html"><img src="../../next.png" alt="Next"></a>
</div>
</body>
</html>