autoc 1.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
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
data/doc/AutoC.html DELETED
@@ -1,331 +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
- Module: AutoC
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";
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 (A)</a> &raquo;
40
-
41
-
42
- <span class="title">AutoC</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>Module: AutoC
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
- <dl>
82
- <dt>Defined in:</dt>
83
- <dd>lib/autoc.rb<span class="defines">,<br />
84
- lib/autoc/code.rb,<br /> lib/autoc/type.rb,<br /> lib/autoc/string.rb,<br /> lib/autoc/collection.rb,<br /> lib/autoc/collection/map.rb,<br /> lib/autoc/collection/set.rb,<br /> lib/autoc/collection/list.rb,<br /> lib/autoc/collection/queue.rb,<br /> lib/autoc/collection/vector.rb,<br /> lib/autoc/collection/hash_map.rb,<br /> lib/autoc/collection/tree_map.rb,<br /> lib/autoc/collection/tree_set.rb,<br /> lib/autoc/collection/iterator.rb,<br /> lib/autoc/collection/hash_set.rb</span>
85
- </dd>
86
- </dl>
87
-
88
- </div>
89
-
90
- <h2>Overview</h2><div class="docstring">
91
- <div class="discussion">
92
- <div class="paragraph">
93
- <p><strong>AutoC</strong> is a host of Ruby modules related to automatic C source code generation.</p>
94
- </div>
95
- <div class="olist arabic">
96
- <ol class="arabic">
97
- <li>
98
- <p><span class='object_link'><a href="AutoC/Code.html" title="AutoC::Code (class)">Code</a></span> generic C multi-source module generator.</p>
99
- </li>
100
- <li>
101
- <p><span class='object_link'><a href="AutoC/Collection.html" title="AutoC::Collection (class)">Collection</a></span> strongly-typed data structure generators similar
102
- to the C++ STL container classes.</p>
103
- </li>
104
- <li>
105
- <p><span class='object_link'><a href="AutoC/String.html" title="AutoC::String (class)">String</a></span> wrapper around the standard C string with string building capability.</p>
106
- </li>
107
- </ol>
108
- </div>
109
- <div class="sect1">
110
- <h2 id="_versioning_scheme">Versioning scheme</h2>
111
- <div class="sectionbody">
112
- <div class="paragraph">
113
- <p>AutoC adheres to simple major.minor versioning scheme.</p>
114
- </div>
115
- <div class="paragraph">
116
- <p>Change in major number states incompatible changes in the code
117
- while change in minor number states (rather) small incremental changes that
118
- should not normally break things.</p>
119
- </div>
120
- <div class="paragraph">
121
- <p>That said, release 1.0 is the <em>first</em> release of version 1 which is considered beta, not stable.
122
- <em>Note that it is not necessary stable or feature complete.</em>
123
- Releases 1.1+ will present incremental improvements, bugfixes, documentation updates etc. to version 1.
124
- Should the major incompatible changes be made, the new release 2.0 will be introduced and so forth.</p>
125
- </div>
126
- </div>
127
- </div>
128
-
129
- </div>
130
- </div>
131
- <div class="tags">
132
-
133
-
134
- </div><h2>Defined Under Namespace</h2>
135
- <p class="children">
136
-
137
-
138
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="AutoC/Iterators.html" title="AutoC::Iterators (module)">Iterators</a></span>, <span class='object_link'><a href="AutoC/Maps.html" title="AutoC::Maps (module)">Maps</a></span>, <span class='object_link'><a href="AutoC/Priority.html" title="AutoC::Priority (module)">Priority</a></span>, <span class='object_link'><a href="AutoC/Sets.html" title="AutoC::Sets (module)">Sets</a></span>
139
-
140
-
141
-
142
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="AutoC/Code.html" title="AutoC::Code (class)">Code</a></span>, <span class='object_link'><a href="AutoC/Collection.html" title="AutoC::Collection (class)">Collection</a></span>, <span class='object_link'><a href="AutoC/HashMap.html" title="AutoC::HashMap (class)">HashMap</a></span>, <span class='object_link'><a href="AutoC/HashSet.html" title="AutoC::HashSet (class)">HashSet</a></span>, <span class='object_link'><a href="AutoC/List.html" title="AutoC::List (class)">List</a></span>, <span class='object_link'><a href="AutoC/Module.html" title="AutoC::Module (class)">Module</a></span>, <span class='object_link'><a href="AutoC/Queue.html" title="AutoC::Queue (class)">Queue</a></span>, <span class='object_link'><a href="AutoC/Reference.html" title="AutoC::Reference (class)">Reference</a></span>, <span class='object_link'><a href="AutoC/String.html" title="AutoC::String (class)">String</a></span>, <span class='object_link'><a href="AutoC/TreeMap.html" title="AutoC::TreeMap (class)">TreeMap</a></span>, <span class='object_link'><a href="AutoC/TreeSet.html" title="AutoC::TreeSet (class)">TreeSet</a></span>, <span class='object_link'><a href="AutoC/Type.html" title="AutoC::Type (class)">Type</a></span>, <span class='object_link'><a href="AutoC/UserDefinedType.html" title="AutoC::UserDefinedType (class)">UserDefinedType</a></span>, <span class='object_link'><a href="AutoC/Vector.html" title="AutoC::Vector (class)">Vector</a></span>
143
-
144
-
145
- </p>
146
-
147
- <h2>Constant Summary</h2>
148
- <dl class="constants">
149
-
150
- <dt id="VERSION-constant" class="">VERSION =
151
-
152
- </dt>
153
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.4</span><span class='tstring_end'>&quot;</span></span></pre></dd>
154
-
155
- </dl>
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
- <h2>
165
- Class Method Summary
166
- <small><a href="#" class="summary_toggle">collapse</a></small>
167
- </h2>
168
-
169
- <ul class="summary">
170
-
171
- <li class="public ">
172
- <span class="summary_signature">
173
-
174
- <a href="#c_id-class_method" title="c_id (class method)">.<strong>c_id</strong>(obj) &#x21d2; Object </a>
175
-
176
-
177
-
178
- </span>
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
- <span class="summary_desc"><div class='inline'><div class="paragraph">
189
- <p>Convert obj to string and return it.</p>
190
- </div></div></span>
191
-
192
- </li>
193
-
194
-
195
- <li class="public ">
196
- <span class="summary_signature">
197
-
198
- <a href="#priority_sort-class_method" title="priority_sort (class method)">.<strong>priority_sort</strong>(entities, reverse = false) &#x21d2; Object </a>
199
-
200
-
201
-
202
- </span>
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
- <span class="summary_desc"><div class='inline'></div></span>
213
-
214
- </li>
215
-
216
-
217
- </ul>
218
-
219
-
220
-
221
-
222
- <div id="class_method_details" class="method_details_list">
223
- <h2>Class Method Details</h2>
224
-
225
-
226
- <div class="method_details first">
227
- <h3 class="signature first" id="c_id-class_method">
228
-
229
- .<strong>c_id</strong>(obj) &#x21d2; <tt>Object</tt>
230
-
231
-
232
-
233
-
234
-
235
- </h3><div class="docstring">
236
- <div class="discussion">
237
- <div class="paragraph">
238
- <p>Convert obj to string and return it.
239
- Throw NameError is resulting string is not a valid C identifier.</p>
240
- </div>
241
-
242
- </div>
243
- </div>
244
- <div class="tags">
245
-
246
- <p class="tag_title">Raises:</p>
247
- <ul class="raise">
248
-
249
- <li>
250
-
251
-
252
- <span class='type'>(<tt>NameError</tt>)</span>
253
-
254
-
255
-
256
- </li>
257
-
258
- </ul>
259
-
260
- </div><table class="source_code">
261
- <tr>
262
- <td>
263
- <pre class="lines">
264
-
265
-
266
- 22
267
- 23
268
- 24
269
- 25
270
- 26</pre>
271
- </td>
272
- <td>
273
- <pre class="code"><span class="info file"># File 'lib/autoc/code.rb', line 22</span>
274
-
275
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_c_id'>c_id</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
276
- <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
277
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NameError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_obj'>obj</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; is not a valid C identifier</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[_a-zA-Z]\w*$</span><span class='regexp_end'>/</span></span> <span class='op'>=~</span> <span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
278
- <span class='id identifier rubyid_obj'>obj</span>
279
- <span class='kw'>end</span></pre>
280
- </td>
281
- </tr>
282
- </table>
283
- </div>
284
-
285
- <div class="method_details ">
286
- <h3 class="signature " id="priority_sort-class_method">
287
-
288
- .<strong>priority_sort</strong>(entities, reverse = false) &#x21d2; <tt>Object</tt>
289
-
290
-
291
-
292
-
293
-
294
- </h3><table class="source_code">
295
- <tr>
296
- <td>
297
- <pre class="lines">
298
-
299
-
300
- 129
301
- 130
302
- 131
303
- 132
304
- 133</pre>
305
- </td>
306
- <td>
307
- <pre class="code"><span class="info file"># File 'lib/autoc/code.rb', line 129</span>
308
-
309
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_priority_sort'>priority_sort</span><span class='lparen'>(</span><span class='id identifier rubyid_entities'>entities</span><span class='comma'>,</span> <span class='id identifier rubyid_reverse'>reverse</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
310
- <span class='id identifier rubyid_list'>list</span> <span class='op'>=</span> <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_sort!'>sort!</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_priority'>priority</span> <span class='op'>&lt;=&gt;</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_priority'>priority</span><span class='rbrace'>}</span>
311
- <span class='id identifier rubyid_list'>list</span><span class='period'>.</span><span class='id identifier rubyid_reverse!'>reverse!</span> <span class='kw'>unless</span> <span class='id identifier rubyid_reverse'>reverse</span>
312
- <span class='id identifier rubyid_list'>list</span>
313
- <span class='kw'>end</span></pre>
314
- </td>
315
- </tr>
316
- </table>
317
- </div>
318
-
319
- </div>
320
-
321
- </div>
322
-
323
- <div id="footer">
324
- Generated on Wed Oct 12 12:27:11 2016 by
325
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
326
- 0.9.5 (ruby-2.3.1).
327
- </div>
328
-
329
- </div>
330
- </body>
331
- </html>