Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[DOC] hide a bit the structure list, nobody cares
[simgrid.git] / tools / doxygen / index_create.pl
1 #!/usr/bin/perl -w
2
3 ($#ARGV >= 1) or die "Usage: index_create.pl <input-tag-file> <output-doc-file>";
4
5 my($type) = "";
6 my($name) = "";
7 my(%database);
8
9 $input  = $ARGV[0];
10 $output = $ARGV[1];
11 open FILE,$input;
12 while($line=<FILE>) {
13     chomp $line;
14     if($line=~/compound kind=/) {
15         $type = $line;
16         $type =~ s/^[^\"]*\"//;
17         $type =~ s/\".*$//;
18         $line=<FILE>;chomp $line;
19     }
20     if($line=~/member kind=/) {
21         $type = $line;
22         $type =~ s/^[^\"]*\"//;
23         $type =~ s/\".*$//;
24         $line=<FILE>;chomp $line;
25     }
26     if($line=~/<name>/) {
27         $name = $line;
28         $name =~ s/.*<name>//;
29         $name =~ s/<\/name>.*//;
30         $database{$type}{$name} = 1;
31         $type = "";
32         $name = "";
33         next;
34     }
35 }
36 close FILE;
37
38 open OUTPUT,"> $output";
39 print OUTPUT <<EOF;
40 This file was generated by tools/doxygen/index_create.pl. DO NOT EDIT.
41
42 /** \\defgroup API_index Full Index
43   * \\ingroup SimGrid_API
44   * \\brief The alphabetical list of all functions, macros and types 
45   *  defined by SimGrid
46   *
47   * List of all functions, variables, defines, enums, and typedefs with
48   * links to the files they belong to. 
49   *
50   * \\htmlonly Altough completely useless, the complete list of structures defined can be found <a href="annotated.html">here</a> \\endhtmlonly
51
52
53 EOF
54
55 foreach $type (qw(define enumeration enumvalue function typedef)) {
56     if(defined $database{$type}) {
57         print OUTPUT "<h2>$type</h2> \n  <ul>\n";
58         foreach $name (sort keys %{$database{$type}}) {
59             if($type eq "function") {
60                 print OUTPUT "\t<LI> $name()</LI>\n";
61             } else {
62                 print OUTPUT "\t<LI> #$name</LI>\n";
63             }
64         }
65         print OUTPUT "\n  </ul>\n";
66     }
67 }
68 print OUTPUT "*/";
69 close OUTPUT;
70