Files
boost_fusion/doc/html/fusion/support/is_view.html
2010-01-01 22:00:21 +00:00

194 lines
12 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>is_view</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<<<<<<< .working
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
=======
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
>>>>>>> .merge-right.r57125
<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="previous" href="is_sequence.html" title="is_sequence">
<link rel="next" href="tag_of.html" title="tag_of">
</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>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_sequence.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tag_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<<<<<<< .working
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="fusion.support.is_view"></a><a href="is_view.html" title="is_view">is_view</a>
</h3></div></div>
<div></div>
</div>
<a name="fusion.support.is_view.description"></a><h4>
<a name="id413272"></a>
<a href="is_view.html#fusion.support.is_view.description">Description</a>
</h4>
=======
<div class="section" title="is_view">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.is_view"></a><a class="link" href="is_view.html" title="is_view">is_view</a>
</h3></div></div></div>
<a name="fusion.support.is_view.description"></a><h5>
<a name="id613016"></a>
<a class="link" href="is_view.html#fusion.support.is_view.description">Description</a>
</h5>
>>>>>>> .merge-right.r57125
<p>
Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
if a certain type <tt class="computeroutput"><span class="identifier">T</span></tt> is a
conforming Fusion <a href="../view.html" title="View">View</a>, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
otherwise. A view is a specialized sequence that does not actually contain
data. Views hold sequences which may be other views. In general, views are
held by other views by value, while non-views are held by other views by
reference. <tt class="computeroutput"><span class="identifier">is_view</span></tt> may be
specialized to accomodate clients providing Fusion conforming views.
</p>
<<<<<<< .working
<a name="fusion.support.is_view.synopsis"></a><h4>
<a name="id413366"></a>
<a href="is_view.html#fusion.support.is_view.synopsis">Synopsis</a>
</h4>
=======
<a name="fusion.support.is_view.synopsis"></a><h5>
<a name="id613080"></a>
<a class="link" href="is_view.html#fusion.support.is_view.synopsis">Synopsis</a>
</h5>
>>>>>>> .merge-right.r57125
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">traits</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">is_view</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span>
</pre>
<<<<<<< .working
<a name="fusion.support.is_view.parameters"></a><h4>
<a name="id413482"></a>
<a href="is_view.html#fusion.support.is_view.parameters">Parameters</a>
</h4>
=======
<a name="fusion.support.is_view.parameters"></a><h5>
<a name="id613174"></a>
<a class="link" href="is_view.html#fusion.support.is_view.parameters">Parameters</a>
</h5>
>>>>>>> .merge-right.r57125
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th><p>
Parameter
</p></th>
<th><p>
Requirement
</p></th>
<th><p>
Description
</p></th>
</tr></thead>
<tbody><tr>
<td><p>
<tt class="computeroutput"><span class="identifier">T</span></tt>
</p></td>
<td><p>
Any type
</p></td>
<td><p>
The type to query.
</p></td>
</tr></tbody>
</table></div>
<<<<<<< .working
<a name="fusion.support.is_view.expression_semantics"></a><h4>
<a name="id413581"></a>
<a href="is_view.html#fusion.support.is_view.expression_semantics">Expression Semantics</a>
</h4>
=======
<a name="fusion.support.is_view.expression_semantics"></a><h5>
<a name="id613257"></a>
<a class="link" href="is_view.html#fusion.support.is_view.expression_semantics">Expression Semantics</a>
</h5>
>>>>>>> .merge-right.r57125
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">c</span><span class="special">;</span>
</pre>
<p>
<span class="bold"><b>Return type</b></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
Boolean Constant</a>.
</p>
<p>
<span class="bold"><b>Semantics</b></span>: Metafunction that evaluates to
<tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt> if a certain type <tt class="computeroutput"><span class="identifier">T</span></tt>
is a conforming Fusion view, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
otherwise.
</p>
<<<<<<< .working
<a name="fusion.support.is_view.header"></a><h4>
<a name="id413730"></a>
<a href="is_view.html#fusion.support.is_view.header">Header</a>
</h4>
=======
<a name="fusion.support.is_view.header"></a><h5>
<a name="id613371"></a>
<a class="link" href="is_view.html#fusion.support.is_view.header">Header</a>
</h5>
>>>>>>> .merge-right.r57125
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">is_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">is_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<<<<<<< .working
<a name="fusion.support.is_view.example"></a><h4>
<a name="id413867"></a>
<a href="is_view.html#fusion.support.is_view.example">Example</a>
</h4>
=======
<a name="fusion.support.is_view.example"></a><h5>
<a name="id613479"></a>
<a class="link" href="is_view.html#fusion.support.is_view.example">Example</a>
</h5>
>>>>>>> .merge-right.r57125
<pre class="programlisting"><span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">));</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">*,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">long</span><span class="special">*,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">vector_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <a href="../view/filter_view.html" title="filter_view"><tt class="computeroutput"><span class="identifier">filter_view</span></tt></a><span class="special">&lt;</span><span class="identifier">vector_type</span><span class="special">,</span> <span class="identifier">is_pointer</span><span class="special">&lt;</span><span class="identifier">_</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">filter_view_type</span><span class="special">;</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="identifier">filter_view_type</span><span class="special">&gt;</span> <span class="special">));</span>
</pre>
</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 © 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<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="is_sequence.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tag_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>