source: trunk/doc/awk/classes_gen.awk@ 10

Last change on this file since 10 was 4, checked in by Pavel Demin, 16 years ago

first commit

File size: 1.3 KB
Line 
1BEGIN {
2 print "<hr>"
3 print "<H2>Classes</H2>"
4 print "<hr>"
5
6 print "<table style=\"border: 1px dotted;\" align=\"center\" border=\"0\" cellpadding=\"7\" cellspacing=\"3\" widt=\"95%\">"
7 print "<tr><td><b>Parameter</b></td>"
8 print "<td><b>Definition</b></td>"
9 print "<td><b>How it was calculated</b></td></tr>"
10
11}
12
13function print_line(name, comment, even, end) {
14 if(name != ""){
15 if(even) print "<tr bgcolor=\"#eeeeee\">"
16 else print "<tr bgcolor=\"#ffffff\">"
17 print " <td>"name"</td>"
18 split(comment, a, "|");
19 print " <td>"a[1]"</td>"
20 print " <td>"a[2]"</td>"
21 print "</tr>"
22 }
23}
24
25/^ *class ExRoot/{
26 print_line(name, comment, even, 1);
27 even = 1;
28 name = "";
29 comment = "";
30 split($2, a, ":");
31 print "<tr bgcolor=\"#ffffff\"><td colspan=3><hr><a name=\""a[1]"\"><H3>"a[1]"</H3><hr></td></tr>"
32}
33
34/: public ExRoot[^S]/{
35 name = sprintf("<a href=\"#%s\">%s</a>", $4, $4);
36 split($2, a, ":");
37 comment = sprintf("%s inherits all %s parameters", a[1], $4);
38}
39
40/^ *[A-Za-z_]* [A-Za-z].*; \/\/ / {
41 print_line(name, comment, even, 0);
42 split($2, a, ";");
43 name = a[1];
44 split($0, a, "// ");
45 comment = a[2];
46 even = !even;
47}
48
49/^ +\/\/ /{split($0, a, "// "); comment = comment" "a[2]}
50END {
51 print_line(name, comment, even, 1);
52 print "</table>"
53 print "</body></html>"
54}
55
Note: See TracBrowser for help on using the repository browser.