]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/quickbook/test/callouts-1_5.gold
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / quickbook / test / callouts-1_5.gold
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
3 <article id="callout_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
4 xmlns:xi="http://www.w3.org/2001/XInclude">
5 <title>Callout Tests</title>
6 <para>
7 Example 1:
8 </para>
9 <para>
10 Now we can define a function that simulates an ordinary six-sided die.
11 </para>
12 <para>
13 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
14 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
15 <phrase role="special">}</phrase>
16 </programlisting>
17 </para>
18 <calloutlist>
19 <callout arearefs="callout_tests.c0" id="callout_tests.c1">
20 <para>
21 create a uniform_int distribution
22 </para>
23 </callout>
24 </calloutlist>
25 <para>
26 Example 2:
27 </para>
28 <para>
29 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
30 <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
31 <phrase role="special">}</phrase>
32 </programlisting>
33 </para>
34 <calloutlist>
35 <callout arearefs="callout_tests.c2" id="callout_tests.c3">
36 <important>
37 <para>
38 test
39 </para>
40 </important>
41 </callout>
42 </calloutlist>
43 <para>
44 Example 3:
45 </para>
46 <para>
47 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
48 <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
49 <phrase role="special">}</phrase>
50 </programlisting>
51 </para>
52 <calloutlist>
53 <callout arearefs="callout_tests.c4" id="callout_tests.c5">
54 <important>
55 <para>
56 test
57 </para>
58 </important>
59 </callout>
60 </calloutlist>
61 <para>
62 Example 3 (again!):
63 </para>
64 <para>
65 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
66 <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
67 <phrase role="special">}</phrase>
68 </programlisting>
69 </para>
70 <calloutlist>
71 <callout arearefs="callout_tests.c6" id="callout_tests.c7">
72 <important>
73 <para>
74 test
75 </para>
76 </important>
77 </callout>
78 </calloutlist>
79 <para>
80 Example 4:
81 </para>
82 <para>
83 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
84 <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
85 <co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
86 <phrase role="special">}</phrase>
87 </programlisting>
88 </para>
89 <calloutlist>
90 <callout arearefs="callout_tests.c8" id="callout_tests.c9">
91 <para>
92 callout 1
93 </para>
94 </callout>
95 <callout arearefs="callout_tests.c10" id="callout_tests.c11">
96 <para>
97 callout 2
98 </para>
99 </callout>
100 <callout arearefs="callout_tests.c12" id="callout_tests.c13">
101 <para>
102 create a uniform_int distribution
103 </para>
104 </callout>
105 </calloutlist>
106 <para>
107 <programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
108 </programlisting>
109 </para>
110 <calloutlist>
111 <callout arearefs="callout_tests.c14" id="callout_tests.c15">
112 <para>
113 callout 2
114 </para>
115 </callout>
116 <callout arearefs="callout_tests.c16" id="callout_tests.c17">
117 <para>
118 create a uniform_int distribution
119 </para>
120 </callout>
121 </calloutlist>
122 <section id="callout_tests.test_section">
123 <title><link linkend="callout_tests.test_section">Try callouts in a section</link></title>
124 <para>
125 Example 1:
126 </para>
127 <para>
128 Now we can define a function that simulates an ordinary six-sided die.
129 </para>
130 <para>
131 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
132 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
133 <phrase role="special">}</phrase>
134 </programlisting>
135 </para>
136 <calloutlist>
137 <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
138 <para>
139 create a uniform_int distribution
140 </para>
141 </callout>
142 </calloutlist>
143 <para>
144 Example 2:
145 </para>
146 <para>
147 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
148 <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
149 <phrase role="special">}</phrase>
150 </programlisting>
151 </para>
152 <calloutlist>
153 <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
154 <important>
155 <para>
156 test
157 </para>
158 </important>
159 </callout>
160 </calloutlist>
161 <para>
162 Example 3:
163 </para>
164 <para>
165 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
166 <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
167 <phrase role="special">}</phrase>
168 </programlisting>
169 </para>
170 <calloutlist>
171 <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
172 <important>
173 <para>
174 test
175 </para>
176 </important>
177 </callout>
178 </calloutlist>
179 <para>
180 Example 3 (again!):
181 </para>
182 <para>
183 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
184 <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
185 <phrase role="special">}</phrase>
186 </programlisting>
187 </para>
188 <calloutlist>
189 <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
190 <important>
191 <para>
192 test
193 </para>
194 </important>
195 </callout>
196 </calloutlist>
197 <para>
198 Example 4:
199 </para>
200 <para>
201 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
202 <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
203 <co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
204 <phrase role="special">}</phrase>
205 </programlisting>
206 </para>
207 <calloutlist>
208 <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
209 <para>
210 callout 1
211 </para>
212 </callout>
213 <callout arearefs="callout_tests.test_section.c10" id="callout_tests.test_section.c11">
214 <para>
215 callout 2
216 </para>
217 </callout>
218 <callout arearefs="callout_tests.test_section.c12" id="callout_tests.test_section.c13">
219 <para>
220 create a uniform_int distribution
221 </para>
222 </callout>
223 </calloutlist>
224 <para>
225 <programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
226 </programlisting>
227 </para>
228 <calloutlist>
229 <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">
230 <para>
231 callout 2
232 </para>
233 </callout>
234 <callout arearefs="callout_tests.test_section.c16" id="callout_tests.test_section.c17">
235 <para>
236 create a uniform_int distribution
237 </para>
238 </callout>
239 </calloutlist>
240 </section>
241 </article>