| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
| <title>Macro BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE</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 1. Boost.Log v2"> |
| <link rel="up" href="expressions.html#header.boost.log.expressions.keyword_hpp" title="Header <boost/log/expressions/keyword.hpp>"> |
| <link rel="prev" href="boost/log/expressions/attribute_keyword.html" title="Struct template attribute_keyword"> |
| <link rel="next" href="BOOST_LOG_ATTRIBUTE_KEYWORD.html" title="Macro BOOST_LOG_ATTRIBUTE_KEYWORD"> |
| </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="boost/log/expressions/attribute_keyword.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="expressions.html#header.boost.log.expressions.keyword_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="BOOST_LOG_ATTRIBUTE_KEYWORD.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| <div class="refentry"> |
| <a name="BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE"></a><div class="titlepage"></div> |
| <div class="refnamediv"> |
| <h2><span class="refentrytitle">Macro BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE</span></h2> |
| <p>BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE — The macro declares an attribute keyword type. </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: <<a class="link" href="expressions.html#header.boost.log.expressions.keyword_hpp" title="Header <boost/log/expressions/keyword.hpp>">boost/log/expressions/keyword.hpp</a>> |
| |
| </span>BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE(keyword_, name_, value_type_)</pre></div> |
| <div class="refsect1"> |
| <a name="idp114877232"></a><h2>Description</h2> |
| <p>The macro should be used at a namespace scope. It expands into an attribute keyword type definition, including the <code class="computeroutput">tag</code> namespace and the keyword tag type within which has the following layout:</p> |
| <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">tag</span> |
| <span class="special">{</span> |
| <span class="keyword">struct</span> <span class="identifier">keyword_</span> <span class="special">:</span> |
| <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">log</span><span class="special">::</span><span class="identifier">expressions</span><span class="special">::</span><span class="identifier">keyword_descriptor</span> |
| <span class="special">{</span> |
| <span class="keyword">typedef</span> <span class="identifier">value_type_</span> <span class="identifier">value_type</span><span class="special">;</span> |
| <span class="keyword">static</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">log</span><span class="special">::</span><span class="identifier">attribute_name</span> <span class="identifier">get_name</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> |
| <span class="special">}</span><span class="special">;</span> |
| <span class="special">}</span> |
| |
| <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">log</span><span class="special">::</span><span class="identifier">expressions</span><span class="special">::</span><span class="identifier">attribute_keyword</span><span class="special"><</span> <span class="identifier">tag</span><span class="special">::</span><span class="identifier">keyword_</span> <span class="special">></span> <span class="identifier">keyword_type</span><span class="special">;</span> |
| </pre> |
| <p>The <code class="computeroutput">get_name</code> method returns the attribute name.</p> |
| <div class="note"><table border="0" summary="Note"> |
| <tr> |
| <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td> |
| <th align="left">Note</th> |
| </tr> |
| <tr><td align="left" valign="top"><p>This macro only defines the type of the keyword. To also define the keyword object, use the <code class="computeroutput">BOOST_LOG_ATTRIBUTE_KEYWORD</code> macro instead.</p></td></tr> |
| </table></div> |
| <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">keyword_</code></span></p></td> |
| <td><p>Keyword name </p></td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><code class="computeroutput">name_</code></span></p></td> |
| <td><p>Attribute name string </p></td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><code class="computeroutput">value_type_</code></span></p></td> |
| <td><p>Attribute value type </p></td> |
| </tr> |
| </tbody> |
| </table></div></td> |
| </tr></tbody> |
| </table></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 © 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="boost/log/expressions/attribute_keyword.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="expressions.html#header.boost.log.expressions.keyword_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="BOOST_LOG_ATTRIBUTE_KEYWORD.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| </body> |
| </html> |