• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>in</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 1. Fusion 2.2">
8<link rel="up" href="../i_o.html" title="I/O">
9<link rel="prev" href="../i_o.html" title="I/O">
10<link rel="next" href="out.html" title="out">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../i_o.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../i_o.html"><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="out.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="fusion.sequence.operator.i_o.in"></a><a class="link" href="in.html" title="in">in</a>
28</h5></div></div></div>
29<h6>
30<a name="fusion.sequence.operator.i_o.in.h0"></a>
31            <span class="phrase"><a name="fusion.sequence.operator.i_o.in.description"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.description">Description</a>
32          </h6>
33<p>
34            Read a <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> from an input
35            stream.
36          </p>
37<h6>
38<a name="fusion.sequence.operator.i_o.in.h1"></a>
39            <span class="phrase"><a name="fusion.sequence.operator.i_o.in.synopsis"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.synopsis">Synopsis</a>
40          </h6>
41<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IStream</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">&gt;</span>
42<span class="identifier">IStream</span><span class="special">&amp;</span>
43<span class="keyword">operator</span><span class="special">&gt;&gt;(</span><span class="identifier">IStream</span><span class="special">&amp;</span> <span class="identifier">is</span><span class="special">,</span> <span class="identifier">Sequence</span><span class="special">&amp;</span> <span class="identifier">seq</span><span class="special">);</span>
44</pre>
45<h6>
46<a name="fusion.sequence.operator.i_o.in.h2"></a>
47            <span class="phrase"><a name="fusion.sequence.operator.i_o.in.parameters"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.parameters">Parameters</a>
48          </h6>
49<div class="informaltable"><table class="table">
50<colgroup>
51<col>
52<col>
53<col>
54</colgroup>
55<thead><tr>
56<th>
57                    <p>
58                      Parameter
59                    </p>
60                  </th>
61<th>
62                    <p>
63                      Requirement
64                    </p>
65                  </th>
66<th>
67                    <p>
68                      Description
69                    </p>
70                  </th>
71</tr></thead>
72<tbody>
73<tr>
74<td>
75                    <p>
76                      is
77                    </p>
78                  </td>
79<td>
80                    <p>
81                      An input stream.
82                    </p>
83                  </td>
84<td>
85                    <p>
86                      Stream to extract information from.
87                    </p>
88                  </td>
89</tr>
90<tr>
91<td>
92                    <p>
93                      seq
94                    </p>
95                  </td>
96<td>
97                    <p>
98                      A <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>.
99                    </p>
100                  </td>
101<td>
102                    <p>
103                      The sequence to read.
104                    </p>
105                  </td>
106</tr>
107</tbody>
108</table></div>
109<h6>
110<a name="fusion.sequence.operator.i_o.in.h3"></a>
111            <span class="phrase"><a name="fusion.sequence.operator.i_o.in.expression_semantics"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.expression_semantics">Expression
112            Semantics</a>
113          </h6>
114<pre class="programlisting"><span class="identifier">is</span> <span class="special">&gt;&gt;</span> <span class="identifier">seq</span>
115</pre>
116<p>
117            <span class="bold"><strong>Return type</strong></span>: IStream&amp;
118          </p>
119<p>
120            <span class="bold"><strong>Semantics</strong></span>: For each element, <code class="computeroutput"><span class="identifier">e</span></code>, in sequence, <code class="computeroutput"><span class="identifier">seq</span></code>,
121            call <code class="computeroutput"><span class="identifier">is</span> <span class="special">&gt;&gt;</span>
122            <span class="identifier">e</span></code>.
123          </p>
124<h6>
125<a name="fusion.sequence.operator.i_o.in.h4"></a>
126            <span class="phrase"><a name="fusion.sequence.operator.i_o.in.header"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.header">Header</a>
127          </h6>
128<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">sequence</span><span class="special">/</span><span class="identifier">io</span><span class="special">/</span><span class="identifier">in</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
129<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">in</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
130</pre>
131<h6>
132<a name="fusion.sequence.operator.i_o.in.h5"></a>
133            <span class="phrase"><a name="fusion.sequence.operator.i_o.in.example"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.example">Example</a>
134          </h6>
135<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">v</span><span class="special">;</span>
136<span class="identifier">std</span><span class="special">::</span><span class="identifier">cin</span> <span class="special">&gt;&gt;</span> <span class="identifier">v</span><span class="special">;</span>
137</pre>
138</div>
139<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
140<td align="left"></td>
141<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman,
142      Dan Marsden, Tobias Schwinger<p>
143        Distributed under the Boost Software License, Version 1.0. (See accompanying
144        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>)
145      </p>
146</div></td>
147</tr></table>
148<hr>
149<div class="spirit-nav">
150<a accesskey="p" href="../i_o.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../i_o.html"><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="out.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
151</div>
152</body>
153</html>
154