blob: bed6f4b4d3487385e53900f36a9175b5168d2be7 [file] [log] [blame]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template static_type_dispatcher</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Log v2">
<link rel="up" href="../../utilities.html#header.boost.log.utility.type_dispatch.static_type_dispatcher_hpp" title="Header &lt;boost/log/utility/type_dispatch/static_type_dispatcher.hpp&gt;">
<link rel="prev" href="default_attribute_types.html" title="Type definition default_attribute_types">
<link rel="next" href="type_dispatcher.html" title="Class type_dispatcher">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="default_attribute_types.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.type_dispatch.static_type_dispatcher_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="type_dispatcher.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.static_type_dispatcher"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template static_type_dispatcher</span></h2>
<p>boost::log::static_type_dispatcher &#8212; A static type dispatcher class. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../utilities.html#header.boost.log.utility.type_dispatch.static_type_dispatcher_hpp" title="Header &lt;boost/log/utility/type_dispatch/static_type_dispatcher.hpp&gt;">boost/log/utility/type_dispatch/static_type_dispatcher.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">static_type_dispatcher</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// <a class="link" href="static_type_dispatcher.html#boost.log.static_type_dispatcherconstruct-copy-destruct">construct/copy/destruct</a></span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ReceiverT<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="static_type_dispatcher.html#idp46996784-bb"><span class="identifier">static_type_dispatcher</span></a><span class="special">(</span><span class="identifier">ReceiverT</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="static_type_dispatcher.html#idp47001088-bb"><span class="identifier">static_type_dispatcher</span></a><span class="special">(</span><a class="link" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">static_type_dispatcher</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
<a class="link" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">static_type_dispatcher</a> <span class="special">&amp;</span> <a class="link" href="static_type_dispatcher.html#idp47002624-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">static_type_dispatcher</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp136514304"></a><h2>Description</h2>
<p>The type dispatcher can be used to pass objects of arbitrary types from one component to another. With regard to the library, the type dispatcher can be used to extract attribute values.</p>
<p>Static type dispatchers allow to specify one or several supported types at compile time. </p>
<div class="refsect2">
<a name="idp136515552"></a><h3>
<a name="boost.log.static_type_dispatcherconstruct-copy-destruct"></a><code class="computeroutput">static_type_dispatcher</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ReceiverT<span class="special">&gt;</span>
<span class="keyword">explicit</span> <a name="idp46996784-bb"></a><span class="identifier">static_type_dispatcher</span><span class="special">(</span><span class="identifier">ReceiverT</span> <span class="special">&amp;</span> receiver<span class="special">)</span><span class="special">;</span></pre>
<p>Constructor. Initializes the dispatcher internals.</p>
<p>The <span class="emphasis"><em>receiver</em></span> object is not copied inside the dispatcher, but references to it may be kept by the dispatcher after construction. The receiver object must remain valid until the dispatcher is destroyed.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">receiver</code></span></p></td>
<td><p>Unary function object that will be called on a dispatched value. The receiver must be callable with an argument of any of the supported types of the dispatcher. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem"><pre class="literallayout"><a name="idp47001088-bb"></a><span class="identifier">static_type_dispatcher</span><span class="special">(</span><a class="link" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">static_type_dispatcher</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a class="link" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">static_type_dispatcher</a> <span class="special">&amp;</span> <a name="idp47002624-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">static_type_dispatcher</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2007-2015 Andrey
Semashev<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></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="default_attribute_types.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.type_dispatch.static_type_dispatcher_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="type_dispatcher.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>