• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>PrimitiveGenerator</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="Spirit 2.5.8">
8<link rel="up" href="../generator_concepts.html" title="Generator Concepts">
9<link rel="prev" href="generator.html" title="Generator">
10<link rel="next" href="unarygenerator.html" title="UnaryGenerator">
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="generator.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="unarygenerator.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="spirit.karma.reference.generator_concepts.primitivegenerator"></a><a class="link" href="primitivegenerator.html" title="PrimitiveGenerator">PrimitiveGenerator</a>
28</h5></div></div></div>
29<h6>
30<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h0"></a>
31            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.description"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.description">Description</a>
32          </h6>
33<p>
34            <span class="emphasis"><em>PrimitiveGenerator</em></span> is the most basic building block
35            that the client uses to build more complex generators.
36          </p>
37<h6>
38<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h1"></a>
39            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of">Refinement
40            of</a>
41          </h6>
42<div class="blockquote"><blockquote class="blockquote"><p>
43              <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
44            </p></blockquote></div>
45<h6>
46<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h2"></a>
47            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit">Post-delimit</a>
48          </h6>
49<p>
50            Before exiting the <code class="computeroutput"><span class="identifier">generate</span></code>
51            member function, a PrimitiveGenerator is required to do a post-delimit.
52            This will generate a single delimiting character/token sequence. Only
53            PrimitiveGenerator's are required to perform this post-delimit. This
54            is typically carried out through a call to <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span></code>:
55          </p>
56<pre class="programlisting"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">delimit</span><span class="special">);</span>
57</pre>
58<h6>
59<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h3"></a>
60            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions">Type
61            Expressions</a>
62          </h6>
63<div class="informaltable"><table class="table">
64<colgroup>
65<col>
66<col>
67</colgroup>
68<thead><tr>
69<th>
70                    <p>
71                      Expression
72                    </p>
73                  </th>
74<th>
75                    <p>
76                      Description
77                    </p>
78                  </th>
79</tr></thead>
80<tbody><tr>
81<td>
82                    <p>
83                      <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_primitive_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
84                    </p>
85                  </td>
86<td>
87                    <p>
88                      Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
89                      if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>,
90                      is a PrimitiveGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
91                      otherwise (See <a href="../../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
92                      Boolean Constant</a>).
93                    </p>
94                  </td>
95</tr></tbody>
96</table></div>
97<h6>
98<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h4"></a>
99            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.models"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.models">Models</a>
100          </h6>
101<p>
102            The following generators conform to this model:
103          </p>
104<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
105<li class="listitem">
106                <a class="link" href="../auxiliary/eol.html" title="End of Line Generator (eol)"><code class="computeroutput"><span class="identifier">eol</span></code></a>,
107              </li>
108<li class="listitem">
109                <a class="link" href="../auxiliary/eps.html" title="Epsilon Generator (eps)"><code class="computeroutput"><span class="identifier">eps</span></code></a>,
110              </li>
111<li class="listitem">
112                <a class="link" href="../numeric.html" title="Numeric Generators">Numeric generators</a>,
113              </li>
114<li class="listitem">
115                <a class="link" href="../char/char_generator.html" title="Character Generators (char_, lit)">Character
116                generators</a>.
117              </li>
118</ul></div>
119<p>
120            <span class="bold"><strong>FIXME</strong></span> Add more links to <span class="emphasis"><em>PrimitiveGenerator</em></span>
121            models here.
122          </p>
123</div>
124<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
125<td align="left"></td>
126<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
127        Distributed under the Boost Software License, Version 1.0. (See accompanying
128        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>)
129      </p>
130</div></td>
131</tr></table>
132<hr>
133<div class="spirit-nav">
134<a accesskey="p" href="generator.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="unarygenerator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
135</div>
136</body>
137</html>
138