autoc 1.2 → 1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +4 -0
  3. data/README +3 -1
  4. data/doc/AutoC.html +23 -7
  5. data/doc/AutoC/Code.html +3 -3
  6. data/doc/AutoC/Collection.html +289 -76
  7. data/doc/AutoC/HashMap.html +44 -46
  8. data/doc/AutoC/HashSet.html +20 -17
  9. data/doc/AutoC/List.html +56 -92
  10. data/doc/AutoC/Module.html +2 -2
  11. data/doc/AutoC/Module/File.html +2 -2
  12. data/doc/AutoC/Module/Header.html +6 -4
  13. data/doc/AutoC/Module/Source.html +26 -26
  14. data/doc/AutoC/Priority.html +2 -2
  15. data/doc/AutoC/Queue.html +30 -92
  16. data/doc/AutoC/Reference.html +217 -61
  17. data/doc/AutoC/String.html +1393 -0
  18. data/doc/AutoC/Type.html +240 -128
  19. data/doc/AutoC/UserDefinedType.html +688 -47
  20. data/doc/AutoC/Vector.html +154 -62
  21. data/doc/_index.html +9 -2
  22. data/doc/class_list.html +1 -1
  23. data/doc/file.CHANGES.html +10 -2
  24. data/doc/file.README.html +5 -3
  25. data/doc/index.html +5 -3
  26. data/doc/method_list.html +235 -97
  27. data/doc/top-level-namespace.html +2 -2
  28. data/lib/autoc.rb +3 -1
  29. data/lib/autoc/code.rb +3 -2
  30. data/lib/autoc/collection.rb +36 -40
  31. data/lib/autoc/collection/hash_map.rb +10 -14
  32. data/lib/autoc/collection/hash_set.rb +12 -11
  33. data/lib/autoc/collection/list.rb +21 -11
  34. data/lib/autoc/collection/queue.rb +5 -8
  35. data/lib/autoc/collection/vector.rb +28 -12
  36. data/lib/autoc/string.rb +492 -0
  37. data/lib/autoc/type.rb +155 -66
  38. data/test/test.rb +157 -35
  39. data/test/test_char_string.rb +270 -0
  40. data/test/test_int_list.rb +35 -0
  41. data/test/test_int_vector.rb +34 -0
  42. data/test/test_value_hash_map.rb +162 -0
  43. data/test/test_value_hash_set.rb +173 -0
  44. data/test/test_value_list.rb +193 -0
  45. data/test/test_value_queue.rb +275 -0
  46. data/test/test_value_vector.rb +155 -0
  47. data/test/value.rb +80 -0
  48. metadata +15 -8
  49. data/test/test.c +0 -1041
  50. data/test/test.h +0 -41
  51. data/test/test_auto.c +0 -3407
  52. data/test/test_auto.h +0 -765
@@ -184,8 +184,15 @@ If new size is smaller the the old one, excessive elements are destroyed.
184
184
  </tr>
185
185
  <tr>
186
186
  <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>
187
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Perform an ascending sort.
188
+ See <sub>type</sub>SortEx().
189
+ </p><p class="tableblock">NOTE : optional operation.</p></td>
190
+ </tr>
191
+ <tr>
192
+ <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>
187
193
  <td class="tableblock halign-left valign-top"><p class="tableblock">NOTE : optional operation.
188
- </p><p class="tableblock">Perform a sorting operation on the contents of vector self utilizing either generated of user supplied ordering functions.
194
+ </p><p class="tableblock">Perform a sort operation on the contents of vector self utilizing either generated of user supplied ordering functions.
195
+ If the ascending is non-zero, perform the sorting in ascending order otherwise perform the soring in descending order.
189
196
  </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>
190
197
  </tr>
191
198
  <tr>
@@ -266,6 +273,30 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
266
273
  <li class="public ">
267
274
  <span class="summary_signature">
268
275
 
276
+ <a href="#constructible%3F-instance_method" title="#constructible? (instance method)">- (Boolean) <strong>constructible?</strong> </a>
277
+
278
+
279
+
280
+ </span>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'><div class="paragraph">
291
+ <p>No default constructor provided.</p>
292
+ </div></div></span>
293
+
294
+ </li>
295
+
296
+
297
+ <li class="public ">
298
+ <span class="summary_signature">
299
+
269
300
  <a href="#initialize-instance_method" title="#initialize (instance method)">- (Vector) <strong>initialize</strong>(*args) </a>
270
301
 
271
302
 
@@ -368,7 +399,7 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
368
399
 
369
400
 
370
401
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></h3>
371
- <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#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></p>
402
+ <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>
372
403
 
373
404
 
374
405
 
@@ -378,8 +409,9 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
378
409
 
379
410
 
380
411
 
412
+
381
413
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3>
382
- <p class="inherited"><span class='object_link'><a href="Type.html#%3D%3D-instance_method" title="AutoC::Type#== (method)">#==</a></span>, <span class='object_link'><a href="Type.html#abort-instance_method" title="AutoC::Type#abort (method)">#abort</a></span>, <span class='object_link'><a href="Type.html#assert-instance_method" title="AutoC::Type#assert (method)">#assert</a></span>, <span class='object_link'><a href="Type.html#calloc-instance_method" title="AutoC::Type#calloc (method)">#calloc</a></span>, <span class='object_link'><a href="Type.html#coerce-class_method" title="AutoC::Type.coerce (method)">coerce</a></span>, <span class='object_link'><a href="Type.html#comparable%3F-instance_method" title="AutoC::Type#comparable? (method)">#comparable?</a></span>, <span class='object_link'><a href="Type.html#constructible%3F-instance_method" title="AutoC::Type#constructible? (method)">#constructible?</a></span>, <span class='object_link'><a href="Type.html#copyable%3F-instance_method" title="AutoC::Type#copyable? (method)">#copyable?</a></span>, <span class='object_link'><a href="Type.html#destructible%3F-instance_method" title="AutoC::Type#destructible? (method)">#destructible?</a></span>, <span class='object_link'><a href="Type.html#entities-instance_method" title="AutoC::Type#entities (method)">#entities</a></span>, <span class='object_link'><a href="Type.html#extern-instance_method" title="AutoC::Type#extern (method)">#extern</a></span>, <span class='object_link'><a href="Type.html#free-instance_method" title="AutoC::Type#free (method)">#free</a></span>, <span class='object_link'><a href="Type.html#hash-instance_method" title="AutoC::Type#hash (method)">#hash</a></span>, <span class='object_link'><a href="Type.html#hashable%3F-instance_method" title="AutoC::Type#hashable? (method)">#hashable?</a></span>, <span class='object_link'><a href="Type.html#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#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>
414
+ <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#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>
383
415
 
384
416
 
385
417
 
@@ -420,24 +452,22 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
420
452
  <pre class="lines">
421
453
 
422
454
 
423
- 124
424
- 125
425
- 126
426
- 127
427
- 128
428
- 129
429
- 130</pre>
455
+ 132
456
+ 133
457
+ 134
458
+ 135
459
+ 136
460
+ 137</pre>
430
461
  </td>
431
462
  <td>
432
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 124</span>
463
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 132</span>
433
464
 
434
465
  <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>
435
466
  <span class='kw'>super</span>
436
467
  <span class='comment'># Override the default type constructor as the Vector&#39;s requires one extra parameter
437
- </span> <span class='comment'># Note that this makes the Vector instance un-constructible
438
- </span> <span class='ivar'>@ctor</span> <span class='op'>=</span> <span class='id identifier rubyid_define_function'>define_function</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>
439
- <span class='ivar'>@capability</span><span class='period'>.</span><span class='id identifier rubyid_subtract'>subtract</span> <span class='lbracket'>[</span><span class='symbol'>:constructible</span><span class='comma'>,</span> <span class='symbol'>:orderable</span><span class='rbracket'>]</span> <span class='comment'># No default constructor and no less operation defined
440
- </span><span class='kw'>end</span></pre>
468
+ </span> <span class='comment'># Note that this makes the Vector instance non-constructible
469
+ </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>
470
+ <span class='kw'>end</span></pre>
441
471
  </td>
442
472
  </tr>
443
473
  </table>
@@ -461,7 +491,57 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
461
491
 
462
492
 
463
493
  <div class="method_details first">
464
- <h3 class="signature first" id="write_impls-instance_method">
494
+ <h3 class="signature first" id="constructible?-instance_method">
495
+
496
+ - (<tt>Boolean</tt>) <strong>constructible?</strong>
497
+
498
+
499
+
500
+
501
+
502
+ </h3><div class="docstring">
503
+ <div class="discussion">
504
+ <div class="paragraph">
505
+ <p>No default constructor provided</p>
506
+ </div>
507
+
508
+ </div>
509
+ </div>
510
+ <div class="tags">
511
+
512
+ <p class="tag_title">Returns:</p>
513
+ <ul class="return">
514
+
515
+ <li>
516
+
517
+
518
+ <span class='type'>(<tt>Boolean</tt>)</span>
519
+
520
+
521
+
522
+ </li>
523
+
524
+ </ul>
525
+
526
+ </div><table class="source_code">
527
+ <tr>
528
+ <td>
529
+ <pre class="lines">
530
+
531
+
532
+ 140</pre>
533
+ </td>
534
+ <td>
535
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 140</span>
536
+
537
+ <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>
538
+ </td>
539
+ </tr>
540
+ </table>
541
+ </div>
542
+
543
+ <div class="method_details ">
544
+ <h3 class="signature " id="write_impls-instance_method">
465
545
 
466
546
  - (<tt>Object</tt>) <strong>write_impls</strong>(stream, define)
467
547
 
@@ -475,18 +555,6 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
475
555
  <pre class="lines">
476
556
 
477
557
 
478
- 206
479
- 207
480
- 208
481
- 209
482
- 210
483
- 211
484
- 212
485
- 213
486
- 214
487
- 215
488
- 216
489
- 217
490
558
  218
491
559
  219
492
560
  220
@@ -572,12 +640,29 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
572
640
  300
573
641
  301
574
642
  302
575
- 303</pre>
643
+ 303
644
+ 304
645
+ 305
646
+ 306
647
+ 307
648
+ 308
649
+ 309
650
+ 310
651
+ 311
652
+ 312
653
+ 313
654
+ 314
655
+ 315
656
+ 316
657
+ 317
658
+ 318
659
+ 319</pre>
576
660
  </td>
577
661
  <td>
578
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 206</span>
662
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 218</span>
579
663
 
580
664
  <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>
665
+ <span class='kw'>super</span>
581
666
  <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'>
582
667
  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) {
583
668
  </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
@@ -657,7 +742,7 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
657
742
  }
658
743
  </span><span class='tstring_end'>$</span></span>
659
744
  <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'>
660
- static int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_comparator'>comparator</span><span class='embexpr_end'>}</span><span class='tstring_content'>(void* lp_, void* rp_) {
745
+ 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_) {
661
746
  </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_;
662
747
  </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_;
663
748
  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'>) {
@@ -668,10 +753,13 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
668
753
  return +1;
669
754
  }
670
755
  }
671
- </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_sort'>sort</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) {
756
+ 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_) {
757
+ 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_);
758
+ }
759
+ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> 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) {
672
760
  typedef int (*F)(const void*, const void*);
673
761
  </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self);
674
- 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'>), (F)</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_comparator'>comparator</span><span class='embexpr_end'>}</span><span class='tstring_content'>);
762
+ 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'>);
675
763
  }
676
764
  </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>
677
765
  <span class='kw'>end</span></pre>
@@ -695,16 +783,6 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
695
783
  <pre class="lines">
696
784
 
697
785
 
698
- 153
699
- 154
700
- 155
701
- 156
702
- 157
703
- 158
704
- 159
705
- 160
706
- 161
707
- 162
708
786
  163
709
787
  164
710
788
  165
@@ -746,10 +824,22 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
746
824
  201
747
825
  202
748
826
  203
749
- 204</pre>
827
+ 204
828
+ 205
829
+ 206
830
+ 207
831
+ 208
832
+ 209
833
+ 210
834
+ 211
835
+ 212
836
+ 213
837
+ 214
838
+ 215
839
+ 216</pre>
750
840
  </td>
751
841
  <td>
752
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 153</span>
842
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 163</span>
753
843
 
754
844
  <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>
755
845
  <span class='kw'>super</span>
@@ -757,6 +847,7 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
757
847
  </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'>;
758
848
  </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'>;
759
849
  </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'>;
850
+ /* TODO </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_copyRange'>copyRange</span><span class='embexpr_end'>}</span><span class='tstring_content'>() */
760
851
  </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'>;
761
852
  </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'>;
762
853
  </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);
@@ -800,7 +891,8 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
800
891
  }
801
892
  </span><span class='tstring_end'>$</span></span>
802
893
  <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'>
803
- </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_sort'>sort</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'>);
894
+ #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)
895
+ </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);
804
896
  </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>
805
897
  <span class='kw'>end</span></pre>
806
898
  </td>
@@ -823,16 +915,6 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
823
915
  <pre class="lines">
824
916
 
825
917
 
826
- 132
827
- 133
828
- 134
829
- 135
830
- 136
831
- 137
832
- 138
833
- 139
834
- 140
835
- 141
836
918
  142
837
919
  143
838
920
  144
@@ -842,12 +924,23 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
842
924
  148
843
925
  149
844
926
  150
845
- 151</pre>
927
+ 151
928
+ 152
929
+ 153
930
+ 154
931
+ 155
932
+ 156
933
+ 157
934
+ 158
935
+ 159
936
+ 160
937
+ 161</pre>
846
938
  </td>
847
939
  <td>
848
- <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 132</span>
940
+ <pre class="code"><span class="info file"># File 'lib/autoc/collection/vector.rb', line 142</span>
849
941
 
850
942
  <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>
943
+ <span class='kw'>super</span>
851
944
  <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'>
852
945
  /***
853
946
  **** </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&lt;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt; (</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>)
@@ -862,8 +955,7 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
862
955
  };
863
956
  struct </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'> {
864
957
  </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;
865
- int index;
866
- int forward;
958
+ int index, forward;
867
959
  };
868
960
  </span><span class='tstring_end'>$</span></span>
869
961
  <span class='kw'>end</span></pre>
@@ -877,9 +969,9 @@ Non-zero value of forward specifies a forward iterator, zero value specifies a b
877
969
  </div>
878
970
 
879
971
  <div id="footer">
880
- Generated on Sat Nov 22 16:58:04 2014 by
972
+ Generated on Thu Mar 17 13:32:51 2016 by
881
973
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
882
- 0.8.7.6 (ruby-2.1.5).
974
+ 0.8.7.6 (ruby-2.2.4).
883
975
  </div>
884
976
 
885
977
  </body>
@@ -251,6 +251,13 @@
251
251
 
252
252
  </li>
253
253
 
254
+ <li>
255
+ <span class='object_link'><a href="AutoC/String.html" title="AutoC::String (class)">String</a></span>
256
+
257
+ <small>(AutoC)</small>
258
+
259
+ </li>
260
+
254
261
  </ul>
255
262
  </ul>
256
263
 
@@ -308,9 +315,9 @@
308
315
  </div>
309
316
 
310
317
  <div id="footer">
311
- Generated on Sat Nov 22 16:58:03 2014 by
318
+ Generated on Thu Mar 17 13:32:50 2016 by
312
319
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
313
- 0.8.7.6 (ruby-2.1.5).
320
+ 0.8.7.6 (ruby-2.2.4).
314
321
  </div>
315
322
 
316
323
  </body>
@@ -50,7 +50,7 @@
50
50
 
51
51
  <ul id="full_list" class="class">
52
52
  <li><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></li>
53
- <li><a class='toggle'></a> <span class='object_link'><a href="AutoC.html" title="AutoC (module)">AutoC</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="AutoC/Code.html" title="AutoC::Code (class)">Code</a></span> &lt; Object<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Collection.html" title="AutoC::Collection (class)">Collection</a></span> &lt; Type<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/HashMap.html" title="AutoC::HashMap (class)">HashMap</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/HashSet.html" title="AutoC::HashSet (class)">HashSet</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/List.html" title="AutoC::List (class)">List</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><a class='toggle'></a> <span class='object_link'><a href="AutoC/Module.html" title="AutoC::Module (class)">Module</a></span> &lt; Object<small class='search_info'>AutoC</small></li><ul><li><span class='object_link'><a href="AutoC/Module/File.html" title="AutoC::Module::File (class)">File</a></span> &lt; Object<small class='search_info'>AutoC::Module</small></li><li><span class='object_link'><a href="AutoC/Module/Header.html" title="AutoC::Module::Header (class)">Header</a></span> &lt; File<small class='search_info'>AutoC::Module</small></li><li><span class='object_link'><a href="AutoC/Module/Source.html" title="AutoC::Module::Source (class)">Source</a></span> &lt; File<small class='search_info'>AutoC::Module</small></li></ul><li><span class='object_link'><a href="AutoC/Priority.html" title="AutoC::Priority (module)">Priority</a></span><small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Queue.html" title="AutoC::Queue (class)">Queue</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Reference.html" title="AutoC::Reference (class)">Reference</a></span> &lt; Type<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Type.html" title="AutoC::Type (class)">Type</a></span> &lt; Code<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/UserDefinedType.html" title="AutoC::UserDefinedType (class)">UserDefinedType</a></span> &lt; Type<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Vector.html" title="AutoC::Vector (class)">Vector</a></span> &lt; Collection<small class='search_info'>AutoC</small></li></ul>
53
+ <li><a class='toggle'></a> <span class='object_link'><a href="AutoC.html" title="AutoC (module)">AutoC</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="AutoC/Code.html" title="AutoC::Code (class)">Code</a></span> &lt; Object<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Collection.html" title="AutoC::Collection (class)">Collection</a></span> &lt; Type<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/HashMap.html" title="AutoC::HashMap (class)">HashMap</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/HashSet.html" title="AutoC::HashSet (class)">HashSet</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/List.html" title="AutoC::List (class)">List</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><a class='toggle'></a> <span class='object_link'><a href="AutoC/Module.html" title="AutoC::Module (class)">Module</a></span> &lt; Object<small class='search_info'>AutoC</small></li><ul><li><span class='object_link'><a href="AutoC/Module/File.html" title="AutoC::Module::File (class)">File</a></span> &lt; Object<small class='search_info'>AutoC::Module</small></li><li><span class='object_link'><a href="AutoC/Module/Header.html" title="AutoC::Module::Header (class)">Header</a></span> &lt; File<small class='search_info'>AutoC::Module</small></li><li><span class='object_link'><a href="AutoC/Module/Source.html" title="AutoC::Module::Source (class)">Source</a></span> &lt; File<small class='search_info'>AutoC::Module</small></li></ul><li><span class='object_link'><a href="AutoC/Priority.html" title="AutoC::Priority (module)">Priority</a></span><small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Queue.html" title="AutoC::Queue (class)">Queue</a></span> &lt; Collection<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Reference.html" title="AutoC::Reference (class)">Reference</a></span> &lt; Type<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/String.html" title="AutoC::String (class)">String</a></span> &lt; Type<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Type.html" title="AutoC::Type (class)">Type</a></span> &lt; Code<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/UserDefinedType.html" title="AutoC::UserDefinedType (class)">UserDefinedType</a></span> &lt; Type<small class='search_info'>AutoC</small></li><li><span class='object_link'><a href="AutoC/Vector.html" title="AutoC::Vector (class)">Vector</a></span> &lt; Collection<small class='search_info'>AutoC</small></li></ul>
54
54
 
55
55
  </ul>
56
56
  </div>
@@ -62,6 +62,14 @@
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
64
  <div id="content"><div id='filecontents'><div class="sect1">
65
+ <h2 id="_1_3">1.3</h2>
66
+ <div class="sectionbody">
67
+ <div class="paragraph">
68
+ <p>Introduced AutoC::String string type.</p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="sect1">
65
73
  <h2 id="_1_2">1.2</h2>
66
74
  <div class="sectionbody">
67
75
  <div class="paragraph">
@@ -93,9 +101,9 @@
93
101
  </div></div></div>
94
102
 
95
103
  <div id="footer">
96
- Generated on Sat Nov 22 16:58:03 2014 by
104
+ Generated on Thu Mar 17 13:32:50 2016 by
97
105
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
98
- 0.8.7.6 (ruby-2.1.5).
106
+ 0.8.7.6 (ruby-2.2.4).
99
107
  </div>
100
108
 
101
109
  </body>
@@ -90,7 +90,9 @@
90
90
  <div class="listingblock">
91
91
  <div class="content">
92
92
  <pre class="code ruby"><code class="ruby">&gt; cd test
93
- &gt; cc -o test test.c test_auto.c</code></pre>
93
+ &gt; ruby -I. -I../lib test.rb
94
+ &gt; cc test_auto.c
95
+ &gt; ./a.out</code></pre>
94
96
  </div>
95
97
  </div>
96
98
  <div class="paragraph">
@@ -106,9 +108,9 @@
106
108
  </div></div></div>
107
109
 
108
110
  <div id="footer">
109
- Generated on Sat Nov 22 16:58:03 2014 by
111
+ Generated on Thu Mar 17 13:32:50 2016 by
110
112
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
- 0.8.7.6 (ruby-2.1.5).
113
+ 0.8.7.6 (ruby-2.2.4).
112
114
  </div>
113
115
 
114
116
  </body>
@@ -90,7 +90,9 @@
90
90
  <div class="listingblock">
91
91
  <div class="content">
92
92
  <pre class="code ruby"><code class="ruby">&gt; cd test
93
- &gt; cc -o test test.c test_auto.c</code></pre>
93
+ &gt; ruby -I. -I../lib test.rb
94
+ &gt; cc test_auto.c
95
+ &gt; ./a.out</code></pre>
94
96
  </div>
95
97
  </div>
96
98
  <div class="paragraph">
@@ -106,9 +108,9 @@
106
108
  </div></div></div>
107
109
 
108
110
  <div id="footer">
109
- Generated on Sat Nov 22 16:58:03 2014 by
111
+ Generated on Thu Mar 17 13:32:50 2016 by
110
112
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
- 0.8.7.6 (ruby-2.1.5).
113
+ 0.8.7.6 (ruby-2.2.4).
112
114
  </div>
113
115
 
114
116
  </body>