diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2002-04-07 17:23:32 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2002-04-07 17:23:32 (GMT) |
commit | 7cbe6514d4bb3f8c0e4b64a6c357df500c111798 (patch) | |
tree | c38e1a43019260d8c13223b0bab64424c575dfcb /src | |
parent | d8da737acd32d4cdd8e956ee7bc8329ad73c8d58 (diff) | |
download | Doxygen-7cbe6514d4bb3f8c0e4b64a6c357df500c111798.zip Doxygen-7cbe6514d4bb3f8c0e4b64a6c357df500c111798.tar.gz Doxygen-7cbe6514d4bb3f8c0e4b64a6c357df500c111798.tar.bz2 |
Release-1.2.15-20020407
Diffstat (limited to 'src')
-rw-r--r-- | src/doc.l | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 52 | ||||
-rw-r--r-- | src/filedef.cpp | 1 | ||||
-rw-r--r-- | src/pngenc.cpp | 2 | ||||
-rw-r--r-- | src/scanner.l | 48 | ||||
-rw-r--r-- | src/util.cpp | 47 |
6 files changed, 118 insertions, 34 deletions
@@ -957,7 +957,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+ ID [a-z_A-Z][a-z_A-Z0-9]* SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ -URLCHAR [a-z_A-Z0-9\~\:\?\@\&\%\#\.\-\+\/\=] +URLCHAR [a-z_A-Z0-9\!\~\:\;\'\$\?\@\&\%\#\.\-\+\/\=\(\)] URLMASK ([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+) NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9\x80-\xff] WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]*"\"") diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 0bbe32e..3132baf 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -2213,6 +2213,28 @@ static void transferFunctionDocumentation() } mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers()); mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers()); + + ArgumentList *decAl = mdec->argumentList(); + ArgumentList *defAl = mdef->argumentList(); + if (decAl && defAl) + { + ArgumentListIterator decAli(*decAl); + ArgumentListIterator defAli(*defAl); + Argument *decA,*defA; + for (decAli.toFirst(),defAli.toFirst(); + (decA=decAli.current()) && (defA=defAli.current()); + ++decAli,++defAli) + { + if (decA->docs.isEmpty() && !defA->docs.isEmpty()) + { + decA->docs = defA->docs.copy(); + } + else if (!defA->docs.isEmpty() && defA->docs.isEmpty()) + { + defA->docs = decA->docs.copy(); + } + } + } // copy group info. //if (mdec->getGroupDef()==0 && mdef->getGroupDef()!=0) @@ -2686,6 +2708,18 @@ static bool findTemplateInstanceRelation(Entry *root, return TRUE; } +static bool isRecursiveBaseClass(const QCString &scope,const QCString &name) +{ + QCString n=name; + int index=n.find('<'); + if (index!=-1) + { + n=n.left(index); + } + bool result = rightScopeMatch(scope,n); + return result; +} + static bool findClassRelation( Entry *root, ClassDef *cd, @@ -2732,16 +2766,18 @@ static bool findClassRelation( QCString templSpec; ClassDef *baseClass=getResolvedClass(cd,baseClassName,&baseClassIsTypeDef,&templSpec); //printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd); - //printf(" baseClassName=`%s' baseClass=%s templSpec=%s\n", + //printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n", + // root->name.data(), // baseClassName.data(), - // baseClass?baseClass->name().data():"<none>", - // templSpec.data() + // baseClass?baseClass->name().data():"<none>", + // templSpec.data() // ); - if (baseClassName.left(root->name.length())!=root->name || - baseClassName.at(root->name.length())!='<' - ) // Check for base class with the same name. - // If found then look in the outer scope for a match - // and prevent recursion. + //if (baseClassName.left(root->name.length())!=root->name || + // baseClassName.at(root->name.length())!='<' + // ) // Check for base class with the same name. + // // If found then look in the outer scope for a match + // // and prevent recursion. + if (!isRecursiveBaseClass(root->name,baseClassName)) { Debug::print( Debug::Classes,0," class relation %s inherited by %s found (%s and %s)\n", diff --git a/src/filedef.cpp b/src/filedef.cpp index 4c669e6..7e4a2c1 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -89,6 +89,7 @@ void FileDef::computeAnchors() void FileDef::distributeMemberGroupDocumentation() { + //printf("FileDef::distributeMemberGroupDocumentation()\n"); MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroup *mg; for (;(mg=mgli.current());++mgli) diff --git a/src/pngenc.cpp b/src/pngenc.cpp index b7e54f4..5fb20d5 100644 --- a/src/pngenc.cpp +++ b/src/pngenc.cpp @@ -26,7 +26,7 @@ #include <png.h> #include <stdio.h> -#include <malloc.h> +#include <stdlib.h> #include "pngenc.h" #include "message.h" diff --git a/src/scanner.l b/src/scanner.l index 049dc9b..be548f3 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -586,6 +586,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x NSAliasArg %x PackageName %x GetCallType +%x JavaImport %% @@ -992,6 +993,29 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <NSAliasArg>";" { BEGIN( FindMembers ); } +<JavaImport>({ID}{BN}*"."{BN}*)+"*" { // package import => add as a using directive + lineCount(); + QCString scope=yytext; + current->name=removeRedundantWhiteSpace(substitute(scope.left(scope.length()-2),".","::")); + current->fileName = yyFileName; + current->section=Entry::USINGDIR_SEC; + current_root->addSubEntry(current); + current = new Entry ; + initEntry(); + BEGIN(Using); + } +<JavaImport>({ID}{BN}*"."{BN}*)+{ID} { // class import => add as a using declaration + lineCount(); + QCString scope=yytext; + current->name=removeRedundantWhiteSpace(substitute(scope,".","::")); + printf("import name = %s -> %s\n",yytext,current->name.data()); + current->fileName = yyFileName; + current->section=Entry::USINGDECL_SEC; + current_root->addSubEntry(current); + current = new Entry ; + initEntry(); + BEGIN(Using); + } <FindMembers>"using"{BN}+ { current->startLine=yyLineNr; lineCount(); @@ -999,6 +1023,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } <Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); } <Using>{ID}{BN}*"::"{BN}*{ID}({BN}*"::"{BN}*{ID})* { + lineCount(); current->name=yytext; current->fileName = yyFileName; current->section=Entry::USINGDECL_SEC; @@ -1109,7 +1134,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } else if ((insideIDL || insideJava) && yyleng==6 && strcmp(yytext,"import")==0) { - BEGIN(NextSemi); + if (insideIDL) + BEGIN(NextSemi); + else // insideJava + BEGIN(JavaImport); } else if (insideIDL && strcmp(yytext,"case")==0) { @@ -2108,7 +2136,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } } <CopyArgComment>^{B}*"*"+/{BN}+ -<CopyArgComment>[^\n\*]+ { fullArgString+=yytext; } +<CopyArgComment>[^\n\\\@\*]+ { fullArgString+=yytext; } <CopyArgComment>"*/" { fullArgString+=yytext; if (lastCopyArgChar!=0) unput(lastCopyArgChar); @@ -2120,7 +2148,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) unput(lastCopyArgChar); BEGIN( ReadFuncArgType ); } -<CopyArgCommentLine>[^\n]+ { fullArgString+=yytext; } +<CopyArgCommentLine>[^\\\@\n]+ { fullArgString+=yytext; } <CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; } <CopyArgComment>. { fullArgString+=*yytext; } <ReadTempArgs>"<" { @@ -4092,7 +4120,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text current->doc+=yytext; } -<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { +<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { QCString *pValue=Doxygen::aliasDict[yytext+1]; if (pValue) { @@ -4104,13 +4132,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } else { - current->doc+=yytext; + if (YY_START==CopyArgComment) + fullArgString+=yytext; + else + current->doc+=yytext; } } <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text current->brief+=yytext; } -<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { +<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { QCString *pValue=Doxygen::aliasDict[yytext+1]; if (pValue) { @@ -4122,7 +4153,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } else { - current->brief+=yytext; + if (YY_START==CopyArgCommentLine) + fullArgString+=yytext; + else + current->brief+=yytext; } } <DefLineDoc,LineDoc,ClassDoc,PageDoc,ExampleDoc,Doc>"/*"|"//" { current->doc += yytext; } diff --git a/src/util.cpp b/src/util.cpp index d15cbff..66d87bf 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3137,11 +3137,41 @@ const char *getOverloadDocs() void addMembersToMemberGroup(MemberList *ml, MemberGroupSDict *memberGroupSDict,Definition *context) { + //printf("addMemberToMemberGroup()\n"); MemberListIterator mli(*ml); MemberDef *md; uint index; for (index=0;(md=mli.current());) { + if (md->isEnumerate()) // insert enum value of this enum into groups + { + QList<MemberDef> *fmdl=md->enumFieldList(); + if (fmdl) + { + MemberDef *fmd=fmdl->first(); + while (fmd) + { + int groupId=fmd->getMemberGroupId(); + if (groupId!=-1) + { + QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId]; + QCString *pDocs = Doxygen::memberDocDict[groupId]; + if (pGrpHeader) + { + MemberGroup *mg = memberGroupSDict->find(groupId); + if (mg==0) + { + mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0); + memberGroupSDict->append(groupId,mg); + } + mg->insertMember(context,fmd); // insert in member group + fmd->setMemberGroup(mg); + } + } + fmd=fmdl->next(); + } + } + } int groupId=md->getMemberGroupId(); if (groupId!=-1) { @@ -3156,23 +3186,6 @@ void addMembersToMemberGroup(MemberList *ml, memberGroupSDict->append(groupId,mg); } md = ml->take(index); // remove from member list - //if (allMembers) // remove from all member list as well - //{ - // MemberNameInfo *mni = allMembers->find(md->name()); - // if (mni) - // { - // QListIterator<MemberInfo> mii(*mni); - // MemberInfo *mi; - // for (;(mi=mii.current());++mii) - // { - // if (mi->memberDef==md) - // { - // mni->remove(mi); - // break; - // } - // } - // } - //} mg->insertMember(context,md); // insert in member group md->setMemberGroup(mg); continue; |