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