1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Struct transforms_type</title> 6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../../proto/reference.html#header.boost.proto.transform.when_hpp" title="Header <boost/proto/transform/when.hpp>"> 10<link rel="prev" href="pass_through/impl.html" title="Struct template impl"> 11<link rel="next" href="transforms.html" title="Global transforms"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 16<td align="center"><a href="../../../../index.html">Home</a></td> 17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="pass_through/impl.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../proto/reference.html#header.boost.proto.transform.when_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="transforms.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.proto.transforms_type"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Struct transforms_type</span></h2> 30<p>boost::proto::transforms_type — 31 The type used to define the global <code class="computeroutput"><a class="link" href="transforms.html" title="Global transforms">proto::transforms</a></code>, 32 a key for use when creating and accessing a slot in a transform environment for 33 a set of external transforms. 34 </p> 35</div> 36<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 37<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="../../proto/reference.html#header.boost.proto.transform.when_hpp" title="Header <boost/proto/transform/when.hpp>">boost/proto/transform/when.hpp</a>> 38 39</span> 40<span class="keyword">struct</span> <a class="link" href="transforms_type.html" title="Struct transforms_type">transforms_type</a> <span class="special">{</span> 41 42 <span class="comment">// <a class="link" href="transforms_type.html#id-1_3_33_5_52_2_1_1_3-bb">public member functions</a></span> 43 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Value<span class="special">></span> 44 <a class="link" href="env.html" title="Struct template env">env</a><span class="special"><</span><span class="identifier">transforms_type</span><span class="special">,</span> <em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em><span class="special">></span> <a class="link" href="transforms_type.html#id-1_3_33_5_52_2_1_1_3_1_1-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="identifier">Value</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 45 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Value<span class="special">></span> 46 <a class="link" href="env.html" title="Struct template env">env</a><span class="special"><</span><span class="identifier">transforms_type</span><span class="special">,</span> <em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em><span class="special">></span> <a class="link" href="transforms_type.html#id-1_3_33_5_52_2_1_1_3_1_2-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 47<span class="special">}</span><span class="special">;</span></pre></div> 48<div class="refsect1"> 49<a name="id-1.3.33.5.54.4.4"></a><h2>Description</h2> 50<p> 51 The <code class="computeroutput">proto::transforms_type</code> type, along with the <code class="computeroutput"><a class="link" href="transforms.html" title="Global transforms">proto::transforms</a></code> 52 global, are declared using the <code class="computeroutput"><a class="link" href="../../BOOST_PROTO_DEFINE_ENV_VAR.html" title="Macro BOOST_PROTO_DEFINE_ENV_VAR">BOOST_PROTO_DEFINE_ENV_VAR</a>()</code> macro. 53 </p> 54<div class="refsect2"> 55<a name="id-1.3.33.5.54.4.4.3"></a><h3> 56<a name="id-1_3_33_5_52_2_1_1_3-bb"></a><code class="computeroutput">transforms_type</code> public member functions</h3> 57<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 58<pre class="literallayout"><a name="id-1_3_33_5_52_2_1_1_3_1-bb"></a><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Value<span class="special">></span> 59 <a class="link" href="env.html" title="Struct template env">env</a><span class="special"><</span><span class="identifier">transforms_type</span><span class="special">,</span> <em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em><span class="special">></span> <a name="id-1_3_33_5_52_2_1_1_3_1_1-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">Value</span> <span class="special">&</span> value<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 60<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Value<span class="special">></span> 61 <a class="link" href="env.html" title="Struct template env">env</a><span class="special"><</span><span class="identifier">transforms_type</span><span class="special">,</span> <em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em><span class="special">></span> <a name="id-1_3_33_5_52_2_1_1_3_1_2-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&</span> value<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 62<p> 63 If <code class="computeroutput">Value</code> is a specialization <code class="computeroutput">boost::reference_wrapper<T></code>, 64 this function returns <code class="computeroutput"><a class="link" href="env.html" title="Struct template env">env</a><transforms_type, T &>(value.get())</code>. 65 </p> 66<p> 67 Else, if the type <code class="computeroutput">Value</code> is non-copyable (i.e., a function, an array, abstract, or an ostream), 68 this function returns <code class="computeroutput"><a class="link" href="env.html" title="Struct template env">env</a><transforms_type, Value <em class="replaceable"><code>cv</code></em> &>(value)</code>, 69 where <code class="computeroutput"><em class="replaceable"><code>cv</code></em></code> is <code class="computeroutput">const</code> for the second overload, and empty 70 for the first. 71 </p> 72<p> 73 Otherwise, this function returns <code class="computeroutput"><a class="link" href="env.html" title="Struct template env">env</a><transforms_type, Value>(value)</code>. 74 </p> 75</li></ol></div> 76</div> 77</div> 78</div> 79<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 80<td align="left"></td> 81<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p> 82 Distributed under the Boost Software License, Version 1.0. (See accompanying 83 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>) 84 </p> 85</div></td> 86</tr></table> 87<hr> 88<div class="spirit-nav"> 89<a accesskey="p" href="pass_through/impl.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../proto/reference.html#header.boost.proto.transform.when_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="transforms.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 90</div> 91</body> 92</html> 93