[69] | 1 | |
---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 4 | |
---|
| 5 | <!-- Template needs structure with the following fields: |
---|
| 6 | version : IDLdoc version |
---|
| 7 | date : string containing date of file creation |
---|
| 8 | embed : 0 for link to CSS, 1 for embed CSS |
---|
| 9 | css_location : if embed then string filename of CSS file location, o/w href to CSS file |
---|
| 10 | idldoc_syntax_filename : file containing IDLdoc output for the idldoc routine |
---|
| 11 | navbar_filename : filename of navbar template |
---|
| 12 | footer : filename of footer file to include |
---|
| 13 | tagline_filename : filename of tagline template |
---|
| 14 | Plus stuff needed by the templates: navbar, tagline |
---|
| 15 | --> |
---|
| 16 | |
---|
| 17 | <!-- Generated by IDLdoc [% version %] on [% date %] --> |
---|
| 18 | |
---|
| 19 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 20 | <head> |
---|
| 21 | <title>IDLdoc Developer's Help ([% title %])</title> |
---|
| 22 | |
---|
| 23 | [% IF embed %] |
---|
| 24 | <style type="text/css" media="all"> |
---|
| 25 | [% INCLUDE css_location %] |
---|
| 26 | </style> |
---|
| 27 | <style type="text/css" media="print"> |
---|
| 28 | [% INCLUDE print_css_location %] |
---|
| 29 | </style> |
---|
| 30 | [% ELSE %] |
---|
| 31 | <link rel="stylesheet" type="text/css" href="[% root %]/main_files.css" media="all"/> |
---|
| 32 | <link rel="stylesheet" type="text/css" href="[% root %]/main_files_print.css" media="print"/> |
---|
| 33 | [% END %] |
---|
| 34 | |
---|
| 35 | <script type="text/javascript"> |
---|
| 36 | function setTitle() { |
---|
| 37 | parent.document.title="IDLdoc Developer's Help ([% title %])"; |
---|
| 38 | } |
---|
| 39 | </script> |
---|
| 40 | </head> |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | <body onload="setTitle();"> |
---|
| 44 | |
---|
| 45 | [% INCLUDE_TEMPLATE navbar_filename %] |
---|
| 46 | |
---|
| 47 | <div id="container"> |
---|
| 48 | |
---|
| 49 | <h1>Modifying IDLdoc's output</h1> |
---|
| 50 | |
---|
| 51 | <p>This guide discusses how to modify the output from IDLdoc by |
---|
| 52 | modifying the template files (*.tt) that are provided with |
---|
| 53 | IDLdoc. Currently, only the templates directly documenting *.pro |
---|
| 54 | files (pro-file.tt), templates included by pro-file.tt |
---|
| 55 | (navbar.tt and tagline.tt) and objects implementing the template |
---|
| 56 | interface used by pro-file.tt (IDLdocRoutine and IDLdocParam) |
---|
| 57 | are documented for user customization. The plans is to release |
---|
| 58 | the documentation for other templates as they become more stable |
---|
| 59 | in future releases of IDLdoc.</p> |
---|
| 60 | |
---|
| 61 | <p>In general, if one of the below variables is not |
---|
| 62 | defined/not-appropriate it will be set to '' or -1.</p> |
---|
| 63 | |
---|
| 64 | <h2>navbar.tt</h2> |
---|
| 65 | |
---|
| 66 | <p>This template is included by many other templates requiring |
---|
| 67 | those templates to provide the following variables:</p> |
---|
| 68 | |
---|
| 69 | <dl class="variables"> |
---|
| 70 | <dt>title</dt> |
---|
| 71 | <dd>title of the IDLdoc library</dd> |
---|
| 72 | |
---|
| 73 | <dt>subtitle</dt> |
---|
| 74 | <dd>subtitle of the IDLdoc library</dd> |
---|
| 75 | |
---|
| 76 | <dt>categories_href</dt> |
---|
| 77 | <dd>relative link to the categories page</dd> |
---|
| 78 | |
---|
| 79 | <dt>categories_selected</dt> |
---|
| 80 | <dd>boolean on whether the current page is the categories page</dd> |
---|
| 81 | |
---|
| 82 | <dt>dir_overview_href</dt> |
---|
| 83 | <dd>relative link to the directory overview page</dd> |
---|
| 84 | |
---|
| 85 | <dt>dir_overview_selected</dt> |
---|
| 86 | <dd>boolean on whether the current page is the directory overview page</dd> |
---|
| 87 | |
---|
| 88 | <dt>etc_selected</dt> |
---|
| 89 | <dd>boolean on whether the current page is an "Etc" page</dd> |
---|
| 90 | |
---|
| 91 | <dt>file_selected</dt> |
---|
| 92 | <dd>boolean on whether the current page is documentation of a PRO or SAV file</dd> |
---|
| 93 | |
---|
| 94 | <dt>help_href</dt> |
---|
| 95 | <dd>relative link to the help page</dd> |
---|
| 96 | |
---|
| 97 | <dt>help_selected</dt> |
---|
| 98 | <dd>boolean on whether the current page is the help page</dd> |
---|
| 99 | |
---|
| 100 | <dt>index_href</dt> |
---|
| 101 | <dd>relative link to the full index</dd> |
---|
| 102 | |
---|
| 103 | <dt>index_selected</dt> |
---|
| 104 | <dd>boolean on whether the current page is the full index page</dd> |
---|
| 105 | |
---|
| 106 | <dt>overview_href</dt> |
---|
| 107 | <dd>relative link to the library overview page</dd> |
---|
| 108 | |
---|
| 109 | <dt>overview_selected</dt> |
---|
| 110 | <dd>boolean on whether the current page is the library overview page</dd> |
---|
| 111 | |
---|
| 112 | <dt>search_href</dt> |
---|
| 113 | <dd>relative link to the search page</dd> |
---|
| 114 | |
---|
| 115 | <dt>search_selected</dt> |
---|
| 116 | <dd>boolean on whether the current page is the search page</dd> |
---|
| 117 | |
---|
| 118 | <dt>source_href</dt> |
---|
| 119 | <dd>relative link to the source code of a PRO file</dd> |
---|
| 120 | |
---|
| 121 | <dt>source_selected</dt> |
---|
| 122 | <dd>boolean on whether the current page is a source code page</dd> |
---|
| 123 | |
---|
| 124 | <dt>user</dt> |
---|
| 125 | <dd>boolean on whether the current documentation is generated for a user (as opposed to a developer)</dd> |
---|
| 126 | |
---|
| 127 | <dt>prev_file_href</dt> |
---|
| 128 | <dd>relative link to the previous PRO or SAV file page</dd> |
---|
| 129 | |
---|
| 130 | <dt>next_file_href</dt> |
---|
| 131 | <dd>relative link the next PRO or SAV file page</dd> |
---|
| 132 | |
---|
| 133 | <dt>view_single_page_href</dt> |
---|
| 134 | <dd>link to the current page</dd> |
---|
| 135 | |
---|
| 136 | <dt>view_frames_href</dt> |
---|
| 137 | <dd>link to the library index.html page</dd> |
---|
| 138 | |
---|
| 139 | <dt>summary_fields_href</dt> |
---|
| 140 | <dd>internal link to the fields summary; '' if no fields</dd> |
---|
| 141 | |
---|
| 142 | <dt>summary_routine_href</dt> |
---|
| 143 | <dd>internal link to the routine summary, '' if only one routine</dd> |
---|
| 144 | |
---|
| 145 | <dt>details_routine_href</dt> |
---|
| 146 | <dd>internal link to the start of the routine details</dd> |
---|
| 147 | </dl> |
---|
| 148 | |
---|
| 149 | <h2>tagline.tt</h2> |
---|
| 150 | |
---|
| 151 | <p>This template is included by many other templates requiring |
---|
| 152 | those templates to provide the following variables:</p> |
---|
| 153 | |
---|
| 154 | <dl class="variables"> |
---|
| 155 | <dt>version</dt> |
---|
| 156 | <dd>IDLdoc version as a string</dd> |
---|
| 157 | |
---|
| 158 | <dt>date</dt> |
---|
| 159 | <dd>string containing date of file creation</dd> |
---|
| 160 | </dl> |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | <h2>pro-file.tt</h2> |
---|
| 164 | |
---|
| 165 | <p>This file produces the output for the documentation of IDL |
---|
| 166 | source code files. Variables provided to this template are all |
---|
| 167 | those required by the navbar.tt and tagline.tt templates and |
---|
| 168 | those listed below:</p> |
---|
| 169 | |
---|
| 170 | <dl class="variables"> |
---|
| 171 | <dt>has_fields</dt> |
---|
| 172 | <dd>base filename</dd> |
---|
| 173 | |
---|
| 174 | <dt>is_class</dt> |
---|
| 175 | <dd>boolean on whether this file corresponds to a class definition (and class variable is present)</dd> |
---|
| 176 | |
---|
| 177 | <dt>class</dt> |
---|
| 178 | <dd>IDLdocClass object</dd> |
---|
| 179 | |
---|
| 180 | <dt>fields</dt> |
---|
| 181 | <dd>base filename</dd> |
---|
| 182 | |
---|
| 183 | <dt>pro_file</dt> |
---|
| 184 | <dd>base filename</dd> |
---|
| 185 | |
---|
| 186 | <dt>pro_dir</dt> |
---|
| 187 | <dd>directory for file</dd> |
---|
| 188 | |
---|
| 189 | <dt>root</dt> |
---|
| 190 | <dd>relative path to the root of the library</dd> |
---|
| 191 | |
---|
| 192 | <dt>last_modified</dt> |
---|
| 193 | <dd>date last modified as a string</dd> |
---|
| 194 | |
---|
| 195 | <dt>file_comments</dt> |
---|
| 196 | <dd>file level comments</dd> |
---|
| 197 | |
---|
| 198 | <dt>nroutines</dt> |
---|
| 199 | <dd>number of IDLdocRoutine objects in routines array</dd> |
---|
| 200 | |
---|
| 201 | <dt>routines</dt> |
---|
| 202 | <dd>array of IDLdocRoutine objects; see below for variables in |
---|
| 203 | these objects</dd> |
---|
| 204 | |
---|
| 205 | <dt>nonavbar</dt> |
---|
| 206 | <dd>set to 1 to indicate no navbar, otherwise set to 0</dd> |
---|
| 207 | |
---|
| 208 | <dt>navbar_filename</dt> |
---|
| 209 | <dd>filename of navbar template; appropriate for |
---|
| 210 | INCLUDE_TEMPLATE directive</dd> |
---|
| 211 | |
---|
| 212 | <dt>embed</dt> |
---|
| 213 | <dd>0 for link to CSS, 1 for embed CSS</dd> |
---|
| 214 | |
---|
| 215 | <dt>css_location</dt> |
---|
| 216 | <dd>if embed then string filename of CSS file location, o/w |
---|
| 217 | href to CSS file; for all media types</dd> |
---|
| 218 | |
---|
| 219 | <dt>print_css_location</dt> |
---|
| 220 | <dd>if embed then string filename of CSS file location, o/w |
---|
| 221 | href to CSS file; for printing only</dd> |
---|
| 222 | |
---|
| 223 | <dt>footer</dt> |
---|
| 224 | <dd>filename of user-created footer to insert; appropriate for |
---|
| 225 | the INCLUDE directive</dd> |
---|
| 226 | |
---|
| 227 | <dt>separator</dt> |
---|
| 228 | <dd>correct path separator, / or \ depending on Unix or |
---|
| 229 | Windows system</dd> |
---|
| 230 | |
---|
| 231 | <dt>tagline_filename</dt> |
---|
| 232 | <dd>name of template for the bottom of the file; appropriate |
---|
| 233 | for the INCLUDE_TEMPLATE directive</dd> |
---|
| 234 | </dl> |
---|
| 235 | |
---|
| 236 | |
---|
| 237 | <h3>IDLdocRoutine objects in pro-file.tt</h3> |
---|
| 238 | |
---|
| 239 | <dl class="variables"> |
---|
| 240 | <dt>routine_name</dt> |
---|
| 241 | <dd>string name of the routine</dd> |
---|
| 242 | |
---|
| 243 | <dt>routine_url</dt> |
---|
| 244 | <dd>internal url to the start of the routine details</dd> |
---|
| 245 | |
---|
| 246 | <dt>is_func</dt> |
---|
| 247 | <dd>boolean on whether the routine is a function</dd> |
---|
| 248 | |
---|
| 249 | <dt>obsolete</dt> |
---|
| 250 | <dd>boolean on whether the routine is marked obsolete</dd> |
---|
| 251 | |
---|
| 252 | <dt>abstract</dt> |
---|
| 253 | <dd>boolean on whether the routine is abstract (i.e. not implemented)</dd> |
---|
| 254 | |
---|
| 255 | <dt>private</dt> |
---|
| 256 | <dd>boolean on whether the routine is private (i.e. not visible in USER mode)</dd> |
---|
| 257 | |
---|
| 258 | <dt>categories_present</dt> |
---|
| 259 | <dd>boolean on whether the routine is marked with categories</dd> |
---|
| 260 | |
---|
| 261 | <dt>categories</dt> |
---|
| 262 | <dd>string array of list of categories as listed in the source</dd> |
---|
| 263 | |
---|
| 264 | <dt>ntotalparams</dt> |
---|
| 265 | <dd>total number of positional parameters and keywords</dd> |
---|
| 266 | |
---|
| 267 | <dt>nparams</dt> |
---|
| 268 | <dd>number of positional parameters</dd> |
---|
| 269 | |
---|
| 270 | <dt>params</dt> |
---|
| 271 | <dd>array of IDLdocParam objects</dd> |
---|
| 272 | |
---|
| 273 | <dt>nkeywords</dt> |
---|
| 274 | <dd>number of keywords</dd> |
---|
| 275 | |
---|
| 276 | <dt>keywords</dt> |
---|
| 277 | <dd>array of IDLdocParam objects</dd> |
---|
| 278 | |
---|
| 279 | <dt>short_comment</dt> |
---|
| 280 | <dd>first sentence of the routine comments</dd> |
---|
| 281 | |
---|
| 282 | <dt>statistics</dt> |
---|
| 283 | <dd>boolean on whether the McCabe complexity statistics have been calculated</dd> |
---|
| 284 | |
---|
| 285 | <dt>mccabe_cyclic</dt> |
---|
| 286 | <dd>McCabe Cyclic complexity (computed)</dd> |
---|
| 287 | |
---|
| 288 | <dt>mccabe_essential</dt> |
---|
| 289 | <dd>McCabe Essential complexity (computed)</dd> |
---|
| 290 | |
---|
| 291 | <dt>mccabe_mod_design</dt> |
---|
| 292 | <dd>McCabe Modular Design complexity (computed)</dd> |
---|
| 293 | |
---|
| 294 | <dt>routine_comments</dt> |
---|
| 295 | <dd>string array of comments for the routine</dd> |
---|
| 296 | |
---|
| 297 | <dt>preformat</dt> |
---|
| 298 | <dd>true if the comments are to be stripped from the source code and placed in the output with the same line breaks and formatting as the source code</dd> |
---|
| 299 | |
---|
| 300 | <dt>returns_present</dt> |
---|
| 301 | <dd>boolean on whether the returns tag is present</dd> |
---|
| 302 | |
---|
| 303 | <dt>returns</dt> |
---|
| 304 | <dd>documents the return value of a function</dd> |
---|
| 305 | |
---|
| 306 | <dt>examples_present</dt> |
---|
| 307 | <dd>boolean on whether the examples tag is present</dd> |
---|
| 308 | |
---|
| 309 | <dt>examples</dt> |
---|
| 310 | <dd>string array of example code using the routine</dd> |
---|
| 311 | |
---|
| 312 | <dt>author_present</dt> |
---|
| 313 | <dd>boolean on whether the author tag is present</dd> |
---|
| 314 | |
---|
| 315 | <dt>author</dt> |
---|
| 316 | <dd>author(s) of the routine</dd> |
---|
| 317 | |
---|
| 318 | <dt>version_present</dt> |
---|
| 319 | <dd>boolean on whether the version tag is present</dd> |
---|
| 320 | |
---|
| 321 | <dt>version</dt> |
---|
| 322 | <dd>version of the routine</dd> |
---|
| 323 | |
---|
| 324 | <dt>history_present</dt> |
---|
| 325 | <dd>boolean on whether the history tag is present</dd> |
---|
| 326 | |
---|
| 327 | <dt>history</dt> |
---|
| 328 | <dd>string array of history of the routine</dd> |
---|
| 329 | |
---|
| 330 | <dt>copyright_present</dt> |
---|
| 331 | <dd>boolean on whether the copyright tag is present</dd> |
---|
| 332 | |
---|
| 333 | <dt>copyright</dt> |
---|
| 334 | <dd>string array of copyright information about the routine</dd> |
---|
| 335 | |
---|
| 336 | <dt>obsolete_comments_present</dt> |
---|
| 337 | <dd>boolean on whether the obsolete tag is present</dd> |
---|
| 338 | |
---|
| 339 | <dt>obsolete_comments</dt> |
---|
| 340 | <dd>comments following the obsolete tag and further explaining the status of the routine (and alternatives)</dd> |
---|
| 341 | |
---|
| 342 | <dt>bugs_present</dt> |
---|
| 343 | <dd>boolean on whether the bugs tag is present</dd> |
---|
| 344 | |
---|
| 345 | <dt>bugs</dt> |
---|
| 346 | <dd>string array describing known issues with the routine</dd> |
---|
| 347 | |
---|
| 348 | <dt>todo_present</dt> |
---|
| 349 | <dd>boolean on whether the todo tag is present</dd> |
---|
| 350 | |
---|
| 351 | <dt>todo</dt> |
---|
| 352 | <dd>string array of items that still need to be done for the routine</dd> |
---|
| 353 | |
---|
| 354 | <dt>restrictions_present</dt> |
---|
| 355 | <dd>boolean on whether the restrictions tag is present</dd> |
---|
| 356 | |
---|
| 357 | <dt>restrictions</dt> |
---|
| 358 | <dd>restrictions on the use of the routine</dd> |
---|
| 359 | |
---|
| 360 | <dt>inherits_present</dt> |
---|
| 361 | <dd>boolean on whether the inherits tag is present</dd> |
---|
| 362 | |
---|
| 363 | <dt>inherits</dt> |
---|
| 364 | <dd>desribes other classes the class inherits from (this is not needed any longer)</dd> |
---|
| 365 | |
---|
| 366 | <dt>requires_present</dt> |
---|
| 367 | <dd>boolean on whether the requires tag is present</dd> |
---|
| 368 | |
---|
| 369 | <dt>requires</dt> |
---|
| 370 | <dd>which IDL verion is necessary to run this routine</dd> |
---|
| 371 | |
---|
| 372 | <dt>uses_present</dt> |
---|
| 373 | <dd>boolean on whether the uses tag is present</dd> |
---|
| 374 | |
---|
| 375 | <dt>uses</dt> |
---|
| 376 | <dd>which routines this routine calls</dd> |
---|
| 377 | |
---|
| 378 | <dt>common_blocks_present</dt> |
---|
| 379 | <dd>boolean on whether the common block information is present</dd> |
---|
| 380 | |
---|
| 381 | <dt>common_blocks</dt> |
---|
| 382 | <dd>names of common blocks used by routine</dd> |
---|
| 383 | |
---|
| 384 | <dt>precondition_present</dt> |
---|
| 385 | <dd>boolean on whether the routine is marked with a precondition tag</dd> |
---|
| 386 | |
---|
| 387 | <dt>precondition</dt> |
---|
| 388 | <dd>condition that should be satisfied before the routine is executed</dd> |
---|
| 389 | |
---|
| 390 | <dt>postcondition_present</dt> |
---|
| 391 | <dd>boolean on whether the routine is marked with a postcondition tag</dd> |
---|
| 392 | |
---|
| 393 | <dt>postcondition</dt> |
---|
| 394 | <dd>condition that should be satisfied after the routine is executed</dd> |
---|
| 395 | |
---|
| 396 | </dl> |
---|
| 397 | |
---|
| 398 | |
---|
| 399 | <h3>IDLdocParam objects in pro-file.tt</h3> |
---|
| 400 | |
---|
| 401 | <dl class="variables"> |
---|
| 402 | <dt>name</dt> |
---|
| 403 | <dd>name of the parameter</dd> |
---|
| 404 | |
---|
| 405 | <dt>in</dt> |
---|
| 406 | <dd>true if parameter is an input to the routine</dd> |
---|
| 407 | |
---|
| 408 | <dt>out</dt> |
---|
| 409 | <dd>true if the parameter is an output to the routine</dd> |
---|
| 410 | |
---|
| 411 | <dt>optional</dt> |
---|
| 412 | <dd>true if parameter is optional</dd> |
---|
| 413 | |
---|
| 414 | <dt>required</dt> |
---|
| 415 | <dd>true if parameter is required</dd> |
---|
| 416 | |
---|
| 417 | <dt>private</dt> |
---|
| 418 | <dd>hidden if parameter is supposed to be hidden from users of the routine, but visible to developers</dd> |
---|
| 419 | |
---|
| 420 | <dt>hidden</dt> |
---|
| 421 | <dd>true if parameter is supposed to be hidden</dd> |
---|
| 422 | |
---|
| 423 | <dt>type</dt> |
---|
| 424 | <dd>data type of the parameter</dd> |
---|
| 425 | |
---|
| 426 | <dt>boolean</dt> |
---|
| 427 | <dd>true if the param is a switch</dd> |
---|
| 428 | |
---|
| 429 | <dt>default</dt> |
---|
| 430 | <dd>default value of the parameter</dd> |
---|
| 431 | |
---|
| 432 | <dt>comments</dt> |
---|
| 433 | <dd>string array of comments for parameter</dd> |
---|
| 434 | |
---|
| 435 | <dt>delim</dt> |
---|
| 436 | <dd>appropriate delimiter preceeding parameter in a syntax listing of the routine (i.e. always a comma unless it's the first parameter of a function call)</dd> |
---|
| 437 | </dl> |
---|
| 438 | |
---|
| 439 | [% IF footer NE '' %]<div id="footer">[% INCLUDE footer %]</div>[% END %] |
---|
| 440 | |
---|
| 441 | [% INCLUDE_TEMPLATE tagline_filename %] |
---|
| 442 | |
---|
| 443 | </div> |
---|
| 444 | |
---|
| 445 | </body> |
---|
| 446 | </html> |
---|