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/file.README.html DELETED
@@ -1,116 +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
- File: README
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 = "README";
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="file_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> &raquo;
40
- <span class="title">File: README</span>
41
-
42
- </div>
43
-
44
- <div id="search">
45
-
46
- <a class="full_list_link" id="class_list_link"
47
- href="class_list.html">
48
-
49
- <svg width="24" height="24">
50
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
- </svg>
54
- </a>
55
-
56
- </div>
57
- <div class="clear"></div>
58
- </div>
59
-
60
- <iframe id="search_frame" src="file_list.html"></iframe>
61
-
62
- <div id="content"><div id='filecontents'><div class="sect1">
63
- <h2 id="_autoc_a_collection_of_ruby_modules_related_to_automatic_c_source_code_generation">AutoC - a collection of Ruby modules related to automatic C source code generation.</h2>
64
- <div class="sectionbody">
65
- <div class="paragraph">
66
- <p>AutoC is a free software distributed under the terms of modified BSD license.</p>
67
- </div>
68
- <div class="paragraph">
69
- <p>Project home page is <a href="http://autoc.sourceforge.net/" class="bare">http://autoc.sourceforge.net/</a></p>
70
- </div>
71
- <div class="paragraph">
72
- <p>AutoC is available via the RubyGems infrastructure; the easiest way to obtain it is:</p>
73
- </div>
74
- <div class="listingblock">
75
- <div class="content">
76
- <pre class="code ruby"><code class="ruby">&gt; gem install autoc</code></pre>
77
- </div>
78
- </div>
79
- <div class="paragraph">
80
- <p>Offline user documentation in HTML form is in doc/ directory.</p>
81
- </div>
82
- <div class="paragraph">
83
- <p>For more information refer to <span class='object_link'><a href="AutoC.html" title="AutoC (module)">AutoC</a></span>.</p>
84
- </div>
85
- <div class="paragraph">
86
- <p>Ad-hoc test build instructions:</p>
87
- </div>
88
- <div class="listingblock">
89
- <div class="content">
90
- <pre class="code ruby"><code class="ruby">&gt; cd test
91
- &gt; ruby -I. -I../lib test.rb
92
- &gt; cc test_auto.c
93
- &gt; ./a.out</code></pre>
94
- </div>
95
- </div>
96
- <div class="paragraph">
97
- <p>For (in)complete list of changes refer to <a href="file.CHANGES.html" title="CHANGES">CHANGES</a>.</p>
98
- </div>
99
- <div class="paragraph">
100
- <p>That&#8217;s all for now, folks! Stay tuned.</p>
101
- </div>
102
- <div class="paragraph">
103
- <p>Oleg A. Khlybov &lt;<a href="mailto:fougas@mail.ru">fougas@mail.ru</a>&gt;</p>
104
- </div>
105
- </div>
106
- </div></div></div>
107
-
108
- <div id="footer">
109
- Generated on Wed Oct 12 12:27:11 2016 by
110
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
- 0.9.5 (ruby-2.3.1).
112
- </div>
113
-
114
- </div>
115
- </body>
116
- </html>
data/doc/file_list.html DELETED
@@ -1,61 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
- <meta charset="utf-8" />
6
-
7
- <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
-
9
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
-
11
-
12
-
13
- <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
-
15
- <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
-
17
-
18
- <title>File List</title>
19
- <base id="base_target" target="_parent" />
20
- </head>
21
- <body>
22
- <div id="content">
23
- <div class="fixed_header">
24
- <h1 id="full_list_header">File List</h1>
25
- <div id="full_list_nav">
26
-
27
- <span><a target="_self" href="class_list.html">
28
- Classes
29
- </a></span>
30
-
31
- <span><a target="_self" href="method_list.html">
32
- Methods
33
- </a></span>
34
-
35
- <span><a target="_self" href="file_list.html">
36
- Files
37
- </a></span>
38
-
39
- </div>
40
-
41
- <div id="search">Search: <input type="text" /></div>
42
- </div>
43
-
44
- <ul id="full_list" class="file">
45
-
46
-
47
- <li id="object_README" class="odd">
48
- <div class="item"><span class="object_link"><a href="index.html" title="README">README</a></span></div>
49
- </li>
50
-
51
-
52
- <li id="object_CHANGES" class="even">
53
- <div class="item"><span class="object_link"><a href="file.CHANGES.html" title="CHANGES">CHANGES</a></span></div>
54
- </li>
55
-
56
-
57
-
58
- </ul>
59
- </div>
60
- </body>
61
- </html>
data/doc/frames.html DELETED
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Documentation by YARD 0.9.5</title>
6
- </head>
7
- <script type="text/javascript" charset="utf-8">
8
- var match = unescape(window.location.hash).match(/^#!(.+)/);
9
- var name = match ? match[1] : 'index.html';
10
- name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
11
- window.top.location = name;
12
- </script>
13
- <noscript>
14
- <h1>Oops!</h1>
15
- <h2>YARD requires JavaScript!</h2>
16
- </noscript>
17
- </html>
data/doc/index.html DELETED
@@ -1,116 +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
- File: README
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 = "README";
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> &raquo;
40
- <span class="title">File: README</span>
41
-
42
- </div>
43
-
44
- <div id="search">
45
-
46
- <a class="full_list_link" id="class_list_link"
47
- href="class_list.html">
48
-
49
- <svg width="24" height="24">
50
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
- </svg>
54
- </a>
55
-
56
- </div>
57
- <div class="clear"></div>
58
- </div>
59
-
60
- <iframe id="search_frame" src="class_list.html"></iframe>
61
-
62
- <div id="content"><div id='filecontents'><div class="sect1">
63
- <h2 id="_autoc_a_collection_of_ruby_modules_related_to_automatic_c_source_code_generation">AutoC - a collection of Ruby modules related to automatic C source code generation.</h2>
64
- <div class="sectionbody">
65
- <div class="paragraph">
66
- <p>AutoC is a free software distributed under the terms of modified BSD license.</p>
67
- </div>
68
- <div class="paragraph">
69
- <p>Project home page is <a href="http://autoc.sourceforge.net/" class="bare">http://autoc.sourceforge.net/</a></p>
70
- </div>
71
- <div class="paragraph">
72
- <p>AutoC is available via the RubyGems infrastructure; the easiest way to obtain it is:</p>
73
- </div>
74
- <div class="listingblock">
75
- <div class="content">
76
- <pre class="code ruby"><code class="ruby">&gt; gem install autoc</code></pre>
77
- </div>
78
- </div>
79
- <div class="paragraph">
80
- <p>Offline user documentation in HTML form is in doc/ directory.</p>
81
- </div>
82
- <div class="paragraph">
83
- <p>For more information refer to <span class='object_link'><a href="AutoC.html" title="AutoC (module)">AutoC</a></span>.</p>
84
- </div>
85
- <div class="paragraph">
86
- <p>Ad-hoc test build instructions:</p>
87
- </div>
88
- <div class="listingblock">
89
- <div class="content">
90
- <pre class="code ruby"><code class="ruby">&gt; cd test
91
- &gt; ruby -I. -I../lib test.rb
92
- &gt; cc test_auto.c
93
- &gt; ./a.out</code></pre>
94
- </div>
95
- </div>
96
- <div class="paragraph">
97
- <p>For (in)complete list of changes refer to <a href="file.CHANGES.html" title="CHANGES">CHANGES</a>.</p>
98
- </div>
99
- <div class="paragraph">
100
- <p>That&#8217;s all for now, folks! Stay tuned.</p>
101
- </div>
102
- <div class="paragraph">
103
- <p>Oleg A. Khlybov &lt;<a href="mailto:fougas@mail.ru">fougas@mail.ru</a>&gt;</p>
104
- </div>
105
- </div>
106
- </div></div></div>
107
-
108
- <div id="footer">
109
- Generated on Wed Oct 12 12:27:11 2016 by
110
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
- 0.9.5 (ruby-2.3.1).
112
- </div>
113
-
114
- </div>
115
- </body>
116
- </html>
data/doc/js/app.js DELETED
@@ -1,243 +0,0 @@
1
- (function() {
2
-
3
- var localStorage = {}, sessionStorage = {};
4
- try { localStorage = window.localStorage; } catch (e) { }
5
- try { sessionStorage = window.sessionStorage; } catch (e) { }
6
-
7
- function createSourceLinks() {
8
- $('.method_details_list .source_code').
9
- before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
10
- $('.toggleSource').toggle(function() {
11
- $(this).parent().nextAll('.source_code').slideDown(100);
12
- $(this).text("Hide source");
13
- },
14
- function() {
15
- $(this).parent().nextAll('.source_code').slideUp(100);
16
- $(this).text("View source");
17
- });
18
- }
19
-
20
- function createDefineLinks() {
21
- var tHeight = 0;
22
- $('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
23
- $('.toggleDefines').toggle(function() {
24
- tHeight = $(this).parent().prev().height();
25
- $(this).prev().css('display', 'inline');
26
- $(this).parent().prev().height($(this).parent().height());
27
- $(this).text("(less)");
28
- },
29
- function() {
30
- $(this).prev().hide();
31
- $(this).parent().prev().height(tHeight);
32
- $(this).text("more...");
33
- });
34
- }
35
-
36
- function createFullTreeLinks() {
37
- var tHeight = 0;
38
- $('.inheritanceTree').toggle(function() {
39
- tHeight = $(this).parent().prev().height();
40
- $(this).parent().toggleClass('showAll');
41
- $(this).text("(hide)");
42
- $(this).parent().prev().height($(this).parent().height());
43
- },
44
- function() {
45
- $(this).parent().toggleClass('showAll');
46
- $(this).parent().prev().height(tHeight);
47
- $(this).text("show all");
48
- });
49
- }
50
-
51
- function searchFrameButtons() {
52
- $('.full_list_link').click(function() {
53
- toggleSearchFrame(this, $(this).attr('href'));
54
- return false;
55
- });
56
- window.addEventListener('message', function(e) {
57
- if (e.data === 'navEscape') {
58
- $('#search_frame').slideUp(100);
59
- $('#search a').removeClass('active inactive');
60
- $(window).focus();
61
- }
62
- });
63
-
64
- $(window).resize(function() {
65
- if ($('#search:visible').length === 0) {
66
- $('#search_frame').slideUp(100);
67
- $('#search a').removeClass('active inactive');
68
- $(window).focus();
69
- }
70
- });
71
- }
72
-
73
- function toggleSearchFrame(id, link) {
74
- var frame = $('#search_frame');
75
- $('#search a').removeClass('active').addClass('inactive');
76
- if (frame.attr('src') === link && frame.css('display') !== "none") {
77
- frame.slideUp(100);
78
- $('#search a').removeClass('active inactive');
79
- }
80
- else {
81
- $(id).addClass('active').removeClass('inactive');
82
- if (frame.attr('src') !== link) frame.attr('src', link);
83
- frame.slideDown(100);
84
- }
85
- }
86
-
87
- function linkSummaries() {
88
- $('.summary_signature').click(function() {
89
- document.location = $(this).find('a').attr('href');
90
- });
91
- }
92
-
93
- function summaryToggle() {
94
- $('.summary_toggle').click(function(e) {
95
- e.preventDefault();
96
- localStorage.summaryCollapsed = $(this).text();
97
- $('.summary_toggle').each(function() {
98
- $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
99
- var next = $(this).parent().parent().nextAll('ul.summary').first();
100
- if (next.hasClass('compact')) {
101
- next.toggle();
102
- next.nextAll('ul.summary').first().toggle();
103
- }
104
- else if (next.hasClass('summary')) {
105
- var list = $('<ul class="summary compact" />');
106
- list.html(next.html());
107
- list.find('.summary_desc, .note').remove();
108
- list.find('a').each(function() {
109
- $(this).html($(this).find('strong').html());
110
- $(this).parent().html($(this)[0].outerHTML);
111
- });
112
- next.before(list);
113
- next.toggle();
114
- }
115
- });
116
- return false;
117
- });
118
- if (localStorage.summaryCollapsed == "collapse") {
119
- $('.summary_toggle').first().click();
120
- } else { localStorage.summaryCollapsed = "expand"; }
121
- }
122
-
123
- function generateTOC() {
124
- if ($('#filecontents').length === 0) return;
125
- var _toc = $('<ol class="top"></ol>');
126
- var show = false;
127
- var toc = _toc;
128
- var counter = 0;
129
- var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
130
- var i;
131
- if ($('#filecontents h1').length > 1) tags.unshift('h1');
132
- for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
133
- var lastTag = parseInt(tags[0][1], 10);
134
- $(tags.join(', ')).each(function() {
135
- if ($(this).parents('.method_details .docstring').length != 0) return;
136
- if (this.id == "filecontents") return;
137
- show = true;
138
- var thisTag = parseInt(this.tagName[1], 10);
139
- if (this.id.length === 0) {
140
- var proposedId = $(this).attr('toc-id');
141
- if (typeof(proposedId) != "undefined") this.id = proposedId;
142
- else {
143
- var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
144
- if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
145
- this.id = proposedId;
146
- }
147
- }
148
- if (thisTag > lastTag) {
149
- for (i = 0; i < thisTag - lastTag; i++) {
150
- var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
151
- }
152
- }
153
- if (thisTag < lastTag) {
154
- for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
155
- }
156
- var title = $(this).attr('toc-title');
157
- if (typeof(title) == "undefined") title = $(this).text();
158
- toc.append('<li><a href="#' + this.id + '">' + title + '</a></li>');
159
- lastTag = thisTag;
160
- });
161
- if (!show) return;
162
- html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
163
- $('#content').prepend(html);
164
- $('#toc').append(_toc);
165
- $('#toc .hide_toc').toggle(function() {
166
- $('#toc .top').slideUp('fast');
167
- $('#toc').toggleClass('hidden');
168
- $('#toc .title small').toggle();
169
- }, function() {
170
- $('#toc .top').slideDown('fast');
171
- $('#toc').toggleClass('hidden');
172
- $('#toc .title small').toggle();
173
- });
174
- }
175
-
176
- function navResizeFn(e) {
177
- if (e.which !== 1) {
178
- navResizeFnStop();
179
- return;
180
- }
181
-
182
- sessionStorage.navWidth = e.pageX.toString();
183
- $('.nav_wrap').css('width', e.pageX);
184
- $('.nav_wrap').css('-ms-flex', 'inherit');
185
- }
186
-
187
- function navResizeFnStop() {
188
- $(window).unbind('mousemove', navResizeFn);
189
- window.removeEventListener('message', navMessageFn, false);
190
- }
191
-
192
- function navMessageFn(e) {
193
- if (e.data.action === 'mousemove') navResizeFn(e.data.event);
194
- if (e.data.action === 'mouseup') navResizeFnStop();
195
- }
196
-
197
- function navResizer() {
198
- $('#resizer').mousedown(function(e) {
199
- e.preventDefault();
200
- $(window).mousemove(navResizeFn);
201
- window.addEventListener('message', navMessageFn, false);
202
- });
203
- $(window).mouseup(navResizeFnStop);
204
-
205
- if (sessionStorage.navWidth) {
206
- navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
207
- }
208
- }
209
-
210
- function navExpander() {
211
- var done = false, timer = setTimeout(postMessage, 500);
212
- function postMessage() {
213
- if (done) return;
214
- clearTimeout(timer);
215
- var opts = { action: 'expand', path: pathId };
216
- document.getElementById('nav').contentWindow.postMessage(opts, '*');
217
- done = true;
218
- }
219
-
220
- window.addEventListener('message', function(event) {
221
- if (event.data === 'navReady') postMessage();
222
- return false;
223
- }, false);
224
- }
225
-
226
- function mainFocus() {
227
- $('#main')[0].focus();
228
- }
229
-
230
- $(document).ready(function() {
231
- navResizer();
232
- navExpander();
233
- createSourceLinks();
234
- createDefineLinks();
235
- createFullTreeLinks();
236
- searchFrameButtons();
237
- linkSummaries();
238
- summaryToggle();
239
- generateTOC();
240
- mainFocus();
241
- });
242
-
243
- })();