visitation_result.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Class visitation_result</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&#160;1.&#160;Boost.Log v2">
  8. <link rel="up" href="../../attributes.html#header.boost.log.attributes.value_visitation_hpp" title="Header &lt;boost/log/attributes/value_visitation.hpp&gt;">
  9. <link rel="prev" href="value_extractor.html" title="Class template value_extractor">
  10. <link rel="next" href="visit_idm45711348203152.html" title="Function template visit">
  11. </head>
  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>
  14. <hr>
  15. <div class="spirit-nav">
  16. <a accesskey="p" href="value_extractor.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../attributes.html#header.boost.log.attributes.value_visitation_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="visit_idm45711348203152.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  17. </div>
  18. <div class="refentry">
  19. <a name="boost.log.visitation_result"></a><div class="titlepage"></div>
  20. <div class="refnamediv">
  21. <h2><span class="refentrytitle">Class visitation_result</span></h2>
  22. <p>boost::log::visitation_result &#8212; The class represents attribute value visitation result. </p>
  23. </div>
  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: &lt;<a class="link" href="../../attributes.html#header.boost.log.attributes.value_visitation_hpp" title="Header &lt;boost/log/attributes/value_visitation.hpp&gt;">boost/log/attributes/value_visitation.hpp</a>&gt;
  26. </span>
  27. <span class="keyword">class</span> <a class="link" href="visitation_result.html" title="Class visitation_result">visitation_result</a> <span class="special">{</span>
  28. <span class="keyword">public</span><span class="special">:</span>
  29. <span class="comment">// Error codes for attribute value visitation. </span>
  30. <span class="keyword">enum</span> <a name="boost.log.visitation_result.error_code"></a>error_code <span class="special">{</span> ok, value_not_found, value_has_invalid_type <span class="special">}</span><span class="special">;</span>
  31. <span class="comment">// <a class="link" href="visitation_result.html#boost.log.visitation_resultconstruct-copy-destruct">construct/copy/destruct</a></span>
  32. <a class="link" href="visitation_result.html#idm45711348205184-bb"><span class="identifier">visitation_result</span></a><span class="special">(</span><span class="identifier">error_code</span> <span class="special">=</span> <span class="identifier">ok</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  33. <span class="comment">// <a class="link" href="visitation_result.html#idm45711348214720-bb">public member functions</a></span>
  34. <span class="keyword">explicit</span> <a class="link" href="visitation_result.html#idm45711348214160-bb"><span class="keyword">operator</span> <span class="keyword">bool</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  35. <span class="keyword">bool</span> <a class="link" href="visitation_result.html#idm45711348210688-bb"><span class="keyword">operator</span><span class="special">!</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  36. <span class="identifier">error_code</span> <a class="link" href="visitation_result.html#idm45711348207488-bb"><span class="identifier">code</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  37. <span class="special">}</span><span class="special">;</span></pre></div>
  38. <div class="refsect1">
  39. <a name="idm45554748674832"></a><h2>Description</h2>
  40. <p>The main purpose of this class is to provide a convenient interface for checking whether the attribute value visitation succeeded or not. It also allows to discover the actual cause of failure, should the operation fail. </p>
  41. <div class="refsect2">
  42. <a name="idm45554748673920"></a><h3>
  43. <a name="boost.log.visitation_resultconstruct-copy-destruct"></a><code class="computeroutput">visitation_result</code>
  44. public
  45. construct/copy/destruct</h3>
  46. <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
  47. <pre class="literallayout"><a name="idm45711348205184-bb"></a><span class="identifier">visitation_result</span><span class="special">(</span><span class="identifier">error_code</span> code <span class="special">=</span> <span class="identifier">ok</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
  48. <p>Initializing constructor. Creates the result that is equivalent to the specified error code. </p>
  49. </li></ol></div>
  50. </div>
  51. <div class="refsect2">
  52. <a name="idm45554748665024"></a><h3>
  53. <a name="idm45711348214720-bb"></a><code class="computeroutput">visitation_result</code> public member functions</h3>
  54. <div class="orderedlist"><ol class="orderedlist" type="1">
  55. <li class="listitem">
  56. <pre class="literallayout"><span class="keyword">explicit</span> <a name="idm45711348214160-bb"></a><span class="keyword">operator</span> <span class="keyword">bool</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
  57. <p>Checks if the visitation was successful.</p>
  58. <p>
  59. </p>
  60. <div class="variablelist"><table border="0" class="variablelist compact">
  61. <colgroup>
  62. <col align="left" valign="top">
  63. <col>
  64. </colgroup>
  65. <tbody><tr>
  66. <td><p><span class="term">Returns:</span></p></td>
  67. <td><p><code class="computeroutput">true</code> if the value was visited successfully, <code class="computeroutput">false</code> otherwise. </p></td>
  68. </tr></tbody>
  69. </table></div>
  70. </li>
  71. <li class="listitem">
  72. <pre class="literallayout"><span class="keyword">bool</span> <a name="idm45711348210688-bb"></a><span class="keyword">operator</span><span class="special">!</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
  73. <p>Checks if the visitation was unsuccessful.</p>
  74. <p>
  75. </p>
  76. <div class="variablelist"><table border="0" class="variablelist compact">
  77. <colgroup>
  78. <col align="left" valign="top">
  79. <col>
  80. </colgroup>
  81. <tbody><tr>
  82. <td><p><span class="term">Returns:</span></p></td>
  83. <td><p><code class="computeroutput">false</code> if the value was visited successfully, <code class="computeroutput">true</code> otherwise. </p></td>
  84. </tr></tbody>
  85. </table></div>
  86. </li>
  87. <li class="listitem">
  88. <pre class="literallayout"><span class="identifier">error_code</span> <a name="idm45711348207488-bb"></a><span class="identifier">code</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
  89. <p>
  90. </p>
  91. <div class="variablelist"><table border="0" class="variablelist compact">
  92. <colgroup>
  93. <col align="left" valign="top">
  94. <col>
  95. </colgroup>
  96. <tbody><tr>
  97. <td><p><span class="term">Returns:</span></p></td>
  98. <td><p>The actual result code of value visitation </p></td>
  99. </tr></tbody>
  100. </table></div>
  101. </li>
  102. </ol></div>
  103. </div>
  104. </div>
  105. </div>
  106. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  107. <td align="left"></td>
  108. <td align="right"><div class="copyright-footer">Copyright &#169; 2007-2016 Andrey Semashev<p>
  109. Distributed under the Boost Software License, Version 1.0. (See accompanying
  110. 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>).
  111. </p>
  112. </div></td>
  113. </tr></table>
  114. <hr>
  115. <div class="spirit-nav">
  116. <a accesskey="p" href="value_extractor.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../attributes.html#header.boost.log.attributes.value_visitation_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="visit_idm45711348203152.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  117. </div>
  118. </body>
  119. </html>