3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Class has_attribute<void></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="../../../index.html" title="Chapter 1. Boost.Log v2">
8 <link rel="up" href="../../../expressions.html#header.boost.log.expressions.predicates.has_attr_hpp" title="Header <boost/log/expressions/predicates/has_attr.hpp>">
9 <link rel="prev" href="has_attribute.html" title="Class template has_attribute">
10 <link rel="next" href="has_attr_idm45711347208272.html" title="Function template has_attr">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
15 <div class="spirit-nav">
16 <a accesskey="p" href="has_attribute.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../expressions.html#header.boost.log.expressions.predicates.has_attr_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="has_attr_idm45711347208272.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
18 <div class="refentry">
19 <a name="boost.log.expressions.has_attr_idm45711347224064"></a><div class="titlepage"></div>
20 <div class="refnamediv">
21 <h2><span class="refentrytitle">Class has_attribute<void></span></h2>
22 <p>boost::log::expressions::has_attribute<void></p>
24 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
25 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../../expressions.html#header.boost.log.expressions.predicates.has_attr_hpp" title="Header <boost/log/expressions/predicates/has_attr.hpp>">boost/log/expressions/predicates/has_attr.hpp</a>>
28 <span class="keyword">class</span> <a class="link" href="has_attr_idm45711347224064.html" title="Class has_attribute<void>">has_attribute</a><span class="special"><</span><span class="keyword">void</span><span class="special">></span> <span class="special">{</span>
29 <span class="keyword">public</span><span class="special">:</span>
30 <span class="comment">// types</span>
31 <span class="keyword">typedef</span> <span class="keyword">bool</span> <a name="boost.log.expressions.has_attr_idm45711347224064.result_type"></a><span class="identifier">result_type</span><span class="special">;</span> <span class="comment">// Function result_type. </span>
32 <span class="keyword">typedef</span> <span class="keyword">void</span> <a name="boost.log.expressions.has_attr_idm45711347224064.value_type"></a><span class="identifier">value_type</span><span class="special">;</span> <span class="comment">// Expected attribute value type. </span>
34 <span class="comment">// <a class="link" href="has_attr_idm45711347224064.html#boost.log.expressions.has_attr_idm45711347224064construct-copy-destruct">construct/copy/destruct</a></span>
35 <span class="keyword">explicit</span> <a class="link" href="has_attr_idm45711347224064.html#idm45711347210816-bb"><span class="identifier">has_attribute</span></a><span class="special">(</span><span class="identifier">attribute_name</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span>
37 <span class="comment">// <a class="link" href="has_attr_idm45711347224064.html#idm45711347220160-bb">public member functions</a></span>
38 <span class="identifier">result_type</span> <a class="link" href="has_attr_idm45711347224064.html#idm45711347219600-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">attribute_value_set</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
39 <span class="identifier">result_type</span> <a class="link" href="has_attr_idm45711347224064.html#idm45711347215280-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">log</span><span class="special">::</span><span class="identifier">record_view</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
40 <span class="special">}</span><span class="special">;</span></pre></div>
41 <div class="refsect1">
42 <a name="idm45554740658016"></a><h2>Description</h2>
43 <p>An attribute value presence checker. This specialization does not check the type of the attribute value. </p>
44 <div class="refsect2">
45 <a name="idm45554740657216"></a><h3>
46 <a name="boost.log.expressions.has_attr_idm45711347224064construct-copy-destruct"></a><code class="computeroutput">has_attribute</code>
48 construct/copy/destruct</h3>
49 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
50 <pre class="literallayout"><span class="keyword">explicit</span> <a name="idm45711347210816-bb"></a><span class="identifier">has_attribute</span><span class="special">(</span><span class="identifier">attribute_name</span> <span class="keyword">const</span> <span class="special">&</span> name<span class="special">)</span><span class="special">;</span></pre>
51 <p>Initializing constructor</p>
54 <div class="variablelist"><table border="0" class="variablelist compact">
56 <col align="left" valign="top">
60 <td><p><span class="term">Parameters:</span></p></td>
61 <td><div class="variablelist"><table border="0" class="variablelist compact">
63 <col align="left" valign="top">
67 <td><p><span class="term"><code class="computeroutput">name</code></span></p></td>
68 <td><p>Attribute name </p></td>
75 <div class="refsect2">
76 <a name="idm45554740644960"></a><h3>
77 <a name="idm45711347220160-bb"></a><code class="computeroutput">has_attribute</code> public member functions</h3>
78 <div class="orderedlist"><ol class="orderedlist" type="1">
80 <pre class="literallayout"><span class="identifier">result_type</span> <a name="idm45711347219600-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">attribute_value_set</span> <span class="keyword">const</span> <span class="special">&</span> attrs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
81 <p>Checking operator</p>
85 <div class="variablelist"><table border="0" class="variablelist compact">
87 <col align="left" valign="top">
92 <td><p><span class="term">Parameters:</span></p></td>
93 <td><div class="variablelist"><table border="0" class="variablelist compact">
95 <col align="left" valign="top">
99 <td><p><span class="term"><code class="computeroutput">attrs</code></span></p></td>
100 <td><p>A set of attribute values </p></td>
105 <td><p><span class="term">Returns:</span></p></td>
106 <td><p><code class="computeroutput">true</code> if the log record contains the sought attribute value, <code class="computeroutput">false</code> otherwise </p></td>
111 <li class="listitem">
112 <pre class="literallayout"><span class="identifier">result_type</span> <a name="idm45711347215280-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">log</span><span class="special">::</span><span class="identifier">record_view</span> <span class="keyword">const</span> <span class="special">&</span> rec<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
113 <p>Checking operator</p>
117 <div class="variablelist"><table border="0" class="variablelist compact">
119 <col align="left" valign="top">
124 <td><p><span class="term">Parameters:</span></p></td>
125 <td><div class="variablelist"><table border="0" class="variablelist compact">
127 <col align="left" valign="top">
131 <td><p><span class="term"><code class="computeroutput">rec</code></span></p></td>
132 <td><p>A log record </p></td>
137 <td><p><span class="term">Returns:</span></p></td>
138 <td><p><code class="computeroutput">true</code> if the log record contains the sought attribute value, <code class="computeroutput">false</code> otherwise </p></td>
147 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
148 <td align="left"></td>
149 <td align="right"><div class="copyright-footer">Copyright © 2007-2016 Andrey Semashev<p>
150 Distributed under the Boost Software License, Version 1.0. (See accompanying
151 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>).
156 <div class="spirit-nav">
157 <a accesskey="p" href="has_attribute.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../expressions.html#header.boost.log.expressions.predicates.has_attr_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="has_attr_idm45711347208272.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>