Imported Upstream version 1.64.0
[platform/upstream/boost.git] / libs / test / doc / html / boost / unit_test / data / monomorphic / generated_by.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Class template generated_by</title>
5 <link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../../../index.html" title="Boost.Test">
8 <link rel="up" href="../../../../header/boost/test/data/monomorphic/generate_hpp.html" title="Header &lt;boost/test/data/monomorphic/generate.hpp&gt;">
9 <link rel="prev" href="../../../../header/boost/test/data/monomorphic/generate_hpp.html" title="Header &lt;boost/test/data/monomorphic/generate.hpp&gt;">
10 <link rel="next" href="generated_by/iterator.html" title="Struct iterator">
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="../../../../header/boost/test/data/monomorphic/generate_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../header/boost/test/data/monomorphic/generate_hpp.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="generated_by/iterator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.unit_test.data.monomorphic.generated_by"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Class template generated_by</span></h2>
29 <p>boost::unit_test::data::monomorphic::generated_by &#8212; Generators interface. </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"><span class="comment">// In header: &lt;<a class="link" href="../../../../header/boost/test/data/monomorphic/generate_hpp.html" title="Header &lt;boost/test/data/monomorphic/generate.hpp&gt;">boost/test/data/monomorphic/generate.hpp</a>&gt;
33
34 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Generator<span class="special">&gt;</span> 
35 <span class="keyword">class</span> <a class="link" href="generated_by.html" title="Class template generated_by">generated_by</a> <span class="special">{</span>
36 <span class="keyword">public</span><span class="special">:</span>
37   <span class="comment">// types</span>
38   <span class="keyword">typedef</span> <span class="identifier">Generator</span><span class="special">::</span><span class="identifier">sample</span> <a name="boost.unit_test.data.monomorphic.generated_by.sample"></a><span class="identifier">sample</span><span class="special">;</span>        
39   <span class="keyword">typedef</span> <span class="identifier">Generator</span>         <a name="boost.unit_test.data.monomorphic.generated_by.generator_type"></a><span class="identifier">generator_type</span><span class="special">;</span>
40
41   <span class="comment">// member classes/structs/unions</span>
42
43   <span class="keyword">struct</span> <a class="link" href="generated_by/iterator.html" title="Struct iterator">iterator</a> <span class="special">{</span>
44     <span class="comment">// <a class="link" href="generated_by/iterator.html#boost.unit_test.data.monomorphic.generated_by.iteratorconstruct-copy-destruct">construct/copy/destruct</a></span>
45     <span class="keyword">explicit</span> <a class="link" href="generated_by/iterator.html#idp56604128-bb"><span class="identifier">iterator</span></a><span class="special">(</span><span class="identifier">Generator</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
46
47     <span class="comment">// <a class="link" href="generated_by/iterator.html#idp56601440-bb">public member functions</a></span>
48     <span class="identifier">sample</span> <span class="keyword">const</span> <span class="special">&amp;</span> <a class="link" href="generated_by/iterator.html#idp56602000-bb"><span class="keyword">operator</span><span class="special">*</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
49     <span class="keyword">void</span> <a class="link" href="generated_by/iterator.html#idp56603120-bb"><span class="keyword">operator</span><span class="special">++</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
50   <span class="special">}</span><span class="special">;</span>
51
52   <span class="keyword">enum</span> <a name="boost.unit_test.data.monomorphic.generated_by.@6"></a>@6 <span class="special">{</span> arity = = 1 <span class="special">}</span><span class="special">;</span>
53
54   <span class="comment">// <a class="link" href="generated_by.html#boost.unit_test.data.monomorphic.generated_byconstruct-copy-destruct">construct/copy/destruct</a></span>
55   <span class="keyword">explicit</span> <a class="link" href="generated_by.html#idp56612160-bb"><span class="identifier">generated_by</span></a><span class="special">(</span><span class="identifier">Generator</span> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
56   <a class="link" href="generated_by.html#idp56613408-bb"><span class="identifier">generated_by</span></a><span class="special">(</span><a class="link" href="generated_by.html" title="Class template generated_by">generated_by</a> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
57
58   <span class="comment">// <a class="link" href="generated_by.html#idp56608320-bb">public member functions</a></span>
59   <a class="link" href="../size_t.html" title="Class size_t">data::size_t</a> <a class="link" href="generated_by.html#idp56608880-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
60   <a class="link" href="generated_by/iterator.html" title="Struct iterator">iterator</a> <a class="link" href="generated_by.html#idp56610432-bb"><span class="identifier">begin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
61 <span class="special">}</span><span class="special">;</span></pre></div>
62 <div class="refsect1">
63 <a name="idp124434800"></a><h2>Description</h2>
64 <p>This class implements the dataset concept over a generator. Examples of generators are:</p>
65 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
66 <li class="listitem"><p><a class="link" href="xrange_t.html" title="Class template xrange_t">xrange_t</a></p></li>
67 <li class="listitem"><p><a class="link" href="random_t.html" title="Class template random_t">random_t</a></p></li>
68 </ul></div>
69 <p>
70 </p>
71 <p>The generator concept is the following:</p>
72 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
73 <li class="listitem"><p>the type of the generated samples is given by field <code class="computeroutput">sample</code> </p></li>
74 <li class="listitem"><p>the member function <code class="computeroutput">capacity</code> should return the size of the collection being generated (potentially infinite)</p></li>
75 <li class="listitem"><p>the member function <code class="computeroutput">next</code> should change the state of the generator to the next generated value</p></li>
76 <li class="listitem"><p>the member function <code class="computeroutput">reset</code> should put the state of the object in the same state as right after its instanciation </p></li>
77 </ul></div>
78 <p>
79 </p>
80 <div class="refsect2">
81 <a name="idp124443568"></a><h3>
82 <a name="boost.unit_test.data.monomorphic.generated_byconstruct-copy-destruct"></a><code class="computeroutput">generated_by</code> 
83         public
84        construct/copy/destruct</h3>
85 <div class="orderedlist"><ol class="orderedlist" type="1">
86 <li class="listitem"><pre class="literallayout"><span class="keyword">explicit</span> <a name="idp56612160-bb"></a><span class="identifier">generated_by</span><span class="special">(</span><span class="identifier">Generator</span> <span class="special">&amp;&amp;</span> G<span class="special">)</span><span class="special">;</span></pre></li>
87 <li class="listitem"><pre class="literallayout"><a name="idp56613408-bb"></a><span class="identifier">generated_by</span><span class="special">(</span><a class="link" href="generated_by.html" title="Class template generated_by">generated_by</a> <span class="special">&amp;&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre></li>
88 </ol></div>
89 </div>
90 <div class="refsect2">
91 <a name="idp124456896"></a><h3>
92 <a name="idp56608320-bb"></a><code class="computeroutput">generated_by</code> public member functions</h3>
93 <div class="orderedlist"><ol class="orderedlist" type="1">
94 <li class="listitem">
95 <pre class="literallayout"><a class="link" href="../size_t.html" title="Class size_t">data::size_t</a> <a name="idp56608880-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Size of the underlying dataset. </li>
96 <li class="listitem">
97 <pre class="literallayout"><a class="link" href="generated_by/iterator.html" title="Struct iterator">iterator</a> <a name="idp56610432-bb"></a><span class="identifier">begin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Iterator on the beginning of the dataset. </li>
98 </ol></div>
99 </div>
100 </div>
101 </div>
102 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
103 <td align="left"></td>
104 <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2016 Boost.Test contributors<p>
105         Distributed under the Boost Software License, Version 1.0. (See accompanying
106         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>)
107       </p>
108 </div></td>
109 </tr></table>
110 <hr>
111 <div class="spirit-nav">
112 <a accesskey="p" href="../../../../header/boost/test/data/monomorphic/generate_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../header/boost/test/data/monomorphic/generate_hpp.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="generated_by/iterator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
113 </div>
114 </body>
115 </html>