]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement that array specifications are printed _after_ the variable/typedef name...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Jul 2000 16:13:45 +0000 (16:13 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Jul 2000 16:13:45 +0000 (16:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@3221 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/kdoc/src/kdoc
deal.II/contrib/kdoc/src/kdocCxxDocbook.pm
deal.II/contrib/kdoc/src/kdocCxxHTML.pm
deal.II/contrib/kdoc/src/kdocCxxLaTeX.pm
deal.II/contrib/kdoc/src/kdocIDLhtml.pm
deal.II/contrib/kdoc/src/kdoctexi.pm

index cbdd46bd1c0cbe7dafc509d608cc0fe8d10cdea7..7f04736c6bd596671576cbb9f45940e774010711 100755 (executable)
@@ -580,7 +580,7 @@ sub identifyDecl
                        \s*[{;]\s*$/xs  ) {
 
                print "Typedef: <$1 $3> <$2>\n" if $debug;
-               $newNode = newTypedef( $1.$3, $2 );
+               $newNode = newTypedef( $1$3, $2 );
        }
 
        # Enum
@@ -707,7 +707,7 @@ sub identifyDecl
                print "Var: [$name] type: [$type$arr] val: [$val]\n" 
                                if $debug;
 
-               $newNode = newVar( $type.$arr, $name, $val );
+               $newNode = newVar( $type$arr, $name, $val );
 
                $skipBlock = 1 if $end eq '{';
 
@@ -748,7 +748,7 @@ sub identifyDecl
                        print "Split: type: [$type$ptr$arr] ",
                                " name: [$name] val: [$val] \n" if $debug;
 
-                       my $node = newVar( $type.$ptr.$arr, $name, $val );
+                       my $node = newVar( $type.$ptr$arr, $name, $val );
 
                        $docNode = $doc;        # reuse docNode for each
                        postInitNode( $node ) unless !defined $node;
@@ -1089,7 +1089,7 @@ sub newNamespace
 
 =head2 newTypedef
 
-       Parameters: realtype, name
+       Parameters: realtype, array specification, name
 
        Handles a type definition.
 
@@ -1097,12 +1097,13 @@ sub newNamespace
 
 sub newTypedef
 {
-       my ( $realtype, $name ) = @_;
+       my ( $realtype, $array, $name ) = @_;
 
        my ( $node ) = Ast::New( $name );
 
        $node->AddProp( "NodeType", "typedef" );
        $node->AddProp( "Type", $realtype );
+       $node->AddProp( "Array", $array );
 
        kdocAstUtil::attachChild( $cNode, $node );
 
@@ -1285,7 +1286,7 @@ sub newAccess
 
 =head2 newVar
 
-       Parameters: type, name, value
+       Parameters: type, array, name, value
 
        New variable. Value is ignored if undef
 
@@ -1293,7 +1294,7 @@ sub newAccess
 
 sub newVar
 {
-       my ( $type, $name, $val ) = @_;
+       my ( $type, $array, $name, $val ) = @_;
 
        my $node = Ast::New( $name );
        $node->AddProp( "NodeType", "var" );
@@ -1307,6 +1308,7 @@ sub newVar
        $node->AddProp( "Type", $type );
        $node->AddProp( "Flags", 's' ) if $static;
        $node->AddProp( "Value", $val ) if defined $val;
+       $node->AddProp( "Array", $array);
        kdocAstUtil::attachChild( $cNode, $node );
 
        return $node;
index 112e7d561b5a39268f6daa3f4081dcef39a65562..24b45331e27668a639b96ae53344bc896806f5d1 100644 (file)
@@ -270,7 +270,8 @@ sub sumListMember
        my $pname = tblk( "Emphasis", $name );
 
        if( $type eq "var" ) {
-               print DOC tblk( "Literal", esc($m->{Type}) ), " $pname\n";
+               print DOC tblk( "Literal", esc($m->{Type}) ), " $pname", 
+                          tblk( "Literal", esc($m->{Array}) ), "\n";
        }
        elsif( $type eq "method" ) {
                my $flags = $m->{Flags};
@@ -302,7 +303,8 @@ sub sumListMember
        }
        elsif( $type eq "typedef" ) { 
                print DOC tblk( "Literal", "typedef " ), esc($m->{Type}), 
-                               tblk( "Emphasis", $name );
+                               tblk( "Emphasis", $name ),
+                               esc($m->{Array});
        }
        else { 
                # unknown type
@@ -339,7 +341,8 @@ sub printMemberDoc
        my $pname = tblk( "Emphasis", $name );
 
        if( $type eq "var" ) {
-               print DOC tblk( "Literal", esc($mem->{Type}) ), " $pname\n";
+               print DOC tblk( "Literal", esc($mem->{Type}) ), " $pname",
+                         tblk( "Literal", esc($mem->{Array}) ), "\n";
        }
        elsif( $type eq "method" ) {
                my $flags = $mem->{Flags};
@@ -370,7 +373,7 @@ sub printMemberDoc
                        " $n\{ ",tblk("Literal",esc($mem->{Params}))," }";
        }
        elsif( $type eq "typedef" ) { 
-               print DOC tblk( "Literal", "typedef" ), " ", esc($mem->{Type}), $pname;
+               print DOC tblk( "Literal", "typedef" ), " ", esc($mem->{Type}), $pname, esc($mem->{Array});
        }
                # TODO nested compounds
        else { 
index 53be3f127cd4060e544b5c3678f99721b558f864..ac592c4013e61d47f1570cbdfee4ff968bb09c87 100644 (file)
@@ -620,7 +620,7 @@ sub listMember
        print CLASS "<LI>";
 
        if( $type eq "var" ) {
-               print CLASS esc( $m->{Type}), B( "b", $name );
+               print CLASS esc( $m->{Type}), B( "b", $name ), esc( $m->{Array});
        }
        elsif( $type eq "method" ) {
                my $flags = $m->{Flags};
@@ -644,7 +644,7 @@ sub listMember
                print CLASS "enum $name {", esc($m->{Params}),"}\n";
        }
        elsif( $type eq "typedef" ) {
-               print CLASS "typedef ", esc($m->{Type}), " $name\n";
+               print CLASS "typedef ", esc($m->{Type}), " $name", esc($m->{Array}), "\n";
        }
        else { 
                # unknown type
@@ -696,7 +696,7 @@ EOF
                print CLASS "<LI>\n";
 
                if( $type eq "var" ) {
-                       print CLASS esc( $m->{Type}), " $name\n";
+                       print CLASS esc( $m->{Type}), " $name", esc( $m->{Array}), "\n";
                }
                elsif( $type eq "method" ) {
                        $flags = $m->{Flags};
@@ -719,7 +719,7 @@ EOF
                        print CLASS "enum $name {", esc($m->{Params}),"}\n";
                }
                elsif( $type eq "typedef" ) {
-                       print CLASS "typedef ", esc($m->{Type}), " $name";
+                       print CLASS "typedef ", esc($m->{Type}), " $name", esc($m->{Array});
                }
                else { 
                        # unknown type
@@ -775,7 +775,7 @@ sub printMemberName
        print CLASS '<table width="100%"><tr bgcolor="#eeeeee"><td><strong>';
 
        if( $type eq "var" ) {
-               print CLASS textRef($m->{Type}, $rootnode ), " $name\n";
+               print CLASS textRef($m->{Type}, $rootnode ), " $name", textRef( $m->{Array}, $rootnode), "\n";
        }
        elsif( $type eq "method" ) {
                $flags = $m->{Flags};
@@ -789,7 +789,7 @@ sub printMemberName
        }
        elsif( $type eq "typedef" ) {
                print CLASS "typedef ", 
-               textRef($m->{Type}, $rootnode ), " $name";
+               textRef($m->{Type}, $rootnode ), " $name", textRef( $m->{Array}, $rootnode);
        }
        else {
                print CLASS $name, " ", B( "small", "(", esc($type), ")" );
@@ -797,7 +797,7 @@ sub printMemberName
 
        print CLASS "</strong></td></tr></table><p>";
 
-# extra attributes
+       # extra attributes
        my @extra = ();
 
        if( !exists $m->{Access} ) {
index 8bbcca18c63e793c8d189ab2cc4b0155768fd266..978b4b81266a742de32f7e091acbb319a19c622e 100644 (file)
@@ -642,7 +642,7 @@ EOF
 
                if( $type eq "var" ) {
                        print CLASS esc( $m->{Type}), 
-                               " \\textbf{", $name,"}\n";
+                               " \\textbf{", $name,"}", esc( $m->{Array}), "\n";
                }
                elsif( $type eq "method" ) {
                        $flags = $m->{Flags};
@@ -669,7 +669,7 @@ EOF
                elsif( $type eq "typedef" ) {
                        print CLASS "typedef ", 
                                esc($m->{Type}), " \\textbf{",
-                               $name,"}";
+                               $name,"}", esc($m->{Array});
                }
                else { 
                        # unknown type
@@ -729,7 +729,7 @@ sub printMemberName
 
        if( $type eq "var" ) {
                print CLASS textRef($m->{Type}, $rootnode ), 
-               " \\texttt{", $name,"} ";
+               " \\texttt{", $name,"} ", textRef($m->{Array}, $rootnode );
        }
        elsif( $type eq "method" ) {
                $flags = $m->{Flags};
@@ -746,7 +746,7 @@ sub printMemberName
        elsif( $type eq "typedef" ) {
                print CLASS "typedef ", 
                textRef($m->{Type}, $rootnode ), " \\texttt{",
-               $name,"} ";
+               $name,"} ", textRef($m->{Array}, $rootnode );
        }
        else {
                print CLASS $name, " {\\small (", 
index a7b73f2020106863a9371f01f34722c21036e36d..e1c5330c01a0eb30843e1e006a00f5180767c086 100644 (file)
@@ -584,7 +584,7 @@ EOF
 
                if( $type eq "var" ) {
                        print CLASS esc( $m->{Type}), 
-                               " <b>", $name,"</b>\n";
+                               " <b>", $name,"</b>", esc( $m->{Array} ), "\n";
                }
                elsif( $type eq "method" ) {
                        $flags = $m->{Flags};
@@ -611,7 +611,7 @@ EOF
                elsif( $type eq "typedef" ) {
                        print CLASS "typedef ", 
                                esc($m->{Type}), " <b>",
-                               $name,"</b>";
+                               $name,"</b>", esc($m->{Array});
                }
                else { 
                        # unknown type
@@ -654,7 +654,7 @@ sub printMemberName
 
        if( $type eq "var" ) {
                print CLASS textRef($m->{Type}, $rootnode ), 
-               " <b>", $name,"</b>\n";
+               " <b>", $name,"</b>", textRef($m->{Array}, $rootnode ), "\n";
        }
        elsif( $type eq "method" ) {
                $flags = $m->{Flags};
@@ -671,7 +671,8 @@ sub printMemberName
        elsif( $type eq "typedef" ) {
                print CLASS "typedef ", 
                textRef($m->{Type}, $rootnode ), " <b>",
-               $name,"</b>";
+               $name,"</b>",
+               textRef($m->{Array}, $rootnode );
        }
        else {
                print CLASS $name, " <small>(", 
index 737bbd120252fc4d5358fc968425bb5469a62c3c..3ca6c1a71522ecc84099491e985014729a04d63d 100644 (file)
@@ -373,7 +373,8 @@ sub writeMember
                
                if ( /^var/ ) {
                        my $type = $member->{Type};
-                       print TEX "\@deftypevar ", escape($type), " $escName\n";
+                       my $escArray= escape( $member->{Array} );
+                       print TEX "\@deftypevar ", escape($type), " $escName$escArray\n";
                        writeMemberInfo( $member->{DocNode} );
                        print TEX "\@end deftypevar\n";
                        last SWITCH;
@@ -381,7 +382,8 @@ sub writeMember
                
                if( /^typedef/ ) {
                        my $escType = escape( $member->{Type} );
-                       print TEX "\@deftp {typedef} {$escType} $escName\n";
+                       my $escArray= escape( $member->{Array} );
+                       print TEX "\@deftp {typedef} {$escType} $escName$escArray\n";
                        writeMemberInfo( $member->{DocNode} );
                        print TEX "\@end deftp\n";
                        last SWITCH;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.