Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/boost/logic/tribool.html @ 25

Last change on this file since 25 was 12, checked in by landauf, 17 years ago

added boost

File size: 5.7 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Class tribool</title>
5<link rel="stylesheet" href="../../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
8<link rel="up" href="../../tribool/reference.html#id2426531" title="Header &lt;boost/logic/tribool.hpp&gt;">
9<link rel="prev" href="../../tribool/reference.html" title="Reference">
10<link rel="next" href="../../indeterminate.html" title="Function indeterminate">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%">
14<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
15<td align="center"><a href="../../../../index.htm">Home</a></td>
16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="../../../../people/people.htm">People</a></td>
18<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
19<td align="center"><a href="../../../../more/index.htm">More</a></td>
20</table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../../tribool/reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../tribool/reference.html#id2426531"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../indeterminate.html"><img src="../../images/next.png" alt="Next"></a>
24</div>
25<div class="refentry" lang="en">
26<a name="boost.logic.tribool"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class tribool</span></h2>
29<p>boost::logic::tribool &#8212; A 3-state boolean type. </p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
33<span class="bold"><strong>class</strong></span> tribool {
34<span class="bold"><strong>public</strong></span>:
35  <span class="emphasis"><em>// <a href="tribool.html#boost.logic.triboolconstruct-copy-destruct">construct/copy/destruct</a></em></span>
36  <a href="tribool.html#id2426787-bb">tribool</a>();
37  <a href="tribool.html#id2403718-bb">tribool</a>(<span class="bold"><strong>bool</strong></span>);
38  <a href="tribool.html#id2409784-bb">tribool</a>(indeterminate_keyword_t);
39
40  <span class="emphasis"><em>// <a href="tribool.html#id2547009-bb">public member functions</a></em></span>
41  <a href="tribool.html#id2547005-bb"><span class="bold"><strong>operator</strong></span> safe_bool</a>() <span class="bold"><strong>const</strong></span>;
42
43  enum boost::logic::tribool::value_t value;
44};</pre></div>
45<div class="refsect1" lang="en">
46<a name="id2790621"></a><h2>Description</h2>
47<p>3-state boolean values are either true, false, or indeterminate. </p>
48<div class="refsect2" lang="en">
49<a name="id2790628"></a><h3>
50<a name="boost.logic.triboolconstruct-copy-destruct"></a><code class="computeroutput">tribool</code> construct/copy/destruct</h3>
51<div class="orderedlist"><ol type="1">
52<li>
53<pre class="literallayout"><a name="id2426787-bb"></a>tribool();</pre>
54<p>Construct a new 3-state boolean value with the value 'false'.</p>
55<p></p>
56<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
57
58    Will not throw.</p>
59</li>
60<li>
61<pre class="literallayout"><a name="id2403718-bb"></a>tribool(<span class="bold"><strong>bool</strong></span> value);</pre>
62<p>Construct a new 3-state boolean value with the given boolean value, which may be <code class="computeroutput">true</code>  or <code class="computeroutput">false</code> .</p>
63<p></p>
64<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
65
66    Will not throw.</p>
67</li>
68<li>
69<pre class="literallayout"><a name="id2409784-bb"></a>tribool(indeterminate_keyword_t );</pre>
70<p>Construct a new 3-state boolean value with an indeterminate value.</p>
71<p></p>
72<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
73
74    Will not throw.</p>
75</li>
76</ol></div>
77</div>
78<div class="refsect2" lang="en">
79<a name="id2790752"></a><h3>
80<a name="id2547009-bb"></a><code class="computeroutput">tribool</code> public member functions</h3>
81<div class="orderedlist"><ol type="1"><li>
82<pre class="literallayout"><a name="id2547005-bb"></a><span class="bold"><strong>operator</strong></span> safe_bool() <span class="bold"><strong>const</strong></span>;</pre>
83<p>Use a 3-state boolean in a boolean context. Will evaluate true in a boolean context only when the 3-state boolean is definitely true.</p>
84<p></p>
85<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
86
87    true if the 3-state boolean is true, false otherwise <br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
88
89    Will not throw.</p>
90</li></ol></div>
91</div>
92</div>
93</div>
94<table width="100%"><tr>
95<td align="left"></td>
96<td align="right"><small>Copyright © 2002-2004 Douglas Gregor</small></td>
97</tr></table>
98<hr>
99<div class="spirit-nav">
100<a accesskey="p" href="../../tribool/reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../tribool/reference.html#id2426531"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../indeterminate.html"><img src="../../images/next.png" alt="Next"></a>
101</div>
102</body>
103</html>
Note: See TracBrowser for help on using the repository browser.