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.
Files changed (110) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGES.md +3 -0
  3. data/README.md +149 -0
  4. data/cmake/AutoC.cmake +39 -0
  5. data/lib/autoc/allocators.rb +51 -0
  6. data/lib/autoc/association.rb +126 -0
  7. data/lib/autoc/box.rb +311 -0
  8. data/lib/autoc/cmake.rb +54 -0
  9. data/lib/autoc/collection.rb +83 -110
  10. data/lib/autoc/composite.rb +333 -0
  11. data/lib/autoc/cstring.rb +263 -0
  12. data/lib/autoc/function.rb +247 -0
  13. data/lib/autoc/hash_map.rb +328 -0
  14. data/lib/autoc/hash_set.rb +339 -0
  15. data/lib/autoc/hashers.rb +102 -0
  16. data/lib/autoc/list.rb +444 -0
  17. data/lib/autoc/module.rb +434 -0
  18. data/lib/autoc/openmp.rb +15 -0
  19. data/lib/autoc/primitive.rb +27 -0
  20. data/lib/autoc/ranges.rb +707 -0
  21. data/lib/autoc/record.rb +247 -0
  22. data/lib/autoc/scaffold/docs.rb +117 -0
  23. data/lib/autoc/scaffold/generic_value.rb +86 -0
  24. data/lib/autoc/scaffold/project.rb +75 -0
  25. data/lib/autoc/scaffold/test_cstring.rb +113 -0
  26. data/lib/autoc/scaffold/test_cstring_hash_set.rb +35 -0
  27. data/lib/autoc/scaffold/test_int_box.rb +22 -0
  28. data/lib/autoc/scaffold/test_int_hash_set.rb +448 -0
  29. data/lib/autoc/scaffold/test_int_list.rb +106 -0
  30. data/lib/autoc/scaffold/test_int_vector.rb +83 -0
  31. data/lib/autoc/scaffold/test_v2v_hash_map.rb +83 -0
  32. data/lib/autoc/scaffold/test_value_hash_set.rb +60 -0
  33. data/lib/autoc/scaffold/test_value_vector.rb +146 -0
  34. data/{test/test.rb → lib/autoc/scaffold/tests.rb} +179 -158
  35. data/lib/autoc/scaffold.rb +12 -0
  36. data/lib/autoc/sequential.rb +99 -0
  37. data/lib/autoc/set.rb +331 -0
  38. data/lib/autoc/std.rb +149 -0
  39. data/lib/autoc/type.rb +93 -531
  40. data/lib/autoc/vector.rb +290 -0
  41. data/lib/autoc.rb +4 -35
  42. metadata +55 -85
  43. data/.yardopts +0 -4
  44. data/CHANGES +0 -23
  45. data/README +0 -28
  46. data/doc/AutoC/Code.html +0 -523
  47. data/doc/AutoC/Collection.html +0 -1214
  48. data/doc/AutoC/HashMap.html +0 -1441
  49. data/doc/AutoC/HashSet.html +0 -916
  50. data/doc/AutoC/Iterators/Bidirectional.html +0 -204
  51. data/doc/AutoC/Iterators/Unidirectional.html +0 -200
  52. data/doc/AutoC/Iterators.html +0 -126
  53. data/doc/AutoC/List.html +0 -1039
  54. data/doc/AutoC/Maps.html +0 -290
  55. data/doc/AutoC/Module/File.html +0 -415
  56. data/doc/AutoC/Module/Header.html +0 -437
  57. data/doc/AutoC/Module/Source.html +0 -707
  58. data/doc/AutoC/Module.html +0 -948
  59. data/doc/AutoC/Priority.html +0 -138
  60. data/doc/AutoC/Queue.html +0 -1172
  61. data/doc/AutoC/Reference.html +0 -735
  62. data/doc/AutoC/Sets.html +0 -520
  63. data/doc/AutoC/String.html +0 -1394
  64. data/doc/AutoC/TreeMap.html +0 -1565
  65. data/doc/AutoC/TreeSet.html +0 -1447
  66. data/doc/AutoC/Type.html +0 -2148
  67. data/doc/AutoC/UserDefinedType.html +0 -1047
  68. data/doc/AutoC/Vector.html +0 -987
  69. data/doc/AutoC.html +0 -331
  70. data/doc/_index.html +0 -388
  71. data/doc/class_list.html +0 -51
  72. data/doc/css/common.css +0 -1
  73. data/doc/css/full_list.css +0 -58
  74. data/doc/css/style.css +0 -481
  75. data/doc/file.CHANGES.html +0 -117
  76. data/doc/file.README.html +0 -116
  77. data/doc/file_list.html +0 -61
  78. data/doc/frames.html +0 -17
  79. data/doc/index.html +0 -116
  80. data/doc/js/app.js +0 -243
  81. data/doc/js/full_list.js +0 -216
  82. data/doc/js/jquery.js +0 -4
  83. data/doc/method_list.html +0 -1307
  84. data/doc/top-level-namespace.html +0 -112
  85. data/lib/autoc/code.rb +0 -237
  86. data/lib/autoc/collection/hash_map.rb +0 -385
  87. data/lib/autoc/collection/hash_set.rb +0 -337
  88. data/lib/autoc/collection/iterator.rb +0 -39
  89. data/lib/autoc/collection/list.rb +0 -429
  90. data/lib/autoc/collection/map.rb +0 -41
  91. data/lib/autoc/collection/queue.rb +0 -517
  92. data/lib/autoc/collection/set.rb +0 -134
  93. data/lib/autoc/collection/tree_map.rb +0 -464
  94. data/lib/autoc/collection/tree_set.rb +0 -611
  95. data/lib/autoc/collection/vector.rb +0 -336
  96. data/lib/autoc/string.rb +0 -492
  97. data/test/test_auto.c +0 -7141
  98. data/test/test_auto.h +0 -753
  99. data/test/test_char_string.rb +0 -270
  100. data/test/test_int_list.rb +0 -35
  101. data/test/test_int_tree_set.rb +0 -111
  102. data/test/test_int_vector.rb +0 -34
  103. data/test/test_value_hash_map.rb +0 -162
  104. data/test/test_value_hash_set.rb +0 -173
  105. data/test/test_value_list.rb +0 -193
  106. data/test/test_value_queue.rb +0 -275
  107. data/test/test_value_tree_map.rb +0 -176
  108. data/test/test_value_tree_set.rb +0 -173
  109. data/test/test_value_vector.rb +0 -155
  110. data/test/value.rb +0 -80
@@ -1,987 +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::Vector
8
-
9
- &mdash; 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::Vector";
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 (V)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../AutoC.html" title="AutoC (module)">AutoC</a></span></span>
41
- &raquo;
42
- <span class="title">Vector</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::Vector
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::Vector</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/vector.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>Vector&lt; <strong><em>E</em></strong> &gt; is an ordered random access sequence container.</p>
119
- </div>
120
- <div class="paragraph">
121
- <p>The collection&#8217;s C++ counterpart is std::vector&lt;&gt; template class.</p>
122
- </div>
123
- <div class="sect1">
124
- <h2 id="_generated_c_interface">Generated C interface</h2>
125
- <div class="sectionbody">
126
- <div class="sect2">
127
- <h3 id="_collection_management">Collection management</h3>
128
- <table class="tableblock frame-all grid-all spread">
129
- <colgroup>
130
- <col style="width: 50%;">
131
- <col style="width: 50%;">
132
- </colgroup>
133
- <tbody>
134
- <tr>
135
- <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>
136
- <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new vector dst filled with the contents of src.
137
- A copy operation is performed on every element in src.
138
- </p><p class="tableblock">NOTE: Previous contents of dst is overwritten.</p></td>
139
- </tr>
140
- <tr>
141
- <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, <strong><em>size_t</em></strong> size)</p></td>
142
- <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new vector self of size size.
143
- The elements are initialized with either supplied or generated default parameterless constructor.
144
- </p><p class="tableblock">WARNING: size must be greater than zero.
145
- </p><p class="tableblock">NOTE: Previous contents of self is overwritten.</p></td>
146
- </tr>
147
- <tr>
148
- <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>
149
- <td class="tableblock halign-left valign-top"><p class="tableblock">Destroy vector self.
150
- Stored elements are destroyed as well by calling the respective destructors.</p></td>
151
- </tr>
152
- <tr>
153
- <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>
154
- <td class="tableblock halign-left valign-top"><p class="tableblock">Return non-zero value if vectors lt and rt are considered equal by contents and zero value otherwise.</p></td>
155
- </tr>
156
- <tr>
157
- <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>
158
- <td class="tableblock halign-left valign-top"><p class="tableblock">Return hash code for vector self.</p></td>
159
- </tr>
160
- </tbody>
161
- </table>
162
- </div>
163
- <div class="sect2">
164
- <h3 id="_basic_operations">Basic operations</h3>
165
- <table class="tableblock frame-all grid-all spread">
166
- <colgroup>
167
- <col style="width: 50%;">
168
- <col style="width: 50%;">
169
- </colgroup>
170
- <tbody>
171
- <tr>
172
- <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>Get(<strong><em>Type</em></strong> * self, <strong><em>size_t</em></strong> index)</p></td>
173
- <td class="tableblock halign-left valign-top"><p class="tableblock">Return a <em>copy</em> of the element stored in self at position index.
174
- </p><p class="tableblock">WARNING: index <strong>must</strong> be a valid index otherwise the behavior is undefined. See <sub>type</sub>Within().</p></td>
175
- </tr>
176
- <tr>
177
- <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Resize(<strong><em>Type</em></strong> * self, <strong><em>size_t</em></strong> size)</p></td>
178
- <td class="tableblock halign-left valign-top"><p class="tableblock">Set new size of vector self to size.
179
- </p><p class="tableblock">If new size is greater than the old one, extra elements are created with default parameterless constructors.
180
- If new size is smaller the the old one, excessive elements are destroyed.
181
- </p><p class="tableblock">WARNING: size <strong>must</strong> be greater than zero.</p></td>
182
- </tr>
183
- <tr>
184
- <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Set(<strong><em>Type</em></strong> * self, <strong><em>size_t</em></strong> index, <strong><em>E</em></strong> what)</p></td>
185
- <td class="tableblock halign-left valign-top"><p class="tableblock">Store a <em>copy</em> of the element what in vector self at position index destroying previous contents.
186
- </p><p class="tableblock">WARNING: index <strong>must</strong> be a valid index otherwise the behavior is undefined. See <sub>type</sub>Within().</p></td>
187
- </tr>
188
- <tr>
189
- <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>
190
- <td class="tableblock halign-left valign-top"><p class="tableblock">Return number of elements stored in vector self.</p></td>
191
- </tr>
192
- <tr>
193
- <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Sort(<strong><em>Type</em></strong> * self)</p></td>
194
- <td class="tableblock halign-left valign-top"><p class="tableblock">Perform an ascending sort.
195
- See <sub>type</sub>SortEx().
196
- </p><p class="tableblock">NOTE : optional operation.</p></td>
197
- </tr>
198
- <tr>
199
- <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>SortEx(<strong><em>Type</em></strong> * self, <strong><em>int</em></strong> ascending)</p></td>
200
- <td class="tableblock halign-left valign-top"><p class="tableblock">NOTE : optional operation.
201
- </p><p class="tableblock">Perform a sort operation on the contents of vector self utilizing either generated of user supplied ordering functions.
202
- If the ascending is non-zero, perform the sorting in ascending order otherwise perform the soring in descending order.
203
- </p><p class="tableblock">Note that this operation is defined only if element type is orderable, e.g. has equality testing and comparison operations defined.</p></td>
204
- </tr>
205
- <tr>
206
- <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Within(<strong><em>Type</em></strong> * self, <strong><em>size_t</em></strong> index)</p></td>
207
- <td class="tableblock halign-left valign-top"><p class="tableblock">Return non-zero value if index is a valid index and zero value otherwise.
208
- Valid index belongs to the range 0 &#8230;&#8203; <sub>type</sub>Size()-1.</p></td>
209
- </tr>
210
- </tbody>
211
- </table>
212
- </div>
213
- <div class="sect2">
214
- <h3 id="_iteration">Iteration</h3>
215
- <table class="tableblock frame-all grid-all spread">
216
- <colgroup>
217
- <col style="width: 50%;">
218
- <col style="width: 50%;">
219
- </colgroup>
220
- <tbody>
221
- <tr>
222
- <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>
223
- <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new forward iterator it on vector self.
224
- </p><p class="tableblock">NOTE: Previous contents of it is overwritten.</p></td>
225
- </tr>
226
- <tr>
227
- <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>
228
- <td class="tableblock halign-left valign-top"><p class="tableblock">Create a new iterator it on vector self.
229
- Non-zero value of forward specifies a forward iterator, zero value specifies a backward iterator.
230
- </p><p class="tableblock">NOTE: Previous contents of it is overwritten.</p></td>
231
- </tr>
232
- <tr>
233
- <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>
234
- <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>
235
- </tr>
236
- <tr>
237
- <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>
238
- <td class="tableblock halign-left valign-top"><p class="tableblock">Return a <em>copy</em> of current element pointed to by the iterator it.
239
- </p><p class="tableblock">WARNING: current position <strong>must</strong> be valid otherwise the behavior is undefined. See <sub>it</sub>Move().</p></td>
240
- </tr>
241
- </tbody>
242
- </table>
243
- </div>
244
- </div>
245
- </div>
246
-
247
- </div>
248
- </div>
249
- <div class="tags">
250
-
251
-
252
- </div>
253
-
254
-
255
-
256
-
257
-
258
- <h2>Instance Attribute Summary</h2>
259
-
260
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></h3>
261
- <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>
262
-
263
-
264
-
265
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3>
266
- <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>
267
-
268
-
269
-
270
- <h2>
271
- Instance Method Summary
272
- <small><a href="#" class="summary_toggle">collapse</a></small>
273
- </h2>
274
-
275
- <ul class="summary">
276
-
277
- <li class="public ">
278
- <span class="summary_signature">
279
-
280
- <a href="#constructible%3F-instance_method" title="#constructible? (instance method)">#<strong>constructible?</strong> &#x21d2; Boolean </a>
281
-
282
-
283
-
284
- </span>
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
- <span class="summary_desc"><div class='inline'><div class="paragraph">
295
- <p>No default constructor provided.</p>
296
- </div></div></span>
297
-
298
- </li>
299
-
300
-
301
- <li class="public ">
302
- <span class="summary_signature">
303
-
304
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args) &#x21d2; Vector </a>
305
-
306
-
307
-
308
- </span>
309
-
310
-
311
- <span class="note title constructor">constructor</span>
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
-
320
- <span class="summary_desc"><div class='inline'><div class="paragraph">
321
- <p>A new instance of Vector.</p>
322
- </div></div></span>
323
-
324
- </li>
325
-
326
-
327
- <li class="public ">
328
- <span class="summary_signature">
329
-
330
- <a href="#write_impls-instance_method" title="#write_impls (instance method)">#<strong>write_impls</strong>(stream, define) &#x21d2; Object </a>
331
-
332
-
333
-
334
- </span>
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
- <span class="summary_desc"><div class='inline'></div></span>
345
-
346
- </li>
347
-
348
-
349
- <li class="public ">
350
- <span class="summary_signature">
351
-
352
- <a href="#write_intf_decls-instance_method" title="#write_intf_decls (instance method)">#<strong>write_intf_decls</strong>(stream, declare, define) &#x21d2; Object </a>
353
-
354
-
355
-
356
- </span>
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
- <span class="summary_desc"><div class='inline'></div></span>
367
-
368
- </li>
369
-
370
-
371
- <li class="public ">
372
- <span class="summary_signature">
373
-
374
- <a href="#write_intf_types-instance_method" title="#write_intf_types (instance method)">#<strong>write_intf_types</strong>(stream) &#x21d2; Object </a>
375
-
376
-
377
-
378
- </span>
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
- <span class="summary_desc"><div class='inline'></div></span>
389
-
390
- </li>
391
-
392
-
393
- </ul>
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></h3>
412
- <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#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></p>
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3>
424
- <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#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#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>
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Code.html" title="AutoC::Code (class)">Code</a></span></h3>
435
- <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>
436
- <div id="constructor_details" class="method_details_list">
437
- <h2>Constructor Details</h2>
438
-
439
- <div class="method_details first">
440
- <h3 class="signature first" id="initialize-instance_method">
441
-
442
- #<strong>initialize</strong>(*args) &#x21d2; <tt><span class='object_link'><a href="" title="AutoC::Vector (class)">Vector</a></span></tt>
443
-
444
-
445
-
446
-
447
-
448
- </h3><div class="docstring">
449
- <div class="discussion">
450
- <div class="paragraph">
451
- <p>Returns a new instance of Vector</p>
452
- </div>
453
-
454
- </div>
455
- </div>
456
- <div class="tags">
457
-
458
-
459
- </div><table class="source_code">
460
- <tr>
461
- <td>
462
- <pre class="lines">
463
-
464
-
465
- 137
466
- 138
467
- 139
468
- 140
469
- 141
470
- 142</pre>
471
- </td>
472
- <td>
473
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 137</span>
474
-
475
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
476
- <span class='kw'>super</span>
477
- <span class='comment'># Override the default type constructor as the Vector&#39;s requires one extra parameter
478
- </span> <span class='comment'># Note that this makes the Vector instance non-constructible
479
- </span> <span class='ivar'>@ctor</span> <span class='op'>=</span> <span class='id identifier rubyid_define_redirector'>define_redirector</span><span class='lparen'>(</span><span class='symbol'>:ctor</span><span class='comma'>,</span> <span class='const'>Function</span><span class='op'>::</span><span class='const'>Signature</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_type_ref'>type_ref</span><span class='op'>^</span><span class='symbol'>:self</span><span class='comma'>,</span> <span class='symbol'>:size_t</span><span class='op'>^</span><span class='symbol'>:element_count</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span>
480
- <span class='kw'>end</span></pre>
481
- </td>
482
- </tr>
483
- </table>
484
- </div>
485
-
486
- </div>
487
- <div id="method_missing_details" class="method_details_list">
488
- <h2>Dynamic Method Handling</h2>
489
- <p class="notice super">
490
- This class handles dynamic methods through the <tt>method_missing</tt> method
491
-
492
- 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>
493
-
494
- </p>
495
-
496
- </div>
497
-
498
-
499
- <div id="instance_method_details" class="method_details_list">
500
- <h2>Instance Method Details</h2>
501
-
502
-
503
- <div class="method_details first">
504
- <h3 class="signature first" id="constructible?-instance_method">
505
-
506
- #<strong>constructible?</strong> &#x21d2; <tt>Boolean</tt>
507
-
508
-
509
-
510
-
511
-
512
- </h3><div class="docstring">
513
- <div class="discussion">
514
- <div class="paragraph">
515
- <p>No default constructor provided</p>
516
- </div>
517
-
518
- </div>
519
- </div>
520
- <div class="tags">
521
-
522
- <p class="tag_title">Returns:</p>
523
- <ul class="return">
524
-
525
- <li>
526
-
527
-
528
- <span class='type'>(<tt>Boolean</tt>)</span>
529
-
530
-
531
-
532
- </li>
533
-
534
- </ul>
535
-
536
- </div><table class="source_code">
537
- <tr>
538
- <td>
539
- <pre class="lines">
540
-
541
-
542
- 145</pre>
543
- </td>
544
- <td>
545
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 145</span>
546
-
547
- <span class='kw'>def</span> <span class='id identifier rubyid_constructible?'>constructible?</span><span class='semicolon'>;</span> <span class='kw'>false</span> <span class='kw'>end</span></pre>
548
- </td>
549
- </tr>
550
- </table>
551
- </div>
552
-
553
- <div class="method_details ">
554
- <h3 class="signature " id="write_impls-instance_method">
555
-
556
- #<strong>write_impls</strong>(stream, define) &#x21d2; <tt>Object</tt>
557
-
558
-
559
-
560
-
561
-
562
- </h3><table class="source_code">
563
- <tr>
564
- <td>
565
- <pre class="lines">
566
-
567
-
568
- 222
569
- 223
570
- 224
571
- 225
572
- 226
573
- 227
574
- 228
575
- 229
576
- 230
577
- 231
578
- 232
579
- 233
580
- 234
581
- 235
582
- 236
583
- 237
584
- 238
585
- 239
586
- 240
587
- 241
588
- 242
589
- 243
590
- 244
591
- 245
592
- 246
593
- 247
594
- 248
595
- 249
596
- 250
597
- 251
598
- 252
599
- 253
600
- 254
601
- 255
602
- 256
603
- 257
604
- 258
605
- 259
606
- 260
607
- 261
608
- 262
609
- 263
610
- 264
611
- 265
612
- 266
613
- 267
614
- 268
615
- 269
616
- 270
617
- 271
618
- 272
619
- 273
620
- 274
621
- 275
622
- 276
623
- 277
624
- 278
625
- 279
626
- 280
627
- 281
628
- 282
629
- 283
630
- 284
631
- 285
632
- 286
633
- 287
634
- 288
635
- 289
636
- 290
637
- 291
638
- 292
639
- 293
640
- 294
641
- 295
642
- 296
643
- 297
644
- 298
645
- 299
646
- 300
647
- 301
648
- 302
649
- 303
650
- 304
651
- 305
652
- 306
653
- 307
654
- 308
655
- 309
656
- 310
657
- 311
658
- 312
659
- 313
660
- 314
661
- 315
662
- 316
663
- 317
664
- 318
665
- 319
666
- 320
667
- 321
668
- 322
669
- 323</pre>
670
- </td>
671
- <td>
672
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 222</span>
673
-
674
- <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>
675
- <span class='kw'>super</span>
676
- <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
677
- static void </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_allocate'>allocate</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, size_t element_count) {
678
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
679
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(element_count &gt; 0);
680
- self-&gt;element_count = element_count;
681
- self-&gt;values = (</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_malloc'>malloc</span><span class='embexpr_end'>}</span><span class='tstring_content'>(element_count*sizeof(</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_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self-&gt;values);
682
- }
683
- </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'> {
684
- size_t index;
685
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
686
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_allocate'>allocate</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, element_count);
687
- for(index = 0; index &lt; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self); ++index) {
688
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_ctor'>ctor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
689
- }
690
- }
691
- </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'> {
692
- size_t index;
693
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
694
- for(index = 0; index &lt; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self); ++index) {
695
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_dtor'>dtor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
696
- }
697
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_free'>free</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self-&gt;values);
698
- }
699
- </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'> {
700
- size_t index, size;
701
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(src);
702
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(dst);
703
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_allocate'>allocate</span><span class='embexpr_end'>}</span><span class='tstring_content'>(dst, size = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(src));
704
- for(index = 0; index &lt; size; ++index) {
705
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>dst-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>src-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
706
- }
707
- }
708
- </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'> {
709
- size_t index, size;
710
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(lt);
711
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(rt);
712
- 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) == (size = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(rt))) {
713
- for(index = 0; index &lt; size; ++index) {
714
- if(!</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_equal'>equal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>lt-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>rt-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) return 0;
715
- }
716
- return 1;
717
- } else
718
- return 0;
719
- }
720
- </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'> {
721
- size_t index, result = 0;
722
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
723
- for(index = 0; index &lt; self-&gt;element_count; ++index) {
724
- result ^= </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_identify'>identify</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
725
- result = AUTOC_RCYCLE(result);
726
- }
727
- return result;
728
- }
729
- </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_resize'>resize</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, size_t new_element_count) {
730
- size_t index, element_count, from, to;
731
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
732
- if((element_count = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self)) != new_element_count) {
733
- </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'> values = (</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_malloc'>malloc</span><span class='embexpr_end'>}</span><span class='tstring_content'>(new_element_count*sizeof(</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_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(values);
734
- from = AUTOC_MIN(element_count, new_element_count);
735
- to = AUTOC_MAX(element_count, new_element_count);
736
- for(index = 0; index &lt; from; ++index) {
737
- values[index] = self-&gt;values[index];
738
- }
739
- if(element_count &gt; new_element_count) {
740
- for(index = from; index &lt; to; ++index) {
741
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_dtor'>dtor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
742
- }
743
- } else {
744
- for(index = from; index &lt; to; ++index) {
745
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_ctor'>ctor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
746
- }
747
- }
748
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_free'>free</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self-&gt;values);
749
- self-&gt;values = values;
750
- self-&gt;element_count = new_element_count;
751
- }
752
- }
753
- </span><span class='tstring_end'>$</span></span>
754
- <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
755
- static int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ascend'>ascend</span><span class='embexpr_end'>}</span><span class='tstring_content'>(void* lp_, void* rp_) {
756
- </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'> lp = (</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'>)lp_;
757
- </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'> rp = (</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'>)rp_;
758
- if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_equal'>equal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*lp</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*rp</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
759
- return 0;
760
- } else if(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_less'>less</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*lp</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*rp</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
761
- return -1;
762
- } else {
763
- return +1;
764
- }
765
- }
766
- static int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_descend'>descend</span><span class='embexpr_end'>}</span><span class='tstring_content'>(void* lp_, void* rp_) {
767
- return -</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ascend'>ascend</span><span class='embexpr_end'>}</span><span class='tstring_content'>(lp_, rp_);
768
- }
769
- </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_sortEx'>sortEx</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, int ascending) {
770
- typedef int (*F)(const void*, const void*);
771
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
772
- qsort(self-&gt;values, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self), sizeof(</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'>), ascending ? (F)</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ascend'>ascend</span><span class='embexpr_end'>}</span><span class='tstring_content'> : (F)</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_descend'>descend</span><span class='embexpr_end'>}</span><span class='tstring_content'>);
773
- }
774
- </span><span class='tstring_end'>$</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_orderable?'>orderable?</span>
775
- <span class='kw'>end</span></pre>
776
- </td>
777
- </tr>
778
- </table>
779
- </div>
780
-
781
- <div class="method_details ">
782
- <h3 class="signature " id="write_intf_decls-instance_method">
783
-
784
- #<strong>write_intf_decls</strong>(stream, declare, define) &#x21d2; <tt>Object</tt>
785
-
786
-
787
-
788
-
789
-
790
- </h3><table class="source_code">
791
- <tr>
792
- <td>
793
- <pre class="lines">
794
-
795
-
796
- 168
797
- 169
798
- 170
799
- 171
800
- 172
801
- 173
802
- 174
803
- 175
804
- 176
805
- 177
806
- 178
807
- 179
808
- 180
809
- 181
810
- 182
811
- 183
812
- 184
813
- 185
814
- 186
815
- 187
816
- 188
817
- 189
818
- 190
819
- 191
820
- 192
821
- 193
822
- 194
823
- 195
824
- 196
825
- 197
826
- 198
827
- 199
828
- 200
829
- 201
830
- 202
831
- 203
832
- 204
833
- 205
834
- 206
835
- 207
836
- 208
837
- 209
838
- 210
839
- 211
840
- 212
841
- 213
842
- 214
843
- 215
844
- 216
845
- 217
846
- 218
847
- 219
848
- 220</pre>
849
- </td>
850
- <td>
851
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 168</span>
852
-
853
- <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>
854
- <span class='kw'>super</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='comma'>,</span> <span class='id identifier rubyid_define'>define</span><span class='rparen'>)</span> <span class='comment'># Need to make prototypes static inline
855
- </span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
856
- </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'>;
857
- </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'>;
858
- </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'>;
859
- /* TODO </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_copyRange'>copyRange</span><span class='embexpr_end'>}</span><span class='tstring_content'>() */
860
- </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'>;
861
- </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'>;
862
- </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_resize'>resize</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'>, size_t);
863
- </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) {
864
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
865
- return self-&gt;element_count;
866
- }
867
- </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_within'>within</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, size_t index) {
868
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
869
- return index &lt; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
870
- }
871
- </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_get'>get</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, size_t index) {
872
- </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;
873
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
874
- </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_within'>within</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, index));
875
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>result</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
876
- return result;
877
- }
878
- </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_set'>set</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, size_t index, </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'> value) {
879
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
880
- </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_within'>within</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, index));
881
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_dtor'>dtor</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
882
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>self-&gt;values[index]</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>value</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
883
- }
884
- </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'> vector, int forward) {
885
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
886
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(vector);
887
- self-&gt;vector = vector;
888
- self-&gt;forward = forward;
889
- self-&gt;index = forward ? -1 : </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_content'>(vector);
890
- }
891
- </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) {
892
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
893
- if(self-&gt;forward) ++self-&gt;index; else --self-&gt;index;
894
- return </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_within'>within</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self-&gt;vector, self-&gt;index);
895
- }
896
- </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) {
897
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
898
- return </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_get'>get</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self-&gt;vector, self-&gt;index);
899
- }
900
- </span><span class='tstring_end'>$</span></span>
901
- <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
902
- #define </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_sort'>sort</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_sortEx'>sortEx</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, 1)
903
- </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_sortEx'>sortEx</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'>, int);
904
- </span><span class='tstring_end'>$</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_orderable?'>orderable?</span>
905
- <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="write_intf_types-instance_method">
913
-
914
- #<strong>write_intf_types</strong>(stream) &#x21d2; <tt>Object</tt>
915
-
916
-
917
-
918
-
919
-
920
- </h3><table class="source_code">
921
- <tr>
922
- <td>
923
- <pre class="lines">
924
-
925
-
926
- 147
927
- 148
928
- 149
929
- 150
930
- 151
931
- 152
932
- 153
933
- 154
934
- 155
935
- 156
936
- 157
937
- 158
938
- 159
939
- 160
940
- 161
941
- 162
942
- 163
943
- 164
944
- 165
945
- 166</pre>
946
- </td>
947
- <td>
948
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 147</span>
949
-
950
- <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>
951
- <span class='kw'>super</span>
952
- <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
953
- /***
954
- **** </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&lt;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt;
955
- ***/
956
- </span><span class='tstring_end'>$</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_public?'>public?</span>
957
- <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'>
958
- 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'>;
959
- 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'>;
960
- struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> {
961
- </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'> values;
962
- size_t element_count;
963
- };
964
- struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'> {
965
- </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'> vector;
966
- int index, forward;
967
- };
968
- </span><span class='tstring_end'>$</span></span>
969
- <span class='kw'>end</span></pre>
970
- </td>
971
- </tr>
972
- </table>
973
- </div>
974
-
975
- </div>
976
-
977
- </div>
978
-
979
- <div id="footer">
980
- Generated on Wed Oct 12 12:27:12 2016 by
981
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
982
- 0.9.5 (ruby-2.3.1).
983
- </div>
984
-
985
- </div>
986
- </body>
987
- </html>