autoc 1.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/Collection.html
DELETED
@@ -1,1214 +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::Collection
|
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::Collection";
|
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 (C)</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">Collection</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::Collection
|
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="Type.html" title="AutoC::Type (class)">Type</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">AutoC::Collection</li>
|
84
|
-
|
85
|
-
</ul>
|
86
|
-
<a href="#" class="inheritanceTree">show all</a>
|
87
|
-
|
88
|
-
</dd>
|
89
|
-
</dl>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<dl>
|
97
|
-
<dt>Includes:</dt>
|
98
|
-
<dd>Redirecting</dd>
|
99
|
-
</dl>
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<dl>
|
107
|
-
<dt>Defined in:</dt>
|
108
|
-
<dd>lib/autoc/collection.rb</dd>
|
109
|
-
</dl>
|
110
|
-
|
111
|
-
</div>
|
112
|
-
|
113
|
-
<h2>Overview</h2><div class="docstring">
|
114
|
-
<div class="discussion">
|
115
|
-
<div class="sect1">
|
116
|
-
<h2 id="_implemented_types">Implemented types</h2>
|
117
|
-
<div class="sectionbody">
|
118
|
-
<div class="ulist">
|
119
|
-
<ul>
|
120
|
-
<li>
|
121
|
-
<p><span class='object_link'><a href="UserDefinedType.html" title="AutoC::UserDefinedType (class)">UserDefinedType</a></span> user-defined custom type</p>
|
122
|
-
</li>
|
123
|
-
<li>
|
124
|
-
<p><span class='object_link'><a href="Reference.html" title="AutoC::Reference (class)">Reference</a></span> counted reference type</p>
|
125
|
-
</li>
|
126
|
-
<li>
|
127
|
-
<p><span class='object_link'><a href="String.html" title="AutoC::String (class)">String</a></span> string builder type with value semantics</p>
|
128
|
-
</li>
|
129
|
-
</ul>
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
<div class="sect1">
|
134
|
-
<h2 id="_implemented_collections">Implemented collections</h2>
|
135
|
-
<div class="sectionbody">
|
136
|
-
<div class="ulist">
|
137
|
-
<ul>
|
138
|
-
<li>
|
139
|
-
<p><span class='object_link'><a href="Vector.html" title="AutoC::Vector (class)">Vector</a></span> resizable array</p>
|
140
|
-
</li>
|
141
|
-
<li>
|
142
|
-
<p><span class='object_link'><a href="List.html" title="AutoC::List (class)">List</a></span> singly linked list</p>
|
143
|
-
</li>
|
144
|
-
<li>
|
145
|
-
<p><span class='object_link'><a href="Queue.html" title="AutoC::Queue (class)">Queue</a></span> doubly linked list</p>
|
146
|
-
</li>
|
147
|
-
<li>
|
148
|
-
<p><span class='object_link'><a href="HashSet.html" title="AutoC::HashSet (class)">HashSet</a></span> hash-based unordered set</p>
|
149
|
-
</li>
|
150
|
-
<li>
|
151
|
-
<p><span class='object_link'><a href="HashMap.html" title="AutoC::HashMap (class)">HashMap</a></span> hash-based unordered map</p>
|
152
|
-
</li>
|
153
|
-
<li>
|
154
|
-
<p><span class='object_link'><a href="TreeSet.html" title="AutoC::TreeSet (class)">TreeSet</a></span> tree-based sorted set</p>
|
155
|
-
</li>
|
156
|
-
<li>
|
157
|
-
<p><span class='object_link'><a href="TreeMap.html" title="AutoC::TreeMap (class)">TreeMap</a></span> tree-based sorted map</p>
|
158
|
-
</li>
|
159
|
-
</ul>
|
160
|
-
</div>
|
161
|
-
</div>
|
162
|
-
</div>
|
163
|
-
<div class="sect1">
|
164
|
-
<h2 id="_ruby_side_operation">Ruby side operation</h2>
|
165
|
-
<div class="sectionbody">
|
166
|
-
<div class="listingblock">
|
167
|
-
<div class="title">Complete example for generation of a list of integers collection:</div>
|
168
|
-
<div class="content">
|
169
|
-
<pre class="highlight"><code class="language-ruby" data-lang="ruby">require "autoc"
|
170
|
-
AutoC::Module.generate!(:Test) do |c|
|
171
|
-
c << AutoC::List.new(:IntList, :int)
|
172
|
-
end</code></pre>
|
173
|
-
</div>
|
174
|
-
</div>
|
175
|
-
<div class="paragraph">
|
176
|
-
<p>In the above example a C module Test represented by the C header test_auto.h and the C source test_auto.c is generated.
|
177
|
-
The C++ counterpart of the generated collection is std::forward_list<int>.</p>
|
178
|
-
</div>
|
179
|
-
</div>
|
180
|
-
</div>
|
181
|
-
<div class="sect1">
|
182
|
-
<h2 id="_c_interface">C interface</h2>
|
183
|
-
<div class="sectionbody">
|
184
|
-
<div class="sect2">
|
185
|
-
<h3 id="_element_types_values_references">Element types: values, references</h3>
|
186
|
-
<div class="paragraph">
|
187
|
-
<p>Collections may contain both value and reference types, including other collections.</p>
|
188
|
-
</div>
|
189
|
-
</div>
|
190
|
-
<div class="sect2">
|
191
|
-
<h3 id="_thread_safety">Thread safety</h3>
|
192
|
-
<div class="admonitionblock warning">
|
193
|
-
<table>
|
194
|
-
<tr>
|
195
|
-
<td class="icon">
|
196
|
-
<div class="title">Warning</div>
|
197
|
-
</td>
|
198
|
-
<td class="content">
|
199
|
-
In its current state the implemented collections are <strong>not</strong> thread-safe.
|
200
|
-
</td>
|
201
|
-
</tr>
|
202
|
-
</table>
|
203
|
-
</div>
|
204
|
-
</div>
|
205
|
-
<div class="sect2">
|
206
|
-
<h3 id="_iteration">Iteration</h3>
|
207
|
-
<div class="paragraph">
|
208
|
-
<p>At the moment a fairly simple iteration functionality is implemented.
|
209
|
-
The iterators are modeled after the C# language.
|
210
|
-
All implemented iterators do not require destruction after use.</p>
|
211
|
-
</div>
|
212
|
-
<div class="listingblock">
|
213
|
-
<div class="title">Basic iterator usage example:</div>
|
214
|
-
<div class="content">
|
215
|
-
<pre class="highlight"><code class="language-c" data-lang="c">MyVector c;
|
216
|
-
MyVectorIt it;
|
217
|
-
...
|
218
|
-
MyVectorItCtor(&it, &c);
|
219
|
-
while(MyVectorItMove(&it)) {
|
220
|
-
Element e = MyVectorItGet(&it);
|
221
|
-
...
|
222
|
-
ElementDtor(e);
|
223
|
-
}</code></pre>
|
224
|
-
</div>
|
225
|
-
</div>
|
226
|
-
<div class="admonitionblock warning">
|
227
|
-
<table>
|
228
|
-
<tr>
|
229
|
-
<td class="icon">
|
230
|
-
<div class="title">Warning</div>
|
231
|
-
</td>
|
232
|
-
<td class="content">
|
233
|
-
the collection being iterated <strong>must not</strong> be modified in any way otherwise the iterator behavior is undefined.
|
234
|
-
</td>
|
235
|
-
</tr>
|
236
|
-
</table>
|
237
|
-
</div>
|
238
|
-
</div>
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
|
242
|
-
</div>
|
243
|
-
</div>
|
244
|
-
<div class="tags">
|
245
|
-
|
246
|
-
|
247
|
-
</div><div id="subclasses">
|
248
|
-
<h2>Direct Known Subclasses</h2>
|
249
|
-
<p class="children"><span class='object_link'><a href="HashMap.html" title="AutoC::HashMap (class)">HashMap</a></span>, <span class='object_link'><a href="HashSet.html" title="AutoC::HashSet (class)">HashSet</a></span>, <span class='object_link'><a href="List.html" title="AutoC::List (class)">List</a></span>, <span class='object_link'><a href="Queue.html" title="AutoC::Queue (class)">Queue</a></span>, <span class='object_link'><a href="TreeMap.html" title="AutoC::TreeMap (class)">TreeMap</a></span>, <span class='object_link'><a href="TreeSet.html" title="AutoC::TreeSet (class)">TreeSet</a></span>, <span class='object_link'><a href="Vector.html" title="AutoC::Vector (class)">Vector</a></span></p>
|
250
|
-
</div>
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
256
|
-
<ul class="summary">
|
257
|
-
|
258
|
-
<li class="public ">
|
259
|
-
<span class="summary_signature">
|
260
|
-
|
261
|
-
<a href="#element-instance_method" title="#element (instance method)">#<strong>element</strong> ⇒ Object </a>
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
</span>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
<span class="note title readonly">readonly</span>
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
281
|
-
<p>Returns the value of attribute element.</p>
|
282
|
-
</div></div></span>
|
283
|
-
|
284
|
-
</li>
|
285
|
-
|
286
|
-
|
287
|
-
<li class="public ">
|
288
|
-
<span class="summary_signature">
|
289
|
-
|
290
|
-
<a href="#it_ref-instance_method" title="#it_ref (instance method)">#<strong>it_ref</strong> ⇒ Object </a>
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
</span>
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
<span class="note title readonly">readonly</span>
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
310
|
-
<p>Returns the value of attribute it_ref.</p>
|
311
|
-
</div></div></span>
|
312
|
-
|
313
|
-
</li>
|
314
|
-
|
315
|
-
|
316
|
-
</ul>
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3>
|
323
|
-
<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>
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
<h2>
|
328
|
-
Instance Method Summary
|
329
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
330
|
-
</h2>
|
331
|
-
|
332
|
-
<ul class="summary">
|
333
|
-
|
334
|
-
<li class="public ">
|
335
|
-
<span class="summary_signature">
|
336
|
-
|
337
|
-
<a href="#%3D%3D-instance_method" title="#== (instance method)">#<strong>==</strong>(other) ⇒ Object </a>
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
(also: #eql?)
|
342
|
-
|
343
|
-
</span>
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
354
|
-
|
355
|
-
</li>
|
356
|
-
|
357
|
-
|
358
|
-
<li class="public ">
|
359
|
-
<span class="summary_signature">
|
360
|
-
|
361
|
-
<a href="#comparable%3F-instance_method" title="#comparable? (instance method)">#<strong>comparable?</strong> ⇒ Boolean </a>
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
</span>
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
376
|
-
<p>Collection always has equality tester but the element is required to be comparable on its own because collection comparison incurs comparison of all contained elements.</p>
|
377
|
-
</div></div></span>
|
378
|
-
|
379
|
-
</li>
|
380
|
-
|
381
|
-
|
382
|
-
<li class="public ">
|
383
|
-
<span class="summary_signature">
|
384
|
-
|
385
|
-
<a href="#constructible%3F-instance_method" title="#constructible? (instance method)">#<strong>constructible?</strong> ⇒ Boolean </a>
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
</span>
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
400
|
-
<p>Collection always has default constructor.</p>
|
401
|
-
</div></div></span>
|
402
|
-
|
403
|
-
</li>
|
404
|
-
|
405
|
-
|
406
|
-
<li class="public ">
|
407
|
-
<span class="summary_signature">
|
408
|
-
|
409
|
-
<a href="#copyable%3F-instance_method" title="#copyable? (instance method)">#<strong>copyable?</strong> ⇒ Boolean </a>
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
</span>
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
424
|
-
<p>Collection always has copy constructor but the element is required to be copyable on its own because collection copying incurs copying of all contained elements.</p>
|
425
|
-
</div></div></span>
|
426
|
-
|
427
|
-
</li>
|
428
|
-
|
429
|
-
|
430
|
-
<li class="public ">
|
431
|
-
<span class="summary_signature">
|
432
|
-
|
433
|
-
<a href="#destructible%3F-instance_method" title="#destructible? (instance method)">#<strong>destructible?</strong> ⇒ Boolean </a>
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
</span>
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
448
|
-
<p>Collection always has destructor but the element is required to be destructible on its own because collection destruction incurs destruction of all contained elements.</p>
|
449
|
-
</div></div></span>
|
450
|
-
|
451
|
-
</li>
|
452
|
-
|
453
|
-
|
454
|
-
<li class="public ">
|
455
|
-
<span class="summary_signature">
|
456
|
-
|
457
|
-
<a href="#entities-instance_method" title="#entities (instance method)">#<strong>entities</strong> ⇒ Object </a>
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
</span>
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
472
|
-
|
473
|
-
</li>
|
474
|
-
|
475
|
-
|
476
|
-
<li class="public ">
|
477
|
-
<span class="summary_signature">
|
478
|
-
|
479
|
-
<a href="#hash-instance_method" title="#hash (instance method)">#<strong>hash</strong> ⇒ Object </a>
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
</span>
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
494
|
-
|
495
|
-
</li>
|
496
|
-
|
497
|
-
|
498
|
-
<li class="public ">
|
499
|
-
<span class="summary_signature">
|
500
|
-
|
501
|
-
<a href="#hashable%3F-instance_method" title="#hashable? (instance method)">#<strong>hashable?</strong> ⇒ Boolean </a>
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
</span>
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
516
|
-
<p>Collection always has hash calculation function but the element is required to be hashable on its own because collection comparison incurs hash calculation for all contained elements.</p>
|
517
|
-
</div></div></span>
|
518
|
-
|
519
|
-
</li>
|
520
|
-
|
521
|
-
|
522
|
-
<li class="public ">
|
523
|
-
<span class="summary_signature">
|
524
|
-
|
525
|
-
<a href="#initializable%3F-instance_method" title="#initializable? (instance method)">#<strong>initializable?</strong> ⇒ Boolean </a>
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
</span>
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
540
|
-
<p>Collection always has constructor.</p>
|
541
|
-
</div></div></span>
|
542
|
-
|
543
|
-
</li>
|
544
|
-
|
545
|
-
|
546
|
-
<li class="public ">
|
547
|
-
<span class="summary_signature">
|
548
|
-
|
549
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(type_name, element_type, visibility = :public) ⇒ Collection </a>
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
</span>
|
554
|
-
|
555
|
-
|
556
|
-
<span class="note title constructor">constructor</span>
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
<span class="summary_desc"><div class='inline'><div class="paragraph">
|
566
|
-
<p>A new instance of Collection.</p>
|
567
|
-
</div></div></span>
|
568
|
-
|
569
|
-
</li>
|
570
|
-
|
571
|
-
|
572
|
-
<li class="public ">
|
573
|
-
<span class="summary_signature">
|
574
|
-
|
575
|
-
<a href="#write_intf_decls-instance_method" title="#write_intf_decls (instance method)">#<strong>write_intf_decls</strong>(stream, declare, define) ⇒ Object </a>
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
</span>
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
590
|
-
|
591
|
-
</li>
|
592
|
-
|
593
|
-
|
594
|
-
</ul>
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3>
|
608
|
-
<p class="inherited"><span class='object_link'><a href="Type.html#abort-instance_method" title="AutoC::Type#abort (method)">#abort</a></span>, <span class='object_link'><a href="Type.html#assert-instance_method" title="AutoC::Type#assert (method)">#assert</a></span>, <span class='object_link'><a href="Type.html#calloc-instance_method" title="AutoC::Type#calloc (method)">#calloc</a></span>, <span class='object_link'><a href="Type.html#coerce-class_method" title="AutoC::Type.coerce (method)">coerce</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#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>
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Code.html" title="AutoC::Code (class)">Code</a></span></h3>
|
619
|
-
<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#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>
|
620
|
-
<div id="constructor_details" class="method_details_list">
|
621
|
-
<h2>Constructor Details</h2>
|
622
|
-
|
623
|
-
<div class="method_details first">
|
624
|
-
<h3 class="signature first" id="initialize-instance_method">
|
625
|
-
|
626
|
-
#<strong>initialize</strong>(type_name, element_type, visibility = :public) ⇒ <tt><span class='object_link'><a href="" title="AutoC::Collection (class)">Collection</a></span></tt>
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
</h3><div class="docstring">
|
633
|
-
<div class="discussion">
|
634
|
-
<div class="paragraph">
|
635
|
-
<p>Returns a new instance of Collection</p>
|
636
|
-
</div>
|
637
|
-
|
638
|
-
</div>
|
639
|
-
</div>
|
640
|
-
<div class="tags">
|
641
|
-
|
642
|
-
|
643
|
-
</div><table class="source_code">
|
644
|
-
<tr>
|
645
|
-
<td>
|
646
|
-
<pre class="lines">
|
647
|
-
|
648
|
-
|
649
|
-
93
|
650
|
-
94
|
651
|
-
95
|
652
|
-
96
|
653
|
-
97
|
654
|
-
98
|
655
|
-
99</pre>
|
656
|
-
</td>
|
657
|
-
<td>
|
658
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 93</span>
|
659
|
-
|
660
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_type_name'>type_name</span><span class='comma'>,</span> <span class='id identifier rubyid_element_type'>element_type</span><span class='comma'>,</span> <span class='id identifier rubyid_visibility'>visibility</span> <span class='op'>=</span> <span class='symbol'>:public</span><span class='rparen'>)</span>
|
661
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_type_name'>type_name</span><span class='comma'>,</span> <span class='id identifier rubyid_visibility'>visibility</span><span class='rparen'>)</span>
|
662
|
-
<span class='ivar'>@it_ref</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</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='tstring_end'>"</span></span>
|
663
|
-
<span class='ivar'>@element</span> <span class='op'>=</span> <span class='const'>Type</span><span class='period'>.</span><span class='id identifier rubyid_coerce'>coerce</span><span class='lparen'>(</span><span class='id identifier rubyid_element_type'>element_type</span><span class='rparen'>)</span>
|
664
|
-
<span class='id identifier rubyid_initialize_redirectors'>initialize_redirectors</span>
|
665
|
-
<span class='id identifier rubyid_element_requirement'>element_requirement</span><span class='lparen'>(</span><span class='id identifier rubyid_element'>element</span><span class='rparen'>)</span>
|
666
|
-
<span class='kw'>end</span></pre>
|
667
|
-
</td>
|
668
|
-
</tr>
|
669
|
-
</table>
|
670
|
-
</div>
|
671
|
-
|
672
|
-
</div>
|
673
|
-
<div id="method_missing_details" class="method_details_list">
|
674
|
-
<h2>Dynamic Method Handling</h2>
|
675
|
-
<p class="notice super">
|
676
|
-
This class handles dynamic methods through the <tt>method_missing</tt> method
|
677
|
-
|
678
|
-
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>
|
679
|
-
|
680
|
-
</p>
|
681
|
-
|
682
|
-
</div>
|
683
|
-
|
684
|
-
<div id="instance_attr_details" class="attr_details">
|
685
|
-
<h2>Instance Attribute Details</h2>
|
686
|
-
|
687
|
-
|
688
|
-
<span id=""></span>
|
689
|
-
<div class="method_details first">
|
690
|
-
<h3 class="signature first" id="element-instance_method">
|
691
|
-
|
692
|
-
#<strong>element</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
</h3><div class="docstring">
|
699
|
-
<div class="discussion">
|
700
|
-
<div class="paragraph">
|
701
|
-
<p>Returns the value of attribute element</p>
|
702
|
-
</div>
|
703
|
-
|
704
|
-
</div>
|
705
|
-
</div>
|
706
|
-
<div class="tags">
|
707
|
-
|
708
|
-
|
709
|
-
</div><table class="source_code">
|
710
|
-
<tr>
|
711
|
-
<td>
|
712
|
-
<pre class="lines">
|
713
|
-
|
714
|
-
|
715
|
-
83
|
716
|
-
84
|
717
|
-
85</pre>
|
718
|
-
</td>
|
719
|
-
<td>
|
720
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 83</span>
|
721
|
-
|
722
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_element'>element</span>
|
723
|
-
<span class='ivar'>@element</span>
|
724
|
-
<span class='kw'>end</span></pre>
|
725
|
-
</td>
|
726
|
-
</tr>
|
727
|
-
</table>
|
728
|
-
</div>
|
729
|
-
|
730
|
-
|
731
|
-
<span id=""></span>
|
732
|
-
<div class="method_details ">
|
733
|
-
<h3 class="signature " id="it_ref-instance_method">
|
734
|
-
|
735
|
-
#<strong>it_ref</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
</h3><div class="docstring">
|
742
|
-
<div class="discussion">
|
743
|
-
<div class="paragraph">
|
744
|
-
<p>Returns the value of attribute it_ref</p>
|
745
|
-
</div>
|
746
|
-
|
747
|
-
</div>
|
748
|
-
</div>
|
749
|
-
<div class="tags">
|
750
|
-
|
751
|
-
|
752
|
-
</div><table class="source_code">
|
753
|
-
<tr>
|
754
|
-
<td>
|
755
|
-
<pre class="lines">
|
756
|
-
|
757
|
-
|
758
|
-
83
|
759
|
-
84
|
760
|
-
85</pre>
|
761
|
-
</td>
|
762
|
-
<td>
|
763
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 83</span>
|
764
|
-
|
765
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_it_ref'>it_ref</span>
|
766
|
-
<span class='ivar'>@it_ref</span>
|
767
|
-
<span class='kw'>end</span></pre>
|
768
|
-
</td>
|
769
|
-
</tr>
|
770
|
-
</table>
|
771
|
-
</div>
|
772
|
-
|
773
|
-
</div>
|
774
|
-
|
775
|
-
|
776
|
-
<div id="instance_method_details" class="method_details_list">
|
777
|
-
<h2>Instance Method Details</h2>
|
778
|
-
|
779
|
-
|
780
|
-
<div class="method_details first">
|
781
|
-
<h3 class="signature first" id="==-instance_method">
|
782
|
-
|
783
|
-
#<strong>==</strong>(other) ⇒ <tt>Object</tt>
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
<span class="aliases">Also known as:
|
788
|
-
<span class="names"><span id='eql?-instance_method'>eql?</span></span>
|
789
|
-
</span>
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
</h3><table class="source_code">
|
794
|
-
<tr>
|
795
|
-
<td>
|
796
|
-
<pre class="lines">
|
797
|
-
|
798
|
-
|
799
|
-
87</pre>
|
800
|
-
</td>
|
801
|
-
<td>
|
802
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 87</span>
|
803
|
-
|
804
|
-
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span> <span class='kw'>super</span> <span class='op'>&&</span> <span class='id identifier rubyid_element'>element</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_element'>element</span> <span class='kw'>end</span></pre>
|
805
|
-
</td>
|
806
|
-
</tr>
|
807
|
-
</table>
|
808
|
-
</div>
|
809
|
-
|
810
|
-
<div class="method_details ">
|
811
|
-
<h3 class="signature " id="comparable?-instance_method">
|
812
|
-
|
813
|
-
#<strong>comparable?</strong> ⇒ <tt>Boolean</tt>
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
</h3><div class="docstring">
|
820
|
-
<div class="discussion">
|
821
|
-
<div class="paragraph">
|
822
|
-
<p>Collection always has equality tester but the element is required to be comparable on its own
|
823
|
-
because collection comparison incurs comparison of all contained elements</p>
|
824
|
-
</div>
|
825
|
-
|
826
|
-
</div>
|
827
|
-
</div>
|
828
|
-
<div class="tags">
|
829
|
-
|
830
|
-
<p class="tag_title">Returns:</p>
|
831
|
-
<ul class="return">
|
832
|
-
|
833
|
-
<li>
|
834
|
-
|
835
|
-
|
836
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
</li>
|
841
|
-
|
842
|
-
</ul>
|
843
|
-
|
844
|
-
</div><table class="source_code">
|
845
|
-
<tr>
|
846
|
-
<td>
|
847
|
-
<pre class="lines">
|
848
|
-
|
849
|
-
|
850
|
-
120</pre>
|
851
|
-
</td>
|
852
|
-
<td>
|
853
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 120</span>
|
854
|
-
|
855
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_comparable?'>comparable?</span><span class='semicolon'>;</span> <span class='kw'>true</span> <span class='op'>&&</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_comparable?'>comparable?</span> <span class='kw'>end</span></pre>
|
856
|
-
</td>
|
857
|
-
</tr>
|
858
|
-
</table>
|
859
|
-
</div>
|
860
|
-
|
861
|
-
<div class="method_details ">
|
862
|
-
<h3 class="signature " id="constructible?-instance_method">
|
863
|
-
|
864
|
-
#<strong>constructible?</strong> ⇒ <tt>Boolean</tt>
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
</h3><div class="docstring">
|
871
|
-
<div class="discussion">
|
872
|
-
<div class="paragraph">
|
873
|
-
<p>Collection always has default constructor</p>
|
874
|
-
</div>
|
875
|
-
|
876
|
-
</div>
|
877
|
-
</div>
|
878
|
-
<div class="tags">
|
879
|
-
|
880
|
-
<p class="tag_title">Returns:</p>
|
881
|
-
<ul class="return">
|
882
|
-
|
883
|
-
<li>
|
884
|
-
|
885
|
-
|
886
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
</li>
|
891
|
-
|
892
|
-
</ul>
|
893
|
-
|
894
|
-
</div><table class="source_code">
|
895
|
-
<tr>
|
896
|
-
<td>
|
897
|
-
<pre class="lines">
|
898
|
-
|
899
|
-
|
900
|
-
105</pre>
|
901
|
-
</td>
|
902
|
-
<td>
|
903
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 105</span>
|
904
|
-
|
905
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_constructible?'>constructible?</span><span class='semicolon'>;</span> <span class='kw'>true</span> <span class='kw'>end</span></pre>
|
906
|
-
</td>
|
907
|
-
</tr>
|
908
|
-
</table>
|
909
|
-
</div>
|
910
|
-
|
911
|
-
<div class="method_details ">
|
912
|
-
<h3 class="signature " id="copyable?-instance_method">
|
913
|
-
|
914
|
-
#<strong>copyable?</strong> ⇒ <tt>Boolean</tt>
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
</h3><div class="docstring">
|
921
|
-
<div class="discussion">
|
922
|
-
<div class="paragraph">
|
923
|
-
<p>Collection always has copy constructor but the element is required to be copyable on its own
|
924
|
-
because collection copying incurs copying of all contained elements</p>
|
925
|
-
</div>
|
926
|
-
|
927
|
-
</div>
|
928
|
-
</div>
|
929
|
-
<div class="tags">
|
930
|
-
|
931
|
-
<p class="tag_title">Returns:</p>
|
932
|
-
<ul class="return">
|
933
|
-
|
934
|
-
<li>
|
935
|
-
|
936
|
-
|
937
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
</li>
|
942
|
-
|
943
|
-
</ul>
|
944
|
-
|
945
|
-
</div><table class="source_code">
|
946
|
-
<tr>
|
947
|
-
<td>
|
948
|
-
<pre class="lines">
|
949
|
-
|
950
|
-
|
951
|
-
116</pre>
|
952
|
-
</td>
|
953
|
-
<td>
|
954
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 116</span>
|
955
|
-
|
956
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_copyable?'>copyable?</span><span class='semicolon'>;</span> <span class='kw'>true</span> <span class='op'>&&</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copyable?'>copyable?</span> <span class='kw'>end</span></pre>
|
957
|
-
</td>
|
958
|
-
</tr>
|
959
|
-
</table>
|
960
|
-
</div>
|
961
|
-
|
962
|
-
<div class="method_details ">
|
963
|
-
<h3 class="signature " id="destructible?-instance_method">
|
964
|
-
|
965
|
-
#<strong>destructible?</strong> ⇒ <tt>Boolean</tt>
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
</h3><div class="docstring">
|
972
|
-
<div class="discussion">
|
973
|
-
<div class="paragraph">
|
974
|
-
<p>Collection always has destructor but the element is required to be destructible on its own
|
975
|
-
because collection destruction incurs destruction of all contained elements</p>
|
976
|
-
</div>
|
977
|
-
|
978
|
-
</div>
|
979
|
-
</div>
|
980
|
-
<div class="tags">
|
981
|
-
|
982
|
-
<p class="tag_title">Returns:</p>
|
983
|
-
<ul class="return">
|
984
|
-
|
985
|
-
<li>
|
986
|
-
|
987
|
-
|
988
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
</li>
|
993
|
-
|
994
|
-
</ul>
|
995
|
-
|
996
|
-
</div><table class="source_code">
|
997
|
-
<tr>
|
998
|
-
<td>
|
999
|
-
<pre class="lines">
|
1000
|
-
|
1001
|
-
|
1002
|
-
112</pre>
|
1003
|
-
</td>
|
1004
|
-
<td>
|
1005
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 112</span>
|
1006
|
-
|
1007
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_destructible?'>destructible?</span><span class='semicolon'>;</span> <span class='kw'>true</span> <span class='op'>&&</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_destructible?'>destructible?</span> <span class='kw'>end</span></pre>
|
1008
|
-
</td>
|
1009
|
-
</tr>
|
1010
|
-
</table>
|
1011
|
-
</div>
|
1012
|
-
|
1013
|
-
<div class="method_details ">
|
1014
|
-
<h3 class="signature " id="entities-instance_method">
|
1015
|
-
|
1016
|
-
#<strong>entities</strong> ⇒ <tt>Object</tt>
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
</h3><table class="source_code">
|
1023
|
-
<tr>
|
1024
|
-
<td>
|
1025
|
-
<pre class="lines">
|
1026
|
-
|
1027
|
-
|
1028
|
-
91</pre>
|
1029
|
-
</td>
|
1030
|
-
<td>
|
1031
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 91</span>
|
1032
|
-
|
1033
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_entities'>entities</span><span class='semicolon'>;</span> <span class='kw'>super</span> <span class='op'><<</span> <span class='id identifier rubyid_element'>element</span> <span class='kw'>end</span></pre>
|
1034
|
-
</td>
|
1035
|
-
</tr>
|
1036
|
-
</table>
|
1037
|
-
</div>
|
1038
|
-
|
1039
|
-
<div class="method_details ">
|
1040
|
-
<h3 class="signature " id="hash-instance_method">
|
1041
|
-
|
1042
|
-
#<strong>hash</strong> ⇒ <tt>Object</tt>
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
</h3><table class="source_code">
|
1049
|
-
<tr>
|
1050
|
-
<td>
|
1051
|
-
<pre class="lines">
|
1052
|
-
|
1053
|
-
|
1054
|
-
85</pre>
|
1055
|
-
</td>
|
1056
|
-
<td>
|
1057
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 85</span>
|
1058
|
-
|
1059
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hash'>hash</span><span class='semicolon'>;</span> <span class='kw'>super</span> <span class='op'>^</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span> <span class='kw'>end</span></pre>
|
1060
|
-
</td>
|
1061
|
-
</tr>
|
1062
|
-
</table>
|
1063
|
-
</div>
|
1064
|
-
|
1065
|
-
<div class="method_details ">
|
1066
|
-
<h3 class="signature " id="hashable?-instance_method">
|
1067
|
-
|
1068
|
-
#<strong>hashable?</strong> ⇒ <tt>Boolean</tt>
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
</h3><div class="docstring">
|
1075
|
-
<div class="discussion">
|
1076
|
-
<div class="paragraph">
|
1077
|
-
<p>Collection always has hash calculation function but the element is required to be hashable on its own
|
1078
|
-
because collection comparison incurs hash calculation for all contained elements</p>
|
1079
|
-
</div>
|
1080
|
-
|
1081
|
-
</div>
|
1082
|
-
</div>
|
1083
|
-
<div class="tags">
|
1084
|
-
|
1085
|
-
<p class="tag_title">Returns:</p>
|
1086
|
-
<ul class="return">
|
1087
|
-
|
1088
|
-
<li>
|
1089
|
-
|
1090
|
-
|
1091
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
</li>
|
1096
|
-
|
1097
|
-
</ul>
|
1098
|
-
|
1099
|
-
</div><table class="source_code">
|
1100
|
-
<tr>
|
1101
|
-
<td>
|
1102
|
-
<pre class="lines">
|
1103
|
-
|
1104
|
-
|
1105
|
-
126
|
1106
|
-
127
|
1107
|
-
128
|
1108
|
-
129</pre>
|
1109
|
-
</td>
|
1110
|
-
<td>
|
1111
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 126</span>
|
1112
|
-
|
1113
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hashable?'>hashable?</span>
|
1114
|
-
<span class='comment'># Since using collection as an element of a hash-based container also requires it to be comparable as well
|
1115
|
-
</span> <span class='id identifier rubyid_comparable?'>comparable?</span> <span class='op'>&&</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_hashable?'>hashable?</span>
|
1116
|
-
<span class='kw'>end</span></pre>
|
1117
|
-
</td>
|
1118
|
-
</tr>
|
1119
|
-
</table>
|
1120
|
-
</div>
|
1121
|
-
|
1122
|
-
<div class="method_details ">
|
1123
|
-
<h3 class="signature " id="initializable?-instance_method">
|
1124
|
-
|
1125
|
-
#<strong>initializable?</strong> ⇒ <tt>Boolean</tt>
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
</h3><div class="docstring">
|
1132
|
-
<div class="discussion">
|
1133
|
-
<div class="paragraph">
|
1134
|
-
<p>Collection always has constructor</p>
|
1135
|
-
</div>
|
1136
|
-
|
1137
|
-
</div>
|
1138
|
-
</div>
|
1139
|
-
<div class="tags">
|
1140
|
-
|
1141
|
-
<p class="tag_title">Returns:</p>
|
1142
|
-
<ul class="return">
|
1143
|
-
|
1144
|
-
<li>
|
1145
|
-
|
1146
|
-
|
1147
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
</li>
|
1152
|
-
|
1153
|
-
</ul>
|
1154
|
-
|
1155
|
-
</div><table class="source_code">
|
1156
|
-
<tr>
|
1157
|
-
<td>
|
1158
|
-
<pre class="lines">
|
1159
|
-
|
1160
|
-
|
1161
|
-
108</pre>
|
1162
|
-
</td>
|
1163
|
-
<td>
|
1164
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 108</span>
|
1165
|
-
|
1166
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initializable?'>initializable?</span><span class='semicolon'>;</span> <span class='kw'>true</span> <span class='kw'>end</span></pre>
|
1167
|
-
</td>
|
1168
|
-
</tr>
|
1169
|
-
</table>
|
1170
|
-
</div>
|
1171
|
-
|
1172
|
-
<div class="method_details ">
|
1173
|
-
<h3 class="signature " id="write_intf_decls-instance_method">
|
1174
|
-
|
1175
|
-
#<strong>write_intf_decls</strong>(stream, declare, define) ⇒ <tt>Object</tt>
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
</h3><table class="source_code">
|
1182
|
-
<tr>
|
1183
|
-
<td>
|
1184
|
-
<pre class="lines">
|
1185
|
-
|
1186
|
-
|
1187
|
-
131
|
1188
|
-
132
|
1189
|
-
133</pre>
|
1190
|
-
</td>
|
1191
|
-
<td>
|
1192
|
-
<pre class="code"><span class="info file"># File 'lib/autoc/collection.rb', line 131</span>
|
1193
|
-
|
1194
|
-
<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>
|
1195
|
-
<span class='id identifier rubyid_write_redirectors'>write_redirectors</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>
|
1196
|
-
<span class='kw'>end</span></pre>
|
1197
|
-
</td>
|
1198
|
-
</tr>
|
1199
|
-
</table>
|
1200
|
-
</div>
|
1201
|
-
|
1202
|
-
</div>
|
1203
|
-
|
1204
|
-
</div>
|
1205
|
-
|
1206
|
-
<div id="footer">
|
1207
|
-
Generated on Wed Oct 12 12:27:11 2016 by
|
1208
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1209
|
-
0.9.5 (ruby-2.3.1).
|
1210
|
-
</div>
|
1211
|
-
|
1212
|
-
</div>
|
1213
|
-
</body>
|
1214
|
-
</html>
|