1
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>BitMagic: sample5.cpp File Reference</title>
3
<title>BitMagic: bm::bvector< Alloc, MS >::insert_iterator Class Reference</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
6
<!-- Generated by Doxygen 1.4.1 -->
7
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="examples.html">Examples</a></div>
9
<a class="el" href="dir_000001.html">samples</a> / <a class="el" href="dir_000006.html">sample5</a></div>
10
<h1>sample5.cpp File Reference</h1><code>#include <iostream></code><br>
11
<code>#include <algorithm></code><br>
12
<code>#include "<a class="el" href="a00102.html">bm.h</a>"</code><br>
15
Include dependency graph for sample5.cpp:<p><center><img src="a00148.png" border="0" usemap="#sample5.cpp_map" alt=""></center>
16
<map name="sample5.cpp_map">
17
<area href="a00074.html" shape="rect" coords="167,305,207,327" alt="">
18
<area href="a00076.html" shape="rect" coords="272,192,341,213" alt="">
19
<area href="a00077.html" shape="rect" coords="279,237,335,259" alt="">
20
<area href="a00079.html" shape="rect" coords="275,283,339,304" alt="">
21
<area href="a00078.html" shape="rect" coords="275,373,339,395" alt="">
22
<area href="a00081.html" shape="rect" coords="273,419,340,440" alt="">
23
<area href="a00082.html" shape="rect" coords="271,464,343,485" alt="">
24
<area href="a00080.html" shape="rect" coords="271,600,343,621" alt="">
28
<a href="a00115.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
9
<a class="el" href="a00129.html">bm</a>::<a class="el" href="a00084.html">bvector</a>::<a class="el" href="a00087.html">insert_iterator</a></div>
10
<h1>bm::bvector< Alloc, MS >::insert_iterator Class Reference<br>
12
[<a class="el" href="a00132.html">The Main bvector<> Group</a>]</small>
13
</h1>Output iterator iterator designed to set "ON" bits based on input sequence of integers (bit indeces).
14
<a href="#_details">More...</a>
16
<code>#include <<a class="el" href="a00137.html">bm.h</a>></code>
18
<table border="0" cellpadding="0" cellspacing="0">
30
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
31
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#a0">Print</a> (unsigned n)</td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#a1">main</a> (void)</td></tr>
36
<hr><h2>Function Documentation</h2>
37
<a class="anchor" name="a1" doxytag="sample5.cpp::main"></a><p>
38
<table class="mdTable" cellpadding="2" cellspacing="0">
41
<table cellpadding="0" cellspacing="0" border="0">
43
<td class="md" nowrap valign="top">int main </td>
44
<td class="md" valign="top">( </td>
45
<td class="md" nowrap valign="top">void </td>
46
<td class="mdname1" valign="top" nowrap> </td>
47
<td class="md" valign="top"> ) </td>
48
<td class="md" nowrap></td>
54
<table cellspacing="5" cellpadding="0" border="0">
64
Definition at line <a class="el" href="a00115.html#l00046">46</a> of file <a class="el" href="a00115.html">sample5.cpp</a>.
66
References <a class="el" href="a00102.html#l01409">bm::bvector< Alloc, MS >::end()</a>, <a class="el" href="a00102.html#l01399">bm::bvector< Alloc, MS >::first()</a>, and <a class="el" href="a00115.html#l00041">Print()</a>. </td>
69
<a class="anchor" name="a0" doxytag="sample5.cpp::Print"></a><p>
70
<table class="mdTable" cellpadding="2" cellspacing="0">
73
<table cellpadding="0" cellspacing="0" border="0">
75
<td class="md" nowrap valign="top">void Print </td>
76
<td class="md" valign="top">( </td>
77
<td class="md" nowrap valign="top">unsigned </td>
20
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
21
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::output_iterator_tag </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#w0">iterator_category</a></td></tr>
23
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#w1">value_type</a></td></tr>
25
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#w2">difference_type</a></td></tr>
27
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#w3">pointer</a></td></tr>
29
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#w4">reference</a></td></tr>
31
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
32
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#a0">insert_iterator</a> (<a class="el" href="a00084.html">bvector</a>< Alloc, MS > &<a class="el" href="a00084.html">bvect</a>)</td></tr>
34
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00087.html">insert_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#a1">operator=</a> (<a class="el" href="a00129.html#a26">bm::id_t</a> n)</td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00087.html">insert_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#a2">operator *</a> ()</td></tr>
38
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00087.html">insert_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#a3">operator++</a> ()</td></tr>
40
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00087.html">insert_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#a4">operator++</a> (int)</td></tr>
42
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
43
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS > & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#p0">bvect_</a></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00129.html#a26">bm::id_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html#p1">max_bit_</a></td></tr>
48
<hr><a name="_details"></a><h2>Detailed Description</h2>
49
<h3>template<class Alloc, class MS><br>
50
class bm::bvector< Alloc, MS >::insert_iterator</h3>
52
Output iterator iterator designed to set "ON" bits based on input sequence of integers (bit indeces).
54
STL container can be converted to bvector using this iterator Insert iterator guarantees the vector will be dynamically resized (set_bit does not do that).<p>
55
<dl compact><dt><b>Note:</b></dt><dd>If you have many bits to set it is a good idea to use output iterator instead of explicitly calling set, because iterator may implement some performance specific tricks to make sure bulk insert is fast. </dd></dl>
60
Definition at line <a class="el" href="a00137.html#l00327">327</a> of file <a class="el" href="a00137.html">bm.h</a>.<hr><h2>Member Typedef Documentation</h2>
61
<a class="anchor" name="w2" doxytag="bm::bvector::insert_iterator::difference_type"></a><p>
62
<table class="mdTable" cellpadding="2" cellspacing="0">
65
<table cellpadding="0" cellspacing="0" border="0">
67
<td class="mdPrefix" colspan="4">
68
template<class Alloc, class MS> </td>
71
<td class="md" nowrap valign="top">typedef void <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::<a class="el" href="a00087.html#w2">insert_iterator::difference_type</a> </td>
77
<table cellspacing="5" cellpadding="0" border="0">
87
Definition at line <a class="el" href="a00137.html#l00334">334</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
90
<a class="anchor" name="w0" doxytag="bm::bvector::insert_iterator::iterator_category"></a><p>
91
<table class="mdTable" cellpadding="2" cellspacing="0">
94
<table cellpadding="0" cellspacing="0" border="0">
96
<td class="mdPrefix" colspan="4">
97
template<class Alloc, class MS> </td>
100
<td class="md" nowrap valign="top">typedef std::output_iterator_tag <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::<a class="el" href="a00087.html#w0">insert_iterator::iterator_category</a> </td>
106
<table cellspacing="5" cellpadding="0" border="0">
116
Definition at line <a class="el" href="a00137.html#l00331">331</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
119
<a class="anchor" name="w3" doxytag="bm::bvector::insert_iterator::pointer"></a><p>
120
<table class="mdTable" cellpadding="2" cellspacing="0">
123
<table cellpadding="0" cellspacing="0" border="0">
125
<td class="mdPrefix" colspan="4">
126
template<class Alloc, class MS> </td>
129
<td class="md" nowrap valign="top">typedef void <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::<a class="el" href="a00087.html#w3">insert_iterator::pointer</a> </td>
135
<table cellspacing="5" cellpadding="0" border="0">
145
Definition at line <a class="el" href="a00137.html#l00335">335</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
148
<a class="anchor" name="w4" doxytag="bm::bvector::insert_iterator::reference"></a><p>
149
<table class="mdTable" cellpadding="2" cellspacing="0">
152
<table cellpadding="0" cellspacing="0" border="0">
154
<td class="mdPrefix" colspan="4">
155
template<class Alloc, class MS> </td>
158
<td class="md" nowrap valign="top">typedef void <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::<a class="el" href="a00087.html#w4">insert_iterator::reference</a> </td>
164
<table cellspacing="5" cellpadding="0" border="0">
174
Definition at line <a class="el" href="a00137.html#l00336">336</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
177
<a class="anchor" name="w1" doxytag="bm::bvector::insert_iterator::value_type"></a><p>
178
<table class="mdTable" cellpadding="2" cellspacing="0">
181
<table cellpadding="0" cellspacing="0" border="0">
183
<td class="mdPrefix" colspan="4">
184
template<class Alloc, class MS> </td>
187
<td class="md" nowrap valign="top">typedef unsigned <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::<a class="el" href="a00087.html#w1">insert_iterator::value_type</a> </td>
193
<table cellspacing="5" cellpadding="0" border="0">
203
Definition at line <a class="el" href="a00137.html#l00333">333</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
206
<hr><h2>Constructor & Destructor Documentation</h2>
207
<a class="anchor" name="a0" doxytag="bm::bvector::insert_iterator::insert_iterator"></a><p>
208
<table class="mdTable" cellpadding="2" cellspacing="0">
211
<table cellpadding="0" cellspacing="0" border="0">
213
<td class="mdPrefix" colspan="4">
214
template<class Alloc, class MS> </td>
217
<td class="md" nowrap valign="top"><a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::insert_iterator::insert_iterator </td>
218
<td class="md" valign="top">( </td>
219
<td class="md" nowrap valign="top"><a class="el" href="a00084.html">bvector</a>< Alloc, MS > & </td>
220
<td class="mdname1" valign="top" nowrap> <em>bvect</em> </td>
221
<td class="md" valign="top"> ) </td>
222
<td class="md" nowrap><code> [inline]</code></td>
228
<table cellspacing="5" cellpadding="0" border="0">
238
Definition at line <a class="el" href="a00137.html#l00338">338</a> of file <a class="el" href="a00137.html">bm.h</a>.
240
References <a class="el" href="a00137.html#l00369">bm::bvector< Alloc, MS >::insert_iterator::bvect_</a>, and <a class="el" href="a00137.html#l00370">bm::bvector< Alloc, MS >::insert_iterator::max_bit_</a>. </td>
243
<hr><h2>Member Function Documentation</h2>
244
<a class="anchor" name="a2" doxytag="bm::bvector::insert_iterator::operator *"></a><p>
245
<table class="mdTable" cellpadding="2" cellspacing="0">
248
<table cellpadding="0" cellspacing="0" border="0">
250
<td class="mdPrefix" colspan="4">
251
template<class Alloc, class MS> </td>
254
<td class="md" nowrap valign="top"><a class="el" href="a00087.html">insert_iterator</a>& <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::insert_iterator::operator * </td>
255
<td class="md" valign="top">( </td>
256
<td class="mdname1" valign="top" nowrap> </td>
257
<td class="md" valign="top"> ) </td>
258
<td class="md" nowrap><code> [inline]</code></td>
264
<table cellspacing="5" cellpadding="0" border="0">
272
Returns *this without doing anything (no-op)
274
Definition at line <a class="el" href="a00137.html#l00362">362</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
277
<a class="anchor" name="a4" doxytag="bm::bvector::insert_iterator::operator++"></a><p>
278
<table class="mdTable" cellpadding="2" cellspacing="0">
281
<table cellpadding="0" cellspacing="0" border="0">
283
<td class="mdPrefix" colspan="4">
284
template<class Alloc, class MS> </td>
287
<td class="md" nowrap valign="top"><a class="el" href="a00087.html">insert_iterator</a>& <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::insert_iterator::operator++ </td>
288
<td class="md" valign="top">( </td>
289
<td class="md" nowrap valign="top">int </td>
290
<td class="mdname1" valign="top" nowrap> </td>
291
<td class="md" valign="top"> ) </td>
292
<td class="md" nowrap><code> [inline]</code></td>
298
<table cellspacing="5" cellpadding="0" border="0">
306
Returns *this. This iterator does not move (no-op)
308
Definition at line <a class="el" href="a00137.html#l00366">366</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
311
<a class="anchor" name="a3" doxytag="bm::bvector::insert_iterator::operator++"></a><p>
312
<table class="mdTable" cellpadding="2" cellspacing="0">
315
<table cellpadding="0" cellspacing="0" border="0">
317
<td class="mdPrefix" colspan="4">
318
template<class Alloc, class MS> </td>
321
<td class="md" nowrap valign="top"><a class="el" href="a00087.html">insert_iterator</a>& <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::insert_iterator::operator++ </td>
322
<td class="md" valign="top">( </td>
323
<td class="mdname1" valign="top" nowrap> </td>
324
<td class="md" valign="top"> ) </td>
325
<td class="md" nowrap><code> [inline]</code></td>
331
<table cellspacing="5" cellpadding="0" border="0">
339
Returns *this. This iterator does not move (no-op)
341
Definition at line <a class="el" href="a00137.html#l00364">364</a> of file <a class="el" href="a00137.html">bm.h</a>. </td>
344
<a class="anchor" name="a1" doxytag="bm::bvector::insert_iterator::operator="></a><p>
345
<table class="mdTable" cellpadding="2" cellspacing="0">
348
<table cellpadding="0" cellspacing="0" border="0">
350
<td class="mdPrefix" colspan="4">
351
template<class Alloc, class MS> </td>
354
<td class="md" nowrap valign="top"><a class="el" href="a00087.html">insert_iterator</a>& <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::insert_iterator::operator= </td>
355
<td class="md" valign="top">( </td>
356
<td class="md" nowrap valign="top"><a class="el" href="a00129.html#a26">bm::id_t</a> </td>
78
357
<td class="mdname1" valign="top" nowrap> <em>n</em> </td>
79
358
<td class="md" valign="top"> ) </td>
80
<td class="md" nowrap></td>
86
<table cellspacing="5" cellpadding="0" border="0">
94
<dl compact><dt><b>Examples: </b></dt><dd>
95
<a class="el" href="a00038.html#a28">sample5.cpp</a>, and <a class="el" href="a00041.html#a51">sample8.cpp</a>.</dl>
97
Definition at line <a class="el" href="a00115.html#l00041">41</a> of file <a class="el" href="a00115.html">sample5.cpp</a>.
99
Referenced by <a class="el" href="a00115.html#l00046">main()</a>. </td>
102
<hr size="1"><address style="align: right;"><small>Generated on Thu Apr 20 13:29:06 2006 for BitMagic by
359
<td class="md" nowrap><code> [inline]</code></td>
365
<table cellspacing="5" cellpadding="0" border="0">
375
Definition at line <a class="el" href="a00137.html#l00344">344</a> of file <a class="el" href="a00137.html">bm.h</a>.
377
References <a class="el" href="a00140.html#l00014">BM_ASSERT</a>, <a class="el" href="a00137.html#l00369">bm::bvector< Alloc, MS >::insert_iterator::bvect_</a>, and <a class="el" href="a00137.html#l00370">bm::bvector< Alloc, MS >::insert_iterator::max_bit_</a>. </td>
380
<hr><h2>Field Documentation</h2>
381
<a class="anchor" name="p0" doxytag="bm::bvector::insert_iterator::bvect_"></a><p>
382
<table class="mdTable" cellpadding="2" cellspacing="0">
385
<table cellpadding="0" cellspacing="0" border="0">
387
<td class="mdPrefix" colspan="4">
388
template<class Alloc, class MS> </td>
391
<td class="md" nowrap valign="top"><a class="el" href="a00084.html">bm::bvector</a><Alloc, MS>& <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::<a class="el" href="a00087.html#p0">insert_iterator::bvect_</a><code> [protected]</code> </td>
397
<table cellspacing="5" cellpadding="0" border="0">
407
Definition at line <a class="el" href="a00137.html#l00369">369</a> of file <a class="el" href="a00137.html">bm.h</a>.
409
Referenced by <a class="el" href="a00137.html#l00338">bm::bvector< Alloc, MS >::insert_iterator::insert_iterator()</a>, and <a class="el" href="a00137.html#l00344">bm::bvector< Alloc, MS >::insert_iterator::operator=()</a>. </td>
412
<a class="anchor" name="p1" doxytag="bm::bvector::insert_iterator::max_bit_"></a><p>
413
<table class="mdTable" cellpadding="2" cellspacing="0">
416
<table cellpadding="0" cellspacing="0" border="0">
418
<td class="mdPrefix" colspan="4">
419
template<class Alloc, class MS> </td>
422
<td class="md" nowrap valign="top"><a class="el" href="a00129.html#a26">bm::id_t</a> <a class="el" href="a00084.html">bm::bvector</a>< Alloc, MS >::<a class="el" href="a00087.html#p1">insert_iterator::max_bit_</a><code> [protected]</code> </td>
428
<table cellspacing="5" cellpadding="0" border="0">
438
Definition at line <a class="el" href="a00137.html#l00370">370</a> of file <a class="el" href="a00137.html">bm.h</a>.
440
Referenced by <a class="el" href="a00137.html#l00338">bm::bvector< Alloc, MS >::insert_iterator::insert_iterator()</a>, and <a class="el" href="a00137.html#l00344">bm::bvector< Alloc, MS >::insert_iterator::operator=()</a>. </td>
443
<hr>The documentation for this class was generated from the following file:<ul>
444
<li><a class="el" href="a00137.html">bm.h</a></ul>
445
<hr size="1"><address style="align: right;"><small>Generated on Sun Aug 5 14:12:38 2007 for BitMagic by
103
446
<a href="http://www.doxygen.org/index.html">
104
447
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>