]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add nodes for friend classes, but don't output them at present.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 9 May 2001 12:52:57 +0000 (12:52 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 9 May 2001 12:52:57 +0000 (12:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@4580 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/kdoc/src/kdoc

index 7992f246ea0ea12697dbbd93c05544c7c3b0d6cd..6992a708cd359fa48e39a41cc041c75235ad68db 100755 (executable)
@@ -592,6 +592,14 @@ sub identifyDecl
                $newNode = newEnum( $enumname );
        }
 
+       # friend class declaration
+       elsif ( $decl =~ /\s*((?:template\s*<.*>)?)
+                         \s*friend
+                         \s+((?:class|struct)\s+.*);/xs ) {
+           print "Friend class: [$1] [$2]\n" if $debug;
+           $newNode = newFriendClass ($2, $1);
+       }
+
        # Class/Struct
        elsif ( $decl =~ /^\s*((?:template\s*<.*>)?)      # 1 template
                                        \s*(class|struct|union|namespace) # 2 struct type
@@ -1120,6 +1128,26 @@ sub newTypedef
        return $node;
 }
 
+
+
+# note: at present we add nodes for friends, but we don't output them
+sub newFriendClass
+{
+       my ( $className, $templates ) = @_;
+
+       my ( $node ) = Ast::New( $name );
+
+       $node->AddProp( "NodeType", "friend class" );
+       $node->AddProp( "Name", $className );
+       $node->AddProp( "Templates", $templates );
+
+       kdocAstUtil::attachChild( $cNode, $node );
+
+       return $node;
+}
+
+
+
 =head2 newTypedefComp
 
        Params: realtype, name endtoken

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.