File: namespace.plg

package info (click to toggle)
clanlib 1.0~svn3827-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 24,696 kB
  • sloc: cpp: 101,591; xml: 6,410; makefile: 1,742; ansic: 463; perl: 424; php: 247; sh: 53
file content (104 lines) | stat: -rw-r--r-- 3,009 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
use strict;
sub plugin {
  my $global=shift;
  print "Generation namespace documentation\n";
  print_namespaces($global);
  print "Done with namespaces\n";
}

sub print_namespaces {
  my $space=shift;
  print_namespace($space);
}

sub print_namespace {
  $_=shift;

  print "Generating $$_{fullname} index\n";
  open(FILE,">html/$$_{fullname}_index.html");

  print FILE "<html>\n";
  print FILE "<head><title>ClanLib Reference: $$_{fullname}</title></head>\n";
  print FILE '
<body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-green-a.png" alt="ClanSoft logo" width=525 height=96></td></tr>
<tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-green-b.png" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.png" width=42 height=14></td></tr></table>
<table align=center border=0 cellspacing=10> <tr>
<td><a href="entire_class_index.html">Entire Class Index</a></td>
<td><a href="class_index.html">Main Class Index</a></td>
<td><a href="cross_index.html">Cross Index</a></td>
<td>Global Index</td>
</table>
';
   
   print FILE "<h1 align=center>Namespace $$_{fullname}</h1><p>\n";

   my $items = $_->{items};
   my @array = sort byname @$items;
   my $child;
   my $type;
   my $col;

   $col = 0;

   print FILE "<hr noshade>\n";
   print FILE "<h1>Index:</h1>\n";
   foreach $type ( $Enum::CLASS, $Enum::TYPEDEF )
   {
      print FILE "<dt><h3>Members of type <em>$Enum::TYPE_NAMES[$type]</em></h3>\n";
      print FILE "<table>\n";
      foreach $child (@array)
      {
         if ($child->{ntype} == $type)
         {
            print FILE "<tr>" if $col == 0;
            $col++;
            print FILE "<td width=20%>";
            print FILE $child->href();
            print FILE "</td>";
            if ($col == 5)
            {
               $col = 0;
               print FILE "</tr>";
            }
            print FILE "\n";
         }
      }
      if ($col != 0)
      {
         print FILE "</tr>";
      }
      print FILE "</table>\n";
   }


   print FILE "<hr noshade>\n";
   print FILE "<h1>Member Descriptions:</h1>\n";
   print FILE "<dl>\n";
   foreach $type ( $Enum::TYPEDEF, $Enum::FUNCTION )
   {
      print FILE "<dt><h3>Members of type <em>$Enum::TYPE_NAMES[$type]</em></h3>\n";
      foreach $child (@array)
      {
         if ($child->{ntype} == $type)
         {
            print FILE "<dd>";
            print FILE $child->href($child->{fullname});
            if ($child->{short})
            {
                print FILE " - $child->{short}";
            }
            if ($child->{longcomment})
            {
                print FILE "<br>$child->{long}";
            }
            print FILE "\n";
         }
      }
   }
   print FILE "</dl>\n";

   print FILE "</body>\n";
   print FILE "</html>\n";
   close(FILE);
}