|
7 | 7 | <tr>
|
8 | 8 | <td>
|
9 | 9 | {% highlight c++ %}{{ overload.signature_with_names }}{% endhighlight %}
|
10 |
| - </td> |
11 |
| - {% if overload_count > 1 %} |
12 |
| - <td><a href="#overload_{{ forloop.index }}">({{ forloop.index }})</a></td> |
13 |
| - {% endif %} |
14 |
| - <td> |
15 | 10 | {% if overload.annotation %}
|
16 | 11 | <span class='annotation'>({{overload.annotation | join: ", "}})</span>
|
17 | 12 | {% endif %}
|
18 | 13 | </td>
|
| 14 | + {% if overload_count > 1 %} |
| 15 | + <td><a href="#overload_{{ forloop.index }}">({{ forloop.index }})</a></td> |
| 16 | + {% endif %} |
19 | 17 | </tr>
|
20 | 18 | {% endfor %}
|
21 | 19 | </table>
|
22 | 20 |
|
23 |
| - {% if page.hyde.inline.description %} |
24 |
| - {{ page.hyde.inline.description | markdownify }} |
25 |
| - {% endif %} |
26 |
| - |
27 |
| - {% if page.hyde.description %} |
28 |
| - {{ page.hyde.description | markdownify }} |
| 21 | + {% if page.hyde.brief and |
| 22 | + page.hyde.brief != "__MISSING__" and |
| 23 | + page.hyde.brief != "__OPTIONAL__" and |
| 24 | + page.hyde.brief != "__INLINED__" %} |
| 25 | + {{page.hyde.brief | markdownify}} |
29 | 26 | {% endif %}
|
30 | 27 |
|
31 | 28 | {% for entity in page.hyde.overloads %}
|
32 | 29 | {% assign overload = entity[1] %}
|
33 | 30 | {% if overload_count > 1 %}
|
34 |
| - <h4 id="overload_{{ forloop.index }}">({{ forloop.index }}) {% highlight c++ %}{{ overload.signature_with_names }}{%endhighlight%}</h4> |
35 |
| - |
36 |
| - {% if overload.annotation %} |
37 |
| - <span class='annotation'>({{overload.annotation | join: ", "}})</span> |
38 |
| - {% endif %} |
39 |
| - {% endif %} |
40 |
| - {% comment %} |
41 |
| - `brief` isn't required for specific functions, but _is_ required for the top-level file that |
42 |
| - documents all the function's overloads. Thus a developer may define a `brief` for an |
43 |
| - overload though it is not required for `hyde`. Since it is the brief it should precede any |
44 |
| - enusuing descriptions. |
45 |
| - {% endcomment %} |
46 | 31 | {% if overload.inline.brief %}
|
47 |
| - {{overload.inline.brief | join: "<br/>" | markdownify }} |
| 32 | + <div id="overload_{{ forloop.index }}">{{ forloop.index }}) |
| 33 | + {{overload.inline.brief | join: "<br/>" | markdownify }} |
| 34 | + </div> |
48 | 35 | {% endif %}
|
| 36 | + {% endif %} |
| 37 | + {% endfor %} |
49 | 38 |
|
50 |
| - {% if overload.inline.description %} |
51 |
| - {{overload.inline.description | join: "<br/>" | markdownify }} |
52 |
| - {% endif %} |
| 39 | + {% for entity in page.hyde.overloads %} |
| 40 | + {% assign overload = entity[1] %} |
| 41 | + {% comment %} |
| 42 | + `brief` isn't required for specific functions, but _is_ required for the top-level file that |
| 43 | + documents all the function's overloads. Thus a developer may define a `brief` for an |
| 44 | + overload though it is not required for `hyde`. Since it is the brief it should precede any |
| 45 | + enusuing descriptions. |
| 46 | + {% endcomment %} |
53 | 47 |
|
54 |
| - {% if overload.description and |
55 |
| - overload.description != "__INLINED__" and |
56 |
| - overload.description != "__OPTIONAL__" %} |
57 |
| - {{overload.description | markdownify}} |
58 |
| - {% endif %} |
| 48 | + {% if overload.inline.description %} |
| 49 | + {{overload.inline.description | join: "<br/>" | markdownify }} |
| 50 | + {% endif %} |
59 | 51 |
|
60 |
| - {% if overload.inline.pre %} |
61 |
| - <h5>Preconditions</h5> |
62 |
| - {{overload.inline.pre | markdownify}} |
63 |
| - {% endif %} |
| 52 | + {% if overload.description and |
| 53 | + overload.description != "__INLINED__" and |
| 54 | + overload.description != "__OPTIONAL__" %} |
| 55 | + {{overload.description | markdownify}} |
| 56 | + {% endif %} |
64 | 57 |
|
65 |
| - {% if overload.arguments %} |
66 |
| - <h5>Parameters</h5> |
67 |
| - <table class='declaration-table'> |
68 |
| - {% for arg in overload.arguments %} |
69 |
| - <tr> |
70 |
| - <td style="padding-right: 1em"> |
71 |
| - {% if overload.inline.arguments[arg.name].direction %} |
72 |
| - <span class="annotation">{{overload.inline.arguments[arg.name].direction}}</span> |
73 |
| - {% else %} |
74 |
| - |
75 |
| - {% endif %} |
76 |
| - </td> |
77 |
| - <td style="white-space: nowrap; padding-right: 1em"> |
78 |
| - {% highlight c++ %}{{arg.type}}{% endhighlight %} |
79 |
| - </td> |
80 |
| - <td style="padding-right: 1em"> |
81 |
| - {% if (arg.name != "") and (arg.unnamed == false) %} |
82 |
| - {% highlight c++ %}{{arg.name}}{% endhighlight %} |
83 |
| - {% else %} |
84 |
| - <i>unnamed</i> |
85 |
| - {% endif %} |
86 |
| - </td> |
87 |
| - <td width='100%'> |
88 |
| - {% if arg.description and (arg.description != "__OPTIONAL__") %} |
89 |
| - {{arg.description | markdownify}} |
90 |
| - {% else if arg.name and overload.inline.arguments[arg.name].description %} |
91 |
| - {{overload.inline.arguments[arg.name].description | markdownify}} |
92 |
| - {% endif %} |
93 |
| - </td> |
94 |
| - </tr> |
95 |
| - {% endfor %} |
96 |
| - </table> |
97 |
| - {% endif %} |
| 58 | + {% if overload.inline.pre %} |
| 59 | + <h5>Preconditions</h5> |
| 60 | + {{overload.inline.pre | markdownify}} |
| 61 | + {% endif %} |
98 | 62 |
|
99 |
| - {% if (overload.return and |
100 |
| - (overload.return != "__OPTIONAL__")) or |
101 |
| - overload.inline.return %} |
102 |
| - <h5>Returns</h5> |
103 |
| - {%endif%} |
104 |
| - {% if overload.return and (overload.return != "__OPTIONAL__") %} |
105 |
| - {{overload.return | markdownify}} |
106 |
| - {% endif %} |
107 |
| - {% if overload.inline.return %} |
108 |
| - {{overload.inline.return | markdownify}} |
109 |
| - {% endif %} |
| 63 | + {% if overload.arguments %} |
| 64 | + <h5>Parameters</h5> |
| 65 | + <table class='declaration-table'> |
| 66 | + {% for arg in overload.arguments %} |
| 67 | + <tr> |
| 68 | + <td style="padding-right: 1em"> |
| 69 | + {% if overload.inline.arguments[arg.name].direction %} |
| 70 | + <span class="annotation">{{overload.inline.arguments[arg.name].direction}}</span> |
| 71 | + {% else %} |
| 72 | + |
| 73 | + {% endif %} |
| 74 | + </td> |
| 75 | + <td style="white-space: nowrap; padding-right: 1em"> |
| 76 | + {% highlight c++ %}{{arg.type}}{% endhighlight %} |
| 77 | + </td> |
| 78 | + <td style="padding-right: 1em"> |
| 79 | + {% if (arg.name != "") and (arg.unnamed == false) %} |
| 80 | + {% highlight c++ %}{{arg.name}}{% endhighlight %} |
| 81 | + {% else %} |
| 82 | + <i>unnamed</i> |
| 83 | + {% endif %} |
| 84 | + </td> |
| 85 | + <td width='100%'> |
| 86 | + {% if arg.description and (arg.description != "__OPTIONAL__") %} |
| 87 | + {{arg.description | markdownify}} |
| 88 | + {% else if arg.name and overload.inline.arguments[arg.name].description %} |
| 89 | + {{overload.inline.arguments[arg.name].description | markdownify}} |
| 90 | + {% endif %} |
| 91 | + </td> |
| 92 | + </tr> |
| 93 | + {% endfor %} |
| 94 | + </table> |
| 95 | + {% endif %} |
110 | 96 |
|
111 |
| - {% if overload.inline.post %} |
112 |
| - <h5>Postconditions</h5> |
113 |
| - {{overload.inline.post | markdownify}} |
114 |
| - {% endif %} |
| 97 | + {% if (overload.return and |
| 98 | + (overload.return != "__OPTIONAL__")) or |
| 99 | + overload.inline.return %} |
| 100 | + <h5>Returns</h5> |
| 101 | + {%endif%} |
| 102 | + {% if overload.return and (overload.return != "__OPTIONAL__") %} |
| 103 | + {{overload.return | markdownify}} |
| 104 | + {% endif %} |
| 105 | + {% if overload.inline.return %} |
| 106 | + {{overload.inline.return | markdownify}} |
| 107 | + {% endif %} |
115 | 108 |
|
116 |
| - {% if overload.inline.throw %} |
117 |
| - <h5>Exceptions</h5> |
118 |
| - {{overload.inline.throw | markdownify}} |
119 |
| - {% endif %} |
| 109 | + {% if overload.inline.post %} |
| 110 | + <h5>Postconditions</h5> |
| 111 | + {{overload.inline.post | markdownify}} |
| 112 | + {% endif %} |
120 | 113 |
|
121 |
| - {% if overload.inline.todo %} |
122 |
| - <h5>To Do</h5> |
123 |
| - {{overload.inline.todo | markdownify}} |
124 |
| - {% endif %} |
| 114 | + {% if overload.inline.throw %} |
| 115 | + <h5>Exceptions</h5> |
| 116 | + {{overload.inline.throw | markdownify}} |
| 117 | + {% endif %} |
125 | 118 |
|
126 |
| - {% if overload.inline.warning %} |
127 |
| - <h5>Warning</h5> |
128 |
| - {{overload.inline.warning | markdownify}} |
129 |
| - {% endif %} |
| 119 | + {% if overload.inline.todo %} |
| 120 | + <h5>To Do</h5> |
| 121 | + {{overload.inline.todo | markdownify}} |
| 122 | + {% endif %} |
130 | 123 |
|
131 |
| - {% for entry in overload.inline %} |
132 |
| - {% if entry[0] == "owner" or |
133 |
| - entry[0] == "brief" or |
134 |
| - entry[0] == "description" or |
135 |
| - entry[0] == "pre" or |
136 |
| - entry[0] == "post" or |
137 |
| - entry[0] == "arguments" or |
138 |
| - entry[0] == "return" or |
139 |
| - entry[0] == "throw" or |
140 |
| - entry[0] == "todo" or |
141 |
| - entry[0] == "warning" %} |
142 |
| - {% continue %} |
143 |
| - {% endif %} |
144 |
| - <h5>{{entry[0]}} <span class='annotation'>(additional inline)</span></h5> |
145 |
| - {{entry[1] | markdownify }} |
146 |
| - {% endfor %} |
| 124 | + {% if overload.inline.warning %} |
| 125 | + <h5>Warning</h5> |
| 126 | + {{overload.inline.warning | markdownify}} |
| 127 | + {% endif %} |
| 128 | + |
| 129 | + {% for entry in overload.inline %} |
| 130 | + {% if entry[0] == "owner" or |
| 131 | + entry[0] == "brief" or |
| 132 | + entry[0] == "description" or |
| 133 | + entry[0] == "pre" or |
| 134 | + entry[0] == "post" or |
| 135 | + entry[0] == "arguments" or |
| 136 | + entry[0] == "return" or |
| 137 | + entry[0] == "throw" or |
| 138 | + entry[0] == "todo" or |
| 139 | + entry[0] == "warning" %} |
| 140 | + {% continue %} |
| 141 | + {% endif %} |
| 142 | + <h5>{{entry[0]}} <span class='annotation'>(additional inline)</span></h5> |
| 143 | + {{entry[1] | markdownify }} |
| 144 | + {% endfor %} |
147 | 145 | {% endfor %}
|
| 146 | + |
| 147 | + {% if page.hyde.inline.description %} |
| 148 | + {{ page.hyde.inline.description | markdownify }} |
| 149 | + {% endif %} |
| 150 | + |
| 151 | + {% if page.hyde.description %} |
| 152 | + {{ page.hyde.description | markdownify }} |
| 153 | + {% endif %} |
148 | 154 | {% endif %}
|
0 commit comments