autoc 0.8 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/README +15 -4
  3. data/doc/AutoC.html +245 -0
  4. data/doc/AutoC/Code.html +520 -0
  5. data/doc/AutoC/Collection.html +923 -0
  6. data/doc/AutoC/HashMap.html +1161 -0
  7. data/doc/AutoC/HashSet.html +1122 -0
  8. data/doc/AutoC/List.html +1002 -0
  9. data/doc/AutoC/Module.html +951 -0
  10. data/doc/AutoC/Module/File.html +412 -0
  11. data/doc/AutoC/Module/Header.html +432 -0
  12. data/doc/AutoC/Module/Source.html +704 -0
  13. data/doc/AutoC/Priority.html +138 -0
  14. data/doc/AutoC/Queue.html +1167 -0
  15. data/doc/AutoC/Type.html +1152 -0
  16. data/doc/AutoC/UserDefinedType.html +655 -0
  17. data/doc/AutoC/Vector.html +856 -0
  18. data/doc/_index.html +299 -0
  19. data/doc/class_list.html +54 -0
  20. data/doc/css/common.css +1 -0
  21. data/doc/css/full_list.css +57 -0
  22. data/doc/css/style.css +339 -0
  23. data/doc/file.README.html +112 -0
  24. data/doc/file_list.html +56 -0
  25. data/doc/frames.html +26 -0
  26. data/doc/index.html +112 -0
  27. data/doc/js/app.js +219 -0
  28. data/doc/js/full_list.js +178 -0
  29. data/doc/js/jquery.js +4 -0
  30. data/doc/method_list.html +605 -0
  31. data/doc/top-level-namespace.html +112 -0
  32. data/lib/autoc.rb +35 -12
  33. data/lib/autoc/{code_builder.rb → code.rb} +230 -247
  34. data/lib/autoc/collection.rb +137 -0
  35. data/lib/autoc/collection/hash_map.rb +388 -0
  36. data/lib/autoc/collection/hash_set.rb +433 -0
  37. data/lib/autoc/collection/list.rb +410 -0
  38. data/lib/autoc/collection/queue.rb +514 -0
  39. data/lib/autoc/collection/vector.rb +295 -0
  40. data/lib/autoc/type.rb +198 -0
  41. data/test/test.c +921 -396
  42. data/test/test.h +41 -0
  43. data/test/test.rb +21 -26
  44. data/test/test_auto.c +2630 -3961
  45. data/test/test_auto.h +449 -560
  46. metadata +50 -17
  47. data/lib/autoc/data_struct_builder.rb +0 -1794
  48. data/lib/autoc/type_builder.rb +0 -24
  49. data/manual/manual.pdf +0 -0
@@ -0,0 +1,138 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: AutoC::Priority
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!AutoC/Priority.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../AutoC.html" title="AutoC (module)">AutoC</a></span></span>
36
+ &raquo;
37
+ <span class="title">Priority</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: AutoC::Priority
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/autoc/code.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+ <div class="paragraph">
90
+ <p>TODO min/max Fixnums</p>
91
+ </div>
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ </div>
99
+ <h2>Constant Summary</h2>
100
+
101
+ <dl class="constants">
102
+
103
+ <dt id="DEFAULT-constant" class="">DEFAULT =
104
+
105
+ </dt>
106
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
107
+
108
+ <dt id="MIN-constant" class="">MIN =
109
+
110
+ </dt>
111
+ <dd><pre class="code"><span class='op'>-</span><span class='int'>1000</span></pre></dd>
112
+
113
+ <dt id="MAX-constant" class="">MAX =
114
+
115
+ </dt>
116
+ <dd><pre class="code"><span class='int'>+1000</span></pre></dd>
117
+
118
+ </dl>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ </div>
130
+
131
+ <div id="footer">
132
+ Generated on Fri Jun 6 18:05:34 2014 by
133
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
+ 0.8.7.4 (ruby-2.0.0).
135
+ </div>
136
+
137
+ </body>
138
+ </html>
@@ -0,0 +1,1167 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: AutoC::Queue
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!AutoC/Queue.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (Q)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../AutoC.html" title="AutoC (module)">AutoC</a></span></span>
36
+ &raquo;
37
+ <span class="title">Queue</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: AutoC::Queue
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Code.html" title="AutoC::Code (class)">Code</a></span></li>
82
+
83
+ <li class="next"><span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></li>
84
+
85
+ <li class="next"><span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></li>
86
+
87
+ <li class="next">AutoC::Queue</li>
88
+
89
+ </ul>
90
+ <a href="#" class="inheritanceTree">show all</a>
91
+
92
+ </dd>
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <dt class="r2 last">Defined in:</dt>
103
+ <dd class="r2 last">lib/autoc/collection/queue.rb</dd>
104
+
105
+ </dl>
106
+ <div class="clear"></div>
107
+
108
+ <h2>Overview</h2><div class="docstring">
109
+ <div class="discussion">
110
+ <div class="paragraph">
111
+ <p>Queue is an ordered bidirectional sequence container.
112
+ Queue supports addition/removal operations at both ends.
113
+ However, it is intended to be used as a FIFO container as opposed to <span class='object_link'><a href="List.html" title="AutoC::List (class)">List</a></span>
114
+ since submission and polling operations are performed on the opposite ends.</p>
115
+ </div>
116
+ <div class="paragraph">
117
+ <p>This collection is a synergy of C++ <code>std::list&lt;&gt;</code> and <code>std::queue&lt;&gt;</code> template classes.</p>
118
+ </div>
119
+ <div class="sect1">
120
+ <h2 id="_generated_c_interface">Generated C interface</h2>
121
+ <div class="sectionbody">
122
+ <div class="sect2">
123
+ <h3 id="_collection_management">Collection management</h3>
124
+ <table class="tableblock frame-all grid-all" style="width:100%; ">
125
+ <colgroup>
126
+ <col style="width:50%;">
127
+ <col style="width:50%;">
128
+ </colgroup>
129
+ <tbody>
130
+ <tr>
131
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Copy(<strong><em>Type</em></strong> * <code>dst</code>, <strong><em>Type</em></strong> * <code>src</code>)</p></td>
132
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new queue <code>dst</code> filled with the contents of <code>src</code>.
133
+ A copy operation is performed on every element in <code>src</code>.
134
+ </p><p class="tableblock">NOTE: Previous contents of <code>dst</code> is overwritten.</p></td>
135
+ </tr>
136
+ <tr>
137
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Ctor(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
138
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new empty queue <code>self</code>.
139
+ </p><p class="tableblock">NOTE: Previous contents of <code>self</code> is overwritten.</p></td>
140
+ </tr>
141
+ <tr>
142
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Dtor(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
143
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Destroy queue <code>self</code>.
144
+ Stored elements are destroyed as well by calling the respective destructors.</p></td>
145
+ </tr>
146
+ <tr>
147
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Equal(<strong><em>Type</em></strong> * <code>lt</code>, <strong><em>Type</em></strong> * <code>rt</code>)</p></td>
148
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return non-zero value if queues <code>lt</code> and <code>rt</code> are considered equal by contents and zero value otherwise.</p></td>
149
+ </tr>
150
+ <tr>
151
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>size_t</em></strong> <sub>type</sub>Identify(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
152
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return hash code for queue <code>self</code>.</p></td>
153
+ </tr>
154
+ </tbody>
155
+ </table>
156
+
157
+ </div>
158
+ <div class="sect2">
159
+ <h3 id="_basic_operations">Basic operations</h3>
160
+ <table class="tableblock frame-all grid-all" style="width:100%; ">
161
+ <colgroup>
162
+ <col style="width:50%;">
163
+ <col style="width:50%;">
164
+ </colgroup>
165
+ <tbody>
166
+ <tr>
167
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Contains(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>)</p></td>
168
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return non-zero value if queue <code>self</code> contains (at least) one element considered equal to <code>what</code> and zero value otherwise.</p></td>
169
+ </tr>
170
+ <tr>
171
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Empty(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
172
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return non-zero value if queue <code>self</code> contains no elements and zero value otherwise.</p></td>
173
+ </tr>
174
+ <tr>
175
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>Find(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>)</p></td>
176
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return the <em>first</em> element of stored in <code>self</code> which is considered equal to <code>what</code>.
177
+ </p><p class="tableblock">WARNING: <code>self</code> <strong>must</strong> contain such element otherwise the behavior is undefined. See <sub>type</sub>Contains().</p></td>
178
+ </tr>
179
+ <tr>
180
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>Peek(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
181
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Alias for <sub>type</sub>PeekHead().</p></td>
182
+ </tr>
183
+ <tr>
184
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>PeekHead(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
185
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return a <em>copy</em> of the head element of <code>self</code>.
186
+ </p><p class="tableblock">WARNING: <code>self</code> <strong>must not</strong> be empty otherwise the behavior is undefined. See <sub>type</sub>Empty().</p></td>
187
+ </tr>
188
+ <tr>
189
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>PeekTail(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
190
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return a <em>copy</em> of the tail element of <code>self</code>.
191
+ </p><p class="tableblock">WARNING: <code>self</code> <strong>must not</strong> be empty otherwise the behavior is undefined. See <sub>type</sub>Empty().</p></td>
192
+ </tr>
193
+ <tr>
194
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>Pop(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
195
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Alias for <sub>type</sub>PopHead().</p></td>
196
+ </tr>
197
+ <tr>
198
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>PopHead(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
199
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Remove head element of <code>self</code> <strong>and</strong> return it.
200
+ </p><p class="tableblock">NOTE: The function returns the element itself, <strong>not</strong> a copy.
201
+ </p><p class="tableblock">WARNING: <code>self</code> <strong>must not</strong> be empty otherwise the behavior is undefined. See <sub>type</sub>Empty().</p></td>
202
+ </tr>
203
+ <tr>
204
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>PopTail(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
205
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Remove tail element of <code>self</code> <strong>and</strong> return it.
206
+ </p><p class="tableblock">NOTE: The function returns the element itself, <strong>not</strong> a copy.
207
+ </p><p class="tableblock">WARNING: <code>self</code> <strong>must not</strong> be empty otherwise the behavior is undefined. See <sub>type</sub>Empty().</p></td>
208
+ </tr>
209
+ <tr>
210
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Purge(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
211
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Remove and destroy all elements stored in <code>self</code>.</p></td>
212
+ </tr>
213
+ <tr>
214
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Push(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>)</p></td>
215
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Alias for <sub>type</sub>PushTail().</p></td>
216
+ </tr>
217
+ <tr>
218
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>PushHead(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>)</p></td>
219
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Place a <em>copy</em> of the element <code>what</code> to the head of <code>self</code>.</p></td>
220
+ </tr>
221
+ <tr>
222
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>PushTail(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>)</p></td>
223
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Place a <em>copy</em> of the element <code>what</code> to the tail of <code>self</code>.</p></td>
224
+ </tr>
225
+ <tr>
226
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Replace(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>, <strong><em>E</em></strong> <code>with</code>)</p></td>
227
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Find the <em>first</em> occurrence of <code>what</code> in <code>self</code> and replace it with a <em>copy</em> of the element <code>with</code>.
228
+ Replaced element is destroyed.
229
+ </p><p class="tableblock">Return non-zero value on successful replacement and zero value if no suitable element was found.</p></td>
230
+ </tr>
231
+ <tr>
232
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>ReplaceAll(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>, <strong><em>E</em></strong> <code>with</code>)</p></td>
233
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Find <em>all</em> occurrences of <code>what</code> in <code>self</code> and replace them with <em>copies</em> of the element <code>with</code>.
234
+ All replaced elements are destroyed.
235
+ </p><p class="tableblock">Return number of successful replacements.</p></td>
236
+ </tr>
237
+ <tr>
238
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>ReplaceEx(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>, <strong><em>E</em></strong> <code>with</code>, <strong><em>int</em></strong> count)</p></td>
239
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Find at most <code>count</code> occurrences of <code>what</code> in <code>self</code> and replace them with <em>copies</em> of the element <code>with</code>.
240
+ If <code>count</code> is negative, <em>all</em> occurrences are replaced instead.
241
+ All replaced elements are destroyed.
242
+ </p><p class="tableblock">Return number of successful replacements.</p></td>
243
+ </tr>
244
+ <tr>
245
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Remove(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>)</p></td>
246
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Remove and destroy the <em>first</em> occurrence of the element <code>what</code> in <code>self</code>.
247
+ </p><p class="tableblock">Return non-zero value if element was removed and zero value otherwise.</p></td>
248
+ </tr>
249
+ <tr>
250
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>RemoveAll(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>)</p></td>
251
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Remove and destroy <em>all</em> occurrences of the element <code>what</code> in <code>self</code>.
252
+ </p><p class="tableblock">Return number of elements actually removed.</p></td>
253
+ </tr>
254
+ <tr>
255
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>RemoveEx(<strong><em>Type</em></strong> * <code>self</code>, <strong><em>E</em></strong> <code>what</code>, <strong><em>int</em></strong> count)</p></td>
256
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Remove and destroy at most <code>count</code> occurrences of the element <code>what</code> in <code>self</code>.
257
+ If <code>count</code> is negative, <em>all</em> occurrences are removed instead.
258
+ </p><p class="tableblock">Return number of elements actually removed.</p></td>
259
+ </tr>
260
+ <tr>
261
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>size_t</em></strong> <sub>type</sub>Size(<strong><em>Type</em></strong> * <code>self</code>)</p></td>
262
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return number of elements stored in <code>self</code>.</p></td>
263
+ </tr>
264
+ </tbody>
265
+ </table>
266
+
267
+ </div>
268
+ <div class="sect2">
269
+ <h3 id="_iteration">Iteration</h3>
270
+ <table class="tableblock frame-all grid-all" style="width:100%; ">
271
+ <colgroup>
272
+ <col style="width:50%;">
273
+ <col style="width:50%;">
274
+ </colgroup>
275
+ <tbody>
276
+ <tr>
277
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>it</sub>Ctor(<strong><em>IteratorType</em></strong> * <code>it</code>, <strong><em>Type</em></strong> * <code>self</code>)</p></td>
278
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new forward iterator <code>it</code> on queue <code>self</code>.
279
+ </p><p class="tableblock">NOTE: Previous contents of <code>it</code> is overwritten.</p></td>
280
+ </tr>
281
+ <tr>
282
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>it</sub>CtorEx(<strong><em>IteratorType</em></strong> * <code>it</code>, <strong><em>Type</em></strong> * <code>self</code>, <strong><em>int</em></strong> <code>forward</code>)</p></td>
283
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new iterator <code>it</code> on queue <code>self</code>.
284
+ Non-zero value of <code>forward</code> specifies a forward iterator, zero value specifies a backward iterator.
285
+ </p><p class="tableblock">NOTE: Previous contents of <code>it</code> is overwritten.</p></td>
286
+ </tr>
287
+ <tr>
288
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>it</sub>Move(<strong><em>IteratorType</em></strong> * <code>it</code>)</p></td>
289
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Advance iterator position of <code>it</code> <strong>and</strong> return non-zero value if new position is valid and zero value otherwise.</p></td>
290
+ </tr>
291
+ <tr>
292
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>it</sub>Get(<strong><em>IteratorType</em></strong> * <code>it</code>)</p></td>
293
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Return a <em>copy</em> of current element pointed to by the iterator <code>it</code>.
294
+ </p><p class="tableblock">WARNING: current position <strong>must</strong> be valid otherwise the behavior is undefined. See <sub>it</sub>Move().</p></td>
295
+ </tr>
296
+ </tbody>
297
+ </table>
298
+
299
+ </div>
300
+ </div>
301
+ </div>
302
+
303
+ </div>
304
+ </div>
305
+ <div class="tags">
306
+
307
+
308
+ </div>
309
+ <h2>Constant Summary</h2>
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+ <h2>Instance Attribute Summary</h2>
318
+
319
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></h3>
320
+ <p class="inherited"><span class='object_link'><a href="Collection.html#element-instance_method" title="AutoC::Collection#element (method)">#element</a></span></p>
321
+
322
+
323
+
324
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3>
325
+ <p class="inherited"><span class='object_link'><a href="Type.html#type-instance_method" title="AutoC::Type#type (method)">#type</a></span></p>
326
+
327
+
328
+
329
+ <h2>
330
+ Instance Method Summary
331
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
332
+ </h2>
333
+
334
+ <ul class="summary">
335
+
336
+ <li class="public ">
337
+ <span class="summary_signature">
338
+
339
+ <a href="#write_exported_declarations-instance_method" title="#write_exported_declarations (instance method)">- (Object) <strong>write_exported_declarations</strong>(stream, declare, define) </a>
340
+
341
+
342
+
343
+ </span>
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+ <span class="summary_desc"><div class='inline'></div></span>
354
+
355
+ </li>
356
+
357
+
358
+ <li class="public ">
359
+ <span class="summary_signature">
360
+
361
+ <a href="#write_exported_types-instance_method" title="#write_exported_types (instance method)">- (Object) <strong>write_exported_types</strong>(stream) </a>
362
+
363
+
364
+
365
+ </span>
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+ <span class="summary_desc"><div class='inline'></div></span>
376
+
377
+ </li>
378
+
379
+
380
+ <li class="public ">
381
+ <span class="summary_signature">
382
+
383
+ <a href="#write_implementations-instance_method" title="#write_implementations (instance method)">- (Object) <strong>write_implementations</strong>(stream, define) </a>
384
+
385
+
386
+
387
+ </span>
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+ <span class="summary_desc"><div class='inline'></div></span>
398
+
399
+ </li>
400
+
401
+
402
+ </ul>
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></h3>
415
+ <p class="inherited"><span class='object_link'><a href="Collection.html#coerce-class_method" title="AutoC::Collection.coerce (method)">coerce</a></span>, <span class='object_link'><a href="Collection.html#copy-instance_method" title="AutoC::Collection#copy (method)">#copy</a></span>, <span class='object_link'><a href="Collection.html#ctor-instance_method" title="AutoC::Collection#ctor (method)">#ctor</a></span>, <span class='object_link'><a href="Collection.html#dtor-instance_method" title="AutoC::Collection#dtor (method)">#dtor</a></span>, <span class='object_link'><a href="Collection.html#entities-instance_method" title="AutoC::Collection#entities (method)">#entities</a></span>, <span class='object_link'><a href="Collection.html#equal-instance_method" title="AutoC::Collection#equal (method)">#equal</a></span>, <span class='object_link'><a href="Collection.html#identify-instance_method" title="AutoC::Collection#identify (method)">#identify</a></span>, <span class='object_link'><a href="Collection.html#initialize-instance_method" title="AutoC::Collection#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Collection.html#less-instance_method" title="AutoC::Collection#less (method)">#less</a></span></p>
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3>
426
+ <p class="inherited"><span class='object_link'><a href="Type.html#abort-instance_method" title="AutoC::Type#abort (method)">#abort</a></span>, <span class='object_link'><a href="Type.html#assert-instance_method" title="AutoC::Type#assert (method)">#assert</a></span>, <span class='object_link'><a href="Type.html#calloc-instance_method" title="AutoC::Type#calloc (method)">#calloc</a></span>, <span class='object_link'><a href="Type.html#entities-instance_method" title="AutoC::Type#entities (method)">#entities</a></span>, <span class='object_link'><a href="Type.html#extern-instance_method" title="AutoC::Type#extern (method)">#extern</a></span>, <span class='object_link'><a href="Type.html#free-instance_method" title="AutoC::Type#free (method)">#free</a></span>, <span class='object_link'><a href="Type.html#initialize-instance_method" title="AutoC::Type#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Type.html#inline-instance_method" title="AutoC::Type#inline (method)">#inline</a></span>, <span class='object_link'><a href="Type.html#malloc-instance_method" title="AutoC::Type#malloc (method)">#malloc</a></span>, <span class='object_link'><a href="Type.html#method_missing-instance_method" title="AutoC::Type#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Type.html#static-instance_method" title="AutoC::Type#static (method)">#static</a></span>, <span class='object_link'><a href="Type.html#write_decls-instance_method" title="AutoC::Type#write_decls (method)">#write_decls</a></span>, <span class='object_link'><a href="Type.html#write_defs-instance_method" title="AutoC::Type#write_defs (method)">#write_defs</a></span>, <span class='object_link'><a href="Type.html#write_intf-instance_method" title="AutoC::Type#write_intf (method)">#write_intf</a></span></p>
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Code.html" title="AutoC::Code (class)">Code</a></span></h3>
437
+ <p class="inherited"><span class='object_link'><a href="Code.html#attach-instance_method" title="AutoC::Code#attach (method)">#attach</a></span>, <span class='object_link'><a href="Code.html#entities-instance_method" title="AutoC::Code#entities (method)">#entities</a></span>, <span class='object_link'><a href="Code.html#priority-instance_method" title="AutoC::Code#priority (method)">#priority</a></span>, <span class='object_link'><a href="Code.html#source_size-instance_method" title="AutoC::Code#source_size (method)">#source_size</a></span>, <span class='object_link'><a href="Code.html#write_decls-instance_method" title="AutoC::Code#write_decls (method)">#write_decls</a></span>, <span class='object_link'><a href="Code.html#write_defs-instance_method" title="AutoC::Code#write_defs (method)">#write_defs</a></span>, <span class='object_link'><a href="Code.html#write_intf-instance_method" title="AutoC::Code#write_intf (method)">#write_intf</a></span></p>
438
+ <div id="constructor_details" class="method_details_list">
439
+ <h2>Constructor Details</h2>
440
+
441
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Collection.html#initialize-instance_method" title="AutoC::Collection#initialize (method)">AutoC::Collection</a></span></p>
442
+
443
+ </div>
444
+ <div id="method_missing_details" class="method_details_list">
445
+ <h2>Dynamic Method Handling</h2>
446
+ <p class="notice super">
447
+ This class handles dynamic methods through the <tt>method_missing</tt> method
448
+
449
+ in the class <span class='object_link'><a href="Type.html#method_missing-instance_method" title="AutoC::Type#method_missing (method)">AutoC::Type</a></span>
450
+
451
+ </p>
452
+
453
+ </div>
454
+
455
+
456
+ <div id="instance_method_details" class="method_details_list">
457
+ <h2>Instance Method Details</h2>
458
+
459
+
460
+ <div class="method_details first">
461
+ <h3 class="signature first" id="write_exported_declarations-instance_method">
462
+
463
+ - (<tt>Object</tt>) <strong>write_exported_declarations</strong>(stream, declare, define)
464
+
465
+
466
+
467
+
468
+
469
+ </h3><table class="source_code">
470
+ <tr>
471
+ <td>
472
+ <pre class="lines">
473
+
474
+
475
+ 224
476
+ 225
477
+ 226
478
+ 227
479
+ 228
480
+ 229
481
+ 230
482
+ 231
483
+ 232
484
+ 233
485
+ 234
486
+ 235
487
+ 236
488
+ 237
489
+ 238
490
+ 239
491
+ 240
492
+ 241
493
+ 242
494
+ 243
495
+ 244
496
+ 245
497
+ 246
498
+ 247
499
+ 248
500
+ 249
501
+ 250
502
+ 251
503
+ 252
504
+ 253
505
+ 254
506
+ 255
507
+ 256
508
+ 257</pre>
509
+ </td>
510
+ <td>
511
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/queue.rb', line 224</span>
512
+
513
+ <span class='kw'>def</span> <span class='id identifier rubyid_write_exported_declarations'>write_exported_declarations</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='comma'>,</span> <span class='id identifier rubyid_declare'>declare</span><span class='comma'>,</span> <span class='id identifier rubyid_define'>define</span><span class='rparen'>)</span>
514
+ <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
515
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ctor'>ctor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
516
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dtor'>dtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
517
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_copy'>copy</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
518
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_equal'>equal</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
519
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> size_t </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_identify'>identify</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
520
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_purge'>purge</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
521
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peek'>peek</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peekHead'>peekHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self)
522
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peekHead'>peekHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
523
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peekTail'>peekTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
524
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_push'>push</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, element) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pushTail'>pushTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, element)
525
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pushTail'>pushTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>);
526
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pushHead'>pushHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>);
527
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pop'>pop</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_popHead'>popHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self)
528
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_popHead'>popHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
529
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_popTail'>popTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
530
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contains'>contains</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>);
531
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_find'>find</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>);
532
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_replace'>replace</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, with) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_replaceEx'>replaceEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, with, 1)
533
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_replaceAll'>replaceAll</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, with) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_replaceEx'>replaceEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, with, -1)
534
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_replaceEx'>replaceEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>, int);
535
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_remove'>remove</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, what) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_removeEx'>removeEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, what, 1)
536
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_removeAll'>removeAll</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, what) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_removeEx'>removeEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, what, -1)
537
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_removeEx'>removeEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>, int);
538
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> size_t </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
539
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_empty'>empty</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self) (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self) == 0)
540
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtor'>itCtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
541
+ #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtor'>itCtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, type) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtorEx'>itCtorEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, type, 1)
542
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtorEx'>itCtorEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>*, int);
543
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itMove'>itMove</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
544
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itGet'>itGet</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
545
+ </span><span class='tstring_end'>$</span></span>
546
+ <span class='kw'>end</span></pre>
547
+ </td>
548
+ </tr>
549
+ </table>
550
+ </div>
551
+
552
+ <div class="method_details ">
553
+ <h3 class="signature " id="write_exported_types-instance_method">
554
+
555
+ - (<tt>Object</tt>) <strong>write_exported_types</strong>(stream)
556
+
557
+
558
+
559
+
560
+
561
+ </h3><table class="source_code">
562
+ <tr>
563
+ <td>
564
+ <pre class="lines">
565
+
566
+
567
+ 196
568
+ 197
569
+ 198
570
+ 199
571
+ 200
572
+ 201
573
+ 202
574
+ 203
575
+ 204
576
+ 205
577
+ 206
578
+ 207
579
+ 208
580
+ 209
581
+ 210
582
+ 211
583
+ 212
584
+ 213
585
+ 214
586
+ 215
587
+ 216
588
+ 217
589
+ 218
590
+ 219
591
+ 220
592
+ 221
593
+ 222</pre>
594
+ </td>
595
+ <td>
596
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/queue.rb', line 196</span>
597
+
598
+ <span class='kw'>def</span> <span class='id identifier rubyid_write_exported_types'>write_exported_types</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span>
599
+ <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
600
+ /***
601
+ **** </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&lt;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt; (</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>)
602
+ ***/
603
+ </span><span class='tstring_end'>$</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_public?'>public?</span>
604
+ <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
605
+ typedef struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
606
+ typedef struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
607
+ typedef struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
608
+ struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> {
609
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* head_node;
610
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* tail_node;
611
+ size_t node_count;
612
+ };
613
+ struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'> {
614
+ int start, forward;
615
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* queue;
616
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* this_node;
617
+ };
618
+ struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'> {
619
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> element;
620
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* prev_node;
621
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* next_node;
622
+ };
623
+ </span><span class='tstring_end'>$</span></span>
624
+ <span class='kw'>end</span></pre>
625
+ </td>
626
+ </tr>
627
+ </table>
628
+ </div>
629
+
630
+ <div class="method_details ">
631
+ <h3 class="signature " id="write_implementations-instance_method">
632
+
633
+ - (<tt>Object</tt>) <strong>write_implementations</strong>(stream, define)
634
+
635
+
636
+
637
+
638
+
639
+ </h3><table class="source_code">
640
+ <tr>
641
+ <td>
642
+ <pre class="lines">
643
+
644
+
645
+ 259
646
+ 260
647
+ 261
648
+ 262
649
+ 263
650
+ 264
651
+ 265
652
+ 266
653
+ 267
654
+ 268
655
+ 269
656
+ 270
657
+ 271
658
+ 272
659
+ 273
660
+ 274
661
+ 275
662
+ 276
663
+ 277
664
+ 278
665
+ 279
666
+ 280
667
+ 281
668
+ 282
669
+ 283
670
+ 284
671
+ 285
672
+ 286
673
+ 287
674
+ 288
675
+ 289
676
+ 290
677
+ 291
678
+ 292
679
+ 293
680
+ 294
681
+ 295
682
+ 296
683
+ 297
684
+ 298
685
+ 299
686
+ 300
687
+ 301
688
+ 302
689
+ 303
690
+ 304
691
+ 305
692
+ 306
693
+ 307
694
+ 308
695
+ 309
696
+ 310
697
+ 311
698
+ 312
699
+ 313
700
+ 314
701
+ 315
702
+ 316
703
+ 317
704
+ 318
705
+ 319
706
+ 320
707
+ 321
708
+ 322
709
+ 323
710
+ 324
711
+ 325
712
+ 326
713
+ 327
714
+ 328
715
+ 329
716
+ 330
717
+ 331
718
+ 332
719
+ 333
720
+ 334
721
+ 335
722
+ 336
723
+ 337
724
+ 338
725
+ 339
726
+ 340
727
+ 341
728
+ 342
729
+ 343
730
+ 344
731
+ 345
732
+ 346
733
+ 347
734
+ 348
735
+ 349
736
+ 350
737
+ 351
738
+ 352
739
+ 353
740
+ 354
741
+ 355
742
+ 356
743
+ 357
744
+ 358
745
+ 359
746
+ 360
747
+ 361
748
+ 362
749
+ 363
750
+ 364
751
+ 365
752
+ 366
753
+ 367
754
+ 368
755
+ 369
756
+ 370
757
+ 371
758
+ 372
759
+ 373
760
+ 374
761
+ 375
762
+ 376
763
+ 377
764
+ 378
765
+ 379
766
+ 380
767
+ 381
768
+ 382
769
+ 383
770
+ 384
771
+ 385
772
+ 386
773
+ 387
774
+ 388
775
+ 389
776
+ 390
777
+ 391
778
+ 392
779
+ 393
780
+ 394
781
+ 395
782
+ 396
783
+ 397
784
+ 398
785
+ 399
786
+ 400
787
+ 401
788
+ 402
789
+ 403
790
+ 404
791
+ 405
792
+ 406
793
+ 407
794
+ 408
795
+ 409
796
+ 410
797
+ 411
798
+ 412
799
+ 413
800
+ 414
801
+ 415
802
+ 416
803
+ 417
804
+ 418
805
+ 419
806
+ 420
807
+ 421
808
+ 422
809
+ 423
810
+ 424
811
+ 425
812
+ 426
813
+ 427
814
+ 428
815
+ 429
816
+ 430
817
+ 431
818
+ 432
819
+ 433
820
+ 434
821
+ 435
822
+ 436
823
+ 437
824
+ 438
825
+ 439
826
+ 440
827
+ 441
828
+ 442
829
+ 443
830
+ 444
831
+ 445
832
+ 446
833
+ 447
834
+ 448
835
+ 449
836
+ 450
837
+ 451
838
+ 452
839
+ 453
840
+ 454
841
+ 455
842
+ 456
843
+ 457
844
+ 458
845
+ 459
846
+ 460
847
+ 461
848
+ 462
849
+ 463
850
+ 464
851
+ 465
852
+ 466
853
+ 467
854
+ 468
855
+ 469
856
+ 470
857
+ 471
858
+ 472
859
+ 473
860
+ 474
861
+ 475
862
+ 476
863
+ 477
864
+ 478
865
+ 479
866
+ 480
867
+ 481
868
+ 482
869
+ 483
870
+ 484
871
+ 485
872
+ 486
873
+ 487
874
+ 488
875
+ 489
876
+ 490
877
+ 491
878
+ 492
879
+ 493
880
+ 494
881
+ 495
882
+ 496
883
+ 497
884
+ 498
885
+ 499
886
+ 500
887
+ 501
888
+ 502
889
+ 503
890
+ 504
891
+ 505
892
+ 506
893
+ 507
894
+ 508
895
+ 509</pre>
896
+ </td>
897
+ <td>
898
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/queue.rb', line 259</span>
899
+
900
+ <span class='kw'>def</span> <span class='id identifier rubyid_write_implementations'>write_implementations</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='comma'>,</span> <span class='id identifier rubyid_define'>define</span><span class='rparen'>)</span>
901
+ <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
902
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itGetRef'>itGetRef</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>*);
903
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ctor'>ctor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
904
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
905
+ self-&gt;head_node = self-&gt;tail_node = NULL;
906
+ self-&gt;node_count = 0;
907
+ }
908
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dtor'>dtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
909
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
910
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
911
+ node = self-&gt;head_node;
912
+ while(node) {
913
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* this_node = node;
914
+ node = node-&gt;next_node;
915
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_dtor'>dtor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>this_node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
916
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_free'>free</span><span class='embexpr_end'>}</span><span class='tstring_content'>(this_node);
917
+ }
918
+ }
919
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_copy'>copy</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* dst, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* src) {
920
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'> it;
921
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(src);
922
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(dst);
923
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ctor'>ctor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(dst);
924
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtor'>itCtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;it, src);
925
+ while(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itMove'>itMove</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;it)) {
926
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> element;
927
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pushTail'>pushTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(dst, element = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itGet'>itGet</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;it));
928
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_dtor'>dtor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
929
+ }
930
+ }
931
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_equal'>equal</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* lt, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* rt) {
932
+ if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(lt) == </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(rt)) {
933
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'> lit, rit;
934
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtor'>itCtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;lit, lt);
935
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtor'>itCtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;rit, rt);
936
+ while(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itMove'>itMove</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;lit) &amp;&amp; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itMove'>itMove</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;rit)) {
937
+ int equal;
938
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> *le, *re;
939
+ le = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itGetRef'>itGetRef</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;lit);
940
+ re = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itGetRef'>itGetRef</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;rit);
941
+ equal = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_equal'>equal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*le</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*re</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
942
+ if(!equal) return 0;
943
+ }
944
+ return 1;
945
+ } else
946
+ return 0;
947
+ }
948
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> size_t </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_identify'>identify</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
949
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
950
+ size_t result = 0;
951
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
952
+ for(node = self-&gt;head_node; node != NULL; node = node-&gt;next_node) {
953
+ result ^= </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_identify'>identify</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
954
+ result = AUTOC_RCYCLE(result);
955
+ }
956
+ return result;
957
+ }
958
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_purge'>purge</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
959
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dtor'>dtor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
960
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ctor'>ctor</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
961
+ }
962
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peekHead'>peekHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
963
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> result;
964
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
965
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(!</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_empty'>empty</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self));
966
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>result</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;head_node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
967
+ return result;
968
+ }
969
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peekTail'>peekTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
970
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> result;
971
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
972
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(!</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_empty'>empty</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self));
973
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>result</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;tail_node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
974
+ return result;
975
+ }
976
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_popHead'>popHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
977
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
978
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> result;
979
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
980
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(!</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_empty'>empty</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self));
981
+ node = self-&gt;head_node;
982
+ result = node-&gt;element;
983
+ self-&gt;head_node = self-&gt;head_node-&gt;next_node;
984
+ self-&gt;head_node-&gt;prev_node = NULL;
985
+ --self-&gt;node_count;
986
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_free'>free</span><span class='embexpr_end'>}</span><span class='tstring_content'>(node);
987
+ return result;
988
+ }
989
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_popTail'>popTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
990
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
991
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> result;
992
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
993
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(!</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_empty'>empty</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self));
994
+ node = self-&gt;tail_node;
995
+ result = node-&gt;element;
996
+ self-&gt;tail_node = self-&gt;tail_node-&gt;prev_node;
997
+ self-&gt;tail_node-&gt;next_node = NULL;
998
+ --self-&gt;node_count;
999
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_free'>free</span><span class='embexpr_end'>}</span><span class='tstring_content'>(node);
1000
+ return result;
1001
+ }
1002
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pushTail'>pushTail</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> element) {
1003
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
1004
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1005
+ node = (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>*)</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_malloc'>malloc</span><span class='embexpr_end'>}</span><span class='tstring_content'>(sizeof(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>)); </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(node);
1006
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
1007
+ if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_empty'>empty</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self)) {
1008
+ node-&gt;prev_node = node-&gt;next_node = NULL;
1009
+ self-&gt;tail_node = self-&gt;head_node = node;
1010
+ } else {
1011
+ node-&gt;next_node = NULL;
1012
+ node-&gt;prev_node = self-&gt;tail_node;
1013
+ self-&gt;tail_node-&gt;next_node = node;
1014
+ self-&gt;tail_node = node;
1015
+ }
1016
+ ++self-&gt;node_count;
1017
+ }
1018
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pushHead'>pushHead</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> element) {
1019
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
1020
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1021
+ node = (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>*)</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_malloc'>malloc</span><span class='embexpr_end'>}</span><span class='tstring_content'>(sizeof(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>)); </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(node);
1022
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
1023
+ if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_empty'>empty</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self)) {
1024
+ node-&gt;prev_node = node-&gt;next_node = NULL;
1025
+ self-&gt;tail_node = self-&gt;head_node = node;
1026
+ } else {
1027
+ node-&gt;prev_node = NULL;
1028
+ node-&gt;next_node = self-&gt;head_node;
1029
+ self-&gt;head_node-&gt;prev_node = node;
1030
+ self-&gt;head_node = node;
1031
+ }
1032
+ ++self-&gt;node_count;
1033
+ }
1034
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contains'>contains</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> what) {
1035
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
1036
+ int found = 0;
1037
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1038
+ node = self-&gt;head_node;
1039
+ while(node) {
1040
+ if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_equal'>equal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>what</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
1041
+ found = 1;
1042
+ break;
1043
+ }
1044
+ node = node-&gt;next_node;
1045
+ }
1046
+ return found;
1047
+ }
1048
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_find'>find</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> what) {
1049
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
1050
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1051
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contains'>contains</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, what));
1052
+ node = self-&gt;head_node;
1053
+ while(node) {
1054
+ if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_equal'>equal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>what</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
1055
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> result;
1056
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>result</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
1057
+ return result;
1058
+ }
1059
+ node = node-&gt;next_node;
1060
+ }
1061
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_abort'>abort</span><span class='embexpr_end'>}</span><span class='tstring_content'>();
1062
+ }
1063
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_replaceEx'>replaceEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> with, int count) {
1064
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
1065
+ int replaced = 0;
1066
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1067
+ if(count == 0) return 0;
1068
+ node = self-&gt;head_node;
1069
+ while(node) {
1070
+ if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_equal'>equal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>with</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
1071
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_dtor'>dtor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
1072
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>with</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
1073
+ ++replaced;
1074
+ if(count &gt; 0 &amp;&amp; replaced &gt;= count) break;
1075
+ }
1076
+ node = node-&gt;next_node;
1077
+ }
1078
+ return replaced;
1079
+ }
1080
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_removeEx'>removeEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> what, int count) {
1081
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* node;
1082
+ int removed = 0;
1083
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1084
+ if(count == 0) return 0;
1085
+ node = self-&gt;head_node;
1086
+ while(node) {
1087
+ if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_equal'>equal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>what</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
1088
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>* this_node;
1089
+ if(node == self-&gt;head_node) {
1090
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(!node-&gt;prev_node);
1091
+ this_node = self-&gt;head_node = node-&gt;next_node;
1092
+ if(self-&gt;head_node) self-&gt;head_node-&gt;prev_node = NULL;
1093
+ } else if(node == self-&gt;tail_node) {
1094
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(!node-&gt;next_node);
1095
+ self-&gt;tail_node = node-&gt;prev_node;
1096
+ this_node = self-&gt;tail_node-&gt;next_node = NULL;
1097
+ } else {
1098
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(node-&gt;prev_node);
1099
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(node-&gt;next_node);
1100
+ this_node = node-&gt;next_node;
1101
+ node-&gt;next_node-&gt;prev_node = node-&gt;prev_node;
1102
+ node-&gt;prev_node-&gt;next_node = node-&gt;next_node;
1103
+ }
1104
+ ++removed;
1105
+ --self-&gt;node_count;
1106
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_dtor'>dtor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
1107
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_free'>free</span><span class='embexpr_end'>}</span><span class='tstring_content'>(node);
1108
+ node = this_node;
1109
+ if(count &gt; 0 &amp;&amp; removed &gt;= count) break;
1110
+ } else {
1111
+ node = node-&gt;next_node;
1112
+ }
1113
+ }
1114
+ return removed;
1115
+ }
1116
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> size_t </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
1117
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1118
+ return self-&gt;node_count;
1119
+ }
1120
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itCtorEx'>itCtorEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* queue, int forward) {
1121
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1122
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(queue);
1123
+ self-&gt;start = 1;
1124
+ self-&gt;queue = queue;
1125
+ self-&gt;forward = forward;
1126
+ }
1127
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itMove'>itMove</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
1128
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1129
+ if(self-&gt;start) {
1130
+ self-&gt;this_node = self-&gt;forward ? self-&gt;queue-&gt;head_node : self-&gt;queue-&gt;tail_node;
1131
+ self-&gt;start = 0;
1132
+ } else {
1133
+ self-&gt;this_node = self-&gt;forward ? self-&gt;this_node-&gt;next_node : self-&gt;this_node-&gt;prev_node;
1134
+ }
1135
+ return self-&gt;this_node != NULL;
1136
+ }
1137
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itGet'>itGet</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
1138
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> result;
1139
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1140
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self-&gt;this_node);
1141
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>result</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;this_node-&gt;element</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
1142
+ return result;
1143
+ }
1144
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>* </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_itGetRef'>itGetRef</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'>* self) {
1145
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
1146
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self-&gt;this_node);
1147
+ return &amp;self-&gt;this_node-&gt;element;
1148
+ }
1149
+ </span><span class='tstring_end'>$</span></span>
1150
+ <span class='kw'>end</span></pre>
1151
+ </td>
1152
+ </tr>
1153
+ </table>
1154
+ </div>
1155
+
1156
+ </div>
1157
+
1158
+ </div>
1159
+
1160
+ <div id="footer">
1161
+ Generated on Fri Jun 6 18:05:35 2014 by
1162
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1163
+ 0.8.7.4 (ruby-2.0.0).
1164
+ </div>
1165
+
1166
+ </body>
1167
+ </html>