diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-10-07 14:42:40 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-10-07 14:42:40 (GMT) |
commit | f12c78472b4ea2f6b82c241a345af5da3d4973b9 (patch) | |
tree | d8a25d9352ffbba6e6fc08e678d7465211198851 /src | |
parent | c52e719895be2a133e6574573584df5a91b98ec6 (diff) | |
download | Doxygen-f12c78472b4ea2f6b82c241a345af5da3d4973b9.zip Doxygen-f12c78472b4ea2f6b82c241a345af5da3d4973b9.tar.gz Doxygen-f12c78472b4ea2f6b82c241a345af5da3d4973b9.tar.bz2 |
Release-1.2.11.1
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 3 | ||||
-rw-r--r-- | src/classdef.h | 1 | ||||
-rw-r--r-- | src/code.l | 15 | ||||
-rw-r--r-- | src/doxygen.cpp | 185 | ||||
-rw-r--r-- | src/doxygen.h | 10 | ||||
-rw-r--r-- | src/groupdef.cpp | 12 | ||||
-rw-r--r-- | src/groupdef.h | 8 | ||||
-rw-r--r-- | src/htmlgen.cpp | 15 | ||||
-rw-r--r-- | src/index.cpp | 105 | ||||
-rw-r--r-- | src/membergroup.cpp | 1 | ||||
-rw-r--r-- | src/membername.cpp | 11 | ||||
-rw-r--r-- | src/membername.h | 28 | ||||
-rw-r--r-- | src/pre.l | 7 | ||||
-rw-r--r-- | src/scanner.l | 49 | ||||
-rw-r--r-- | src/sortdict.h | 8 | ||||
-rw-r--r-- | src/util.cpp | 21 |
16 files changed, 318 insertions, 161 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 511aa7b..69d15ca 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1192,7 +1192,10 @@ void ClassDef::writeDocumentation(OutputList &ol) endFile(ol); +} +void ClassDef::writeDocumentationForInnerClasses(OutputList &ol) +{ // write inner classes after the parent, so the tag files contain // the definition in proper order! if (m_innerClasses) diff --git a/src/classdef.h b/src/classdef.h index 95450c3..5756c9f 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -100,6 +100,7 @@ class ClassDef : public Definition MemberNameInfoSDict *memberNameInfoSDict() { return m_allMemberNameInfoSDict; } void writeDocumentation(OutputList &ol); + void writeDocumentationForInnerClasses(OutputList &ol); void writeMemberList(OutputList &ol); void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup); @@ -21,7 +21,6 @@ * includes */ #include <stdio.h> -//#include <iostream.h> #include <assert.h> #include <ctype.h> #include <qregexp.h> @@ -33,6 +32,7 @@ #include "message.h" #include "outputlist.h" #include "util.h" +#include "membername.h" #define YY_NEVER_INTERACTIVE 1 @@ -450,7 +450,7 @@ static void generateClassLink(OutputDocInterface &ol,char *clName,int *clNameLen else { MemberName *mn; - if (cd==0 && (mn=Doxygen::functionNameDict[clName])) + if (cd==0 && (mn=Doxygen::functionNameSDict[clName])) { if (mn->count()==1) { @@ -557,8 +557,8 @@ static bool getLink(const char *className, static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const char *memName) { - //printf("generateClassMemberLink(%s,%s)\n",mcd->name().data(),memName); - MemberName *mmn=Doxygen::memberNameDict[memName]; + //printf("generateClassMemberLink(class=%s,member=%s)\n",mcd->name().data(),memName); + MemberName *mmn=Doxygen::memberNameSDict[memName]; if (mmn) { MemberNameIterator mmni(*mmn); @@ -581,6 +581,7 @@ static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const c // extract class definition of the return type in order to resolve // a->b()->c() like call chains g_classVar = stripClassName(xmd->typeString()); + //printf("g_classVar=%s->%p\n",xmd->typeString(),g_classVar); // add usage reference if (g_currentDefinition && g_currentMemberDef && @@ -665,7 +666,7 @@ static void generateMemberLink(OutputDocInterface &ol,const char *varName, if (vcd && vcd->isLinkable()) { //printf("Found class %s for variable `%s'\n",g_classScope.data(),varName); - MemberName *vmn=Doxygen::memberNameDict[varName]; + MemberName *vmn=Doxygen::memberNameSDict[varName]; if (vmn==0) { int vi; @@ -675,7 +676,7 @@ static void generateMemberLink(OutputDocInterface &ol,const char *varName, { ClassDef *jcd = getClass(vn.left(vi)); vn=vn.right(vn.length()-vi-2); - vmn=Doxygen::memberNameDict[vn]; + vmn=Doxygen::memberNameSDict[vn]; //printf("Trying name `%s' scope=%s\n",vn.data(),scope.data()); if (vmn) { @@ -1159,6 +1160,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" BEGIN( MemberCall ); } <MemberCall>{SCOPETNAME}/{B}*"(" { + //printf("g_name=`%s' g_classVar=`%s'\n",g_name.data(),g_classVar?g_classVar->name().data():"<none>"); if (!g_name.isEmpty()) { generateMemberLink(*g_code,g_name,yytext); @@ -1190,6 +1192,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" } } <MemberCall>{SCOPENAME}/{B}* { + //printf("g_name=`%s' g_classVar=`%s'\n",g_name.data(),g_classVar?g_classVar->name().data():"<none>"); if (!g_name.isEmpty()) { generateMemberLink(*g_code,g_name,yytext); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 6f9ba95..cebde46 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -72,13 +72,15 @@ ClassSDict Doxygen::hiddenClasses(257); //NamespaceList Doxygen::namespaceList; // all namespaces //NamespaceDict Doxygen::namespaceDict(257); -NamespaceSDict Doxygen::namespaceSDict(17); +NamespaceSDict Doxygen::namespaceSDict(20); -MemberNameList Doxygen::memberNameList; // class member + related functions -MemberNameDict Doxygen::memberNameDict(10007); +//MemberNameList Doxygen::memberNameList; // class member + related functions +//MemberNameDict Doxygen::memberNameDict(10007); +MemberNameSDict Doxygen::memberNameSDict(10000); -MemberNameList Doxygen::functionNameList; // all global function/namespace members -MemberNameDict Doxygen::functionNameDict(10007); +//MemberNameList Doxygen::functionNameList; // all global function/namespace members +//MemberNameDict Doxygen::functionNameDict(10007); +MemberNameSDict Doxygen::functionNameSDict(10000); FileNameList Doxygen::inputNameList; // all input files FileNameDict *Doxygen::inputNameDict; @@ -127,14 +129,14 @@ void clearAll() Doxygen::namespaceSDict.clear(); Doxygen::pageSDict->clear(); Doxygen::exampleSDict->clear(); - Doxygen::memberNameList.clear(); - Doxygen::functionNameList.clear(); + //Doxygen::memberNameList.clear(); + //Doxygen::functionNameList.clear(); Doxygen::inputNameList.clear(); Doxygen::groupList.clear(); Doxygen::formulaList.clear(); Doxygen::classSDict.clear(); - Doxygen::memberNameDict.clear(); - Doxygen::functionNameDict.clear(); + //Doxygen::memberNameDict.clear(); + //Doxygen::functionNameDict.clear(); Doxygen::sectionDict.clear(); Doxygen::inputNameDict->clear(); Doxygen::includeNameDict->clear(); @@ -161,10 +163,10 @@ void statistics() Doxygen::imageNameDict->statistics(); fprintf(stderr,"--- dotFileNameDict stats ----\n"); Doxygen::dotFileNameDict->statistics(); - fprintf(stderr,"--- memberNameDict stats ----\n"); - Doxygen::memberNameDict.statistics(); - fprintf(stderr,"--- functionNameDict stats ----\n"); - Doxygen::functionNameDict.statistics(); + //fprintf(stderr,"--- memberNameDict stats ----\n"); + //Doxygen::memberNameDict.statistics(); + //fprintf(stderr,"--- functionNameDict stats ----\n"); + //Doxygen::functionNameDict.statistics(); fprintf(stderr,"--- excludeNameDict stats ----\n"); excludeNameDict.statistics(); fprintf(stderr,"--- aliasDict stats ----\n"); @@ -1329,7 +1331,7 @@ static MemberDef *addVariableToClass( // see if the member is already found in the same scope // (this may be the case for a static member that is initialized // outside the class) - MemberName *mn=Doxygen::memberNameDict[name]; + MemberName *mn=Doxygen::memberNameSDict[name]; if (mn) { MemberNameIterator mni(*mn); @@ -1390,8 +1392,9 @@ static MemberDef *addVariableToClass( mn = new MemberName(name); mn->append(md); //printf("Adding memberName=%s\n",mn->memberName()); - Doxygen::memberNameDict.insert(name,mn); - Doxygen::memberNameList.append(mn); + //Doxygen::memberNameDict.insert(name,mn); + //Doxygen::memberNameList.append(mn); + Doxygen::memberNameSDict.append(name,mn); // add the member to the class } cd->insertMember(md); @@ -1469,7 +1472,7 @@ static MemberDef *addVariableToFile( } if (def.left(7)=="static ") def=def.right(def.length()-7); - MemberName *mn=Doxygen::functionNameDict[name]; + MemberName *mn=Doxygen::functionNameSDict[name]; if (mn) { QCString nscope=removeAnonymousScopes(scope); @@ -1565,8 +1568,9 @@ static MemberDef *addVariableToFile( { mn = new MemberName(name); mn->append(md); - Doxygen::functionNameDict.insert(name,mn); - Doxygen::functionNameList.append(mn); + //Doxygen::functionNameDict.insert(name,mn); + //Doxygen::functionNameList.append(mn); + Doxygen::functionNameSDict.append(name,mn); } root->section = Entry::EMPTY_SEC; return md; @@ -1979,7 +1983,7 @@ static void buildFunctionList(Entry *root) // add member to the global list of all members //printf("Adding member=%s class=%s\n",md->name().data(),cd->name().data()); MemberName *mn; - if ((mn=Doxygen::memberNameDict[name])) + if ((mn=Doxygen::memberNameSDict[name])) { mn->append(md); } @@ -1987,8 +1991,9 @@ static void buildFunctionList(Entry *root) { mn = new MemberName(name); mn->append(md); - Doxygen::memberNameDict.insert(name,mn); - Doxygen::memberNameList.append(mn); + //Doxygen::memberNameDict.insert(name,mn); + //Doxygen::memberNameList.append(mn); + Doxygen::memberNameSDict.append(name,mn); } // add member to the class cd @@ -2016,7 +2021,7 @@ static void buildFunctionList(Entry *root) bool found=FALSE; MemberName *mn; //MemberDef *fmd; - if ((mn=Doxygen::functionNameDict[rname])) + if ((mn=Doxygen::functionNameSDict[rname])) { //printf("--> function %s already found!\n",rname.data()); MemberNameIterator mni(*mn); @@ -2182,7 +2187,7 @@ static void buildFunctionList(Entry *root) // add member to the list of file members //printf("Adding member=%s\n",md->name().data()); MemberName *mn; - if ((mn=Doxygen::functionNameDict[name])) + if ((mn=Doxygen::functionNameSDict[name])) { mn->append(md); } @@ -2190,8 +2195,9 @@ static void buildFunctionList(Entry *root) { mn = new MemberName(name); mn->append(md); - Doxygen::functionNameDict.insert(name,mn); - Doxygen::functionNameList.append(mn); + //Doxygen::functionNameDict.insert(name,mn); + //Doxygen::functionNameList.append(mn); + Doxygen::functionNameSDict.append(name,mn); } addMemberToGroups(root,md); root->section = Entry::EMPTY_SEC; @@ -2225,13 +2231,13 @@ static void buildFunctionList(Entry *root) static void findFriends() { //printf("findFriends()\n"); - MemberNameListIterator fnli(Doxygen::functionNameList); + MemberNameSDict::Iterator fnli(Doxygen::functionNameSDict); MemberName *fn; for (;(fn=fnli.current());++fnli) // for each global function name { //printf("Function name=`%s'\n",fn->memberName()); MemberName *mn; - if ((mn=Doxygen::memberNameDict[fn->memberName()])) + if ((mn=Doxygen::memberNameSDict[fn->memberName()])) { // there are members with the same name //printf("Function name is also a member name\n"); MemberNameIterator fni(*fn); @@ -2288,7 +2294,7 @@ static void transferFunctionDocumentation() //printf("transferFunctionDocumentation()\n"); // find matching function declaration and definitions. - MemberNameListIterator mnli(Doxygen::functionNameList); + MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); MemberName *mn; for (;(mn=mnli.current());++mnli) { @@ -2367,7 +2373,7 @@ static void transferRelatedFunctionDocumentation() { // find match between function declaration and definition for // related functions - MemberNameListIterator mnli(Doxygen::functionNameList); + MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); MemberName *mn; for (mnli.toFirst();(mn=mnli.current());++mnli) { @@ -2378,7 +2384,7 @@ static void transferRelatedFunctionDocumentation() { //printf(" Function `%s'\n",md->name().data()); MemberName *rmn; - if ((rmn=Doxygen::memberNameDict[md->name()])) // check if there is a member with the same name + if ((rmn=Doxygen::memberNameSDict[md->name()])) // check if there is a member with the same name { //printf(" Member name found\n"); MemberDef *rmd; @@ -3239,7 +3245,7 @@ static void computeMemberReferences() static void addClassMemberTodoTestBugReferences(Definition *compound) { - MemberNameListIterator mnli(Doxygen::memberNameList); + MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); MemberName *mn=0; for (mnli.toFirst();(mn=mnli.current());++mnli) { @@ -3272,7 +3278,7 @@ static void addClassMemberTodoTestBugReferences(Definition *compound) static void addFileMemberTodoTestBugReferences(Definition *compound) { - MemberNameListIterator fnli(Doxygen::functionNameList); + MemberNameSDict::Iterator fnli(Doxygen::functionNameSDict); MemberName *mn=0; for (fnli.toFirst();(mn=fnli.current());++fnli) { @@ -3305,7 +3311,7 @@ static void addFileMemberTodoTestBugReferences(Definition *compound) static void addTodoTestBugReferences() { - MemberNameListIterator mnli(Doxygen::memberNameList); + MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); MemberName *mn=0; for (mnli.toFirst();(mn=mnli.current());++mnli) { @@ -3316,7 +3322,7 @@ static void addTodoTestBugReferences() md->visited=FALSE; } } - MemberNameListIterator fnli(Doxygen::functionNameList); + MemberNameSDict::Iterator fnli(Doxygen::functionNameSDict); for (fnli.toFirst();(mn=fnli.current());++fnli) { MemberNameIterator mni(*mn); @@ -3606,10 +3612,10 @@ static bool findGlobalMember(Entry *root, Debug::print(Debug::FindMembers,0, "2. findGlobalMember(namespace=%s,name=%s,tempArg=%s,decl=%s)\n", namespaceName.data(),name,tempArg,decl); - MemberName *mn=Doxygen::functionNameDict[n+tempArg]; // look in function dictionary + MemberName *mn=Doxygen::functionNameSDict[n+tempArg]; // look in function dictionary if (mn==0) { - mn=Doxygen::functionNameDict[n]; // try without template arguments + mn=Doxygen::functionNameSDict[n]; // try without template arguments } if (mn) // function name defined { @@ -3897,7 +3903,16 @@ static void findMember(Entry *root, (root->parent->section&Entry::SCOPE_MASK) && !root->parent->name.isEmpty()) { - scopeName = mergeScopes(root->parent->name,scopeName); + QCString joinedName = root->parent->name+"::"+scopeName; + if (!scopeName.isEmpty() && + (getClass(joinedName) || Doxygen::namespaceSDict[joinedName])) + { + scopeName = joinedName; + } + else + { + scopeName = mergeScopes(root->parent->name,scopeName); + } } scopeName=stripTemplateSpecifiersFromScope( removeRedundantWhiteSpace(scopeName),FALSE); @@ -4024,11 +4039,11 @@ static void findMember(Entry *root, "1. funcName=`%s'\n",funcName.data()); if (!funcTempList.isEmpty()) // try with member specialization { - mn=Doxygen::memberNameDict[funcName+funcTempList]; + mn=Doxygen::memberNameSDict[funcName+funcTempList]; } if (mn==0) // try without specialization { - mn=Doxygen::memberNameDict[funcName]; + mn=Doxygen::memberNameSDict[funcName]; } if (!isRelated && mn) // function name already found { @@ -4275,12 +4290,12 @@ static void findMember(Entry *root, { if (className.isEmpty()) className=related.copy(); ClassDef *cd; - //printf("scopeName=`%s'\n",scopeName.data()); + //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); if ((cd=getClass(scopeName))) { bool newMember=TRUE; // assume we have a new member bool newMemberName=FALSE; - if ((mn=Doxygen::memberNameDict[funcName])==0) + if ((mn=Doxygen::memberNameSDict[funcName])==0) { mn=new MemberName(funcName); newMemberName=TRUE; // we create a new member name @@ -4335,7 +4350,7 @@ static void findMember(Entry *root, bool found=FALSE; if (root->bodyLine==-1) { - MemberName *rmn=Doxygen::functionNameDict[funcName]; + MemberName *rmn=Doxygen::functionNameSDict[funcName]; if (rmn) { MemberDef *rmd=rmn->first(); @@ -4389,8 +4404,9 @@ static void findMember(Entry *root, //printf("Adding member=%s\n",md->name().data()); if (newMemberName) { - Doxygen::memberNameList.append(mn); - Doxygen::memberNameDict.insert(funcName,mn); + //Doxygen::memberNameList.append(mn); + //Doxygen::memberNameDict.insert(funcName,mn); + Doxygen::memberNameSDict.append(funcName,mn); } } } @@ -4547,8 +4563,9 @@ static void findEnums(Entry *root) ClassDef *cd=0; FileDef *fd=0; NamespaceDef *nd=0; - MemberNameDict *mnd=0; - MemberNameList *mnl=0; + //MemberNameDict *mnd=0; + //MemberNameList *mnl=0; + MemberNameSDict *mnsd=0; bool isGlobal; //printf("Found enum with name `%s'\n",root->name.data()); int i; @@ -4575,22 +4592,25 @@ static void findEnums(Entry *root) { //printf("Enum `%s'::`%s'\n",cd->name(),name.data()); fd=0; - mnd=&Doxygen::memberNameDict; - mnl=&Doxygen::memberNameList; + //mnd=&Doxygen::memberNameDict; + //mnl=&Doxygen::memberNameList; + mnsd=&Doxygen::memberNameSDict; isGlobal=FALSE; } else if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') // found enum inside namespace { - mnd=&Doxygen::functionNameDict; - mnl=&Doxygen::functionNameList; + //mnd=&Doxygen::functionNameDict; + //mnl=&Doxygen::functionNameList; + mnsd=&Doxygen::functionNameSDict; isGlobal=TRUE; } else // found a global enum { bool ambig; fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); - mnd=&Doxygen::functionNameDict; - mnl=&Doxygen::functionNameList; + //mnd=&Doxygen::functionNameDict; + //mnl=&Doxygen::functionNameList; + mnsd=&Doxygen::functionNameSDict; isGlobal=TRUE; } if (!name.isEmpty()) @@ -4666,7 +4686,7 @@ static void findEnums(Entry *root) //printf("Adding member=%s\n",md->name().data()); MemberName *mn; - if ((mn=(*mnd)[name])) + if ((mn=(*mnsd)[name])) { // this is used if the same enum is in multiple namespaces/classes mn->append(md); @@ -4675,8 +4695,9 @@ static void findEnums(Entry *root) { mn = new MemberName(name); mn->append(md); - mnd->insert(name,mn); - mnl->append(mn); + //mnd->insert(name,mn); + //mnl->append(mn); + mnsd->append(name,mn); //printf("add %s to new memberName. Now %d members\n", // name.data(),mn->count()); } @@ -4687,7 +4708,7 @@ static void findEnums(Entry *root) for (;(e=eli.current());++eli) { MemberName *fmn=0; - if (!e->name.isEmpty() && (fmn=(*mnd)[e->name])) + if (!e->name.isEmpty() && (fmn=(*mnsd)[e->name])) // get list of members with the same name as the field { MemberNameIterator fmni(*fmn); @@ -4780,7 +4801,7 @@ static void findEnumDocumentation(Entry *root) { //printf("Enum: scope=`%s' name=`%s'\n",cd->name(),name.data()); QCString className=cd->name().copy(); - MemberName *mn=Doxygen::memberNameDict[name]; + MemberName *mn=Doxygen::memberNameSDict[name]; if (mn) { MemberNameIterator mni(*mn); @@ -4821,7 +4842,7 @@ static void findEnumDocumentation(Entry *root) else // enum outside class { MemberDef *md; - MemberName *mn=Doxygen::functionNameDict[name]; + MemberName *mn=Doxygen::functionNameSDict[name]; if (mn && (md=mn->getFirst())) { md->setDocumentation(root->doc); @@ -4850,10 +4871,10 @@ static void findEnumDocumentation(Entry *root) // seach for each enum (member or function) in mnl if it has documented // enum values. -static void findDEV(const MemberNameList &mnl) +static void findDEV(const MemberNameSDict &mnsd) { MemberName *mn; - MemberNameListIterator mnli(mnl); + MemberNameSDict::Iterator mnli(mnsd); // for each member name for (mnli.toFirst();(mn=mnli.current());++mnli) { @@ -4887,8 +4908,8 @@ static void findDEV(const MemberNameList &mnl) // values. static void findDocumentedEnumValues() { - findDEV(Doxygen::memberNameList); - findDEV(Doxygen::functionNameList); + findDEV(Doxygen::memberNameSDict); + findDEV(Doxygen::functionNameSDict); } @@ -4899,7 +4920,7 @@ static void findDocumentedEnumValues() static void computeMemberRelations() { - MemberNameListIterator mnli(Doxygen::memberNameList); + MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); MemberName *mn; for ( ; (mn=mnli.current()) ; ++mnli ) // for each member name { @@ -5089,7 +5110,7 @@ static void addSourceReferences() } // add source references for member names - MemberNameListIterator mnli(Doxygen::memberNameList); + MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); MemberName *mn=0; for (mnli.toFirst();(mn=mnli.current());++mnli) { @@ -5109,7 +5130,7 @@ static void addSourceReferences() } } } - MemberNameListIterator fnli(Doxygen::functionNameList); + MemberNameSDict::Iterator fnli(Doxygen::functionNameSDict); for (fnli.toFirst();(mn=fnli.current());++fnli) { MemberNameIterator mni(*mn); @@ -5187,6 +5208,7 @@ static void generateClassDocs() cd->writeDocumentation(*outputList); cd->writeMemberList(*outputList); } + cd->writeDocumentationForInnerClasses(*outputList); } } @@ -5194,7 +5216,7 @@ static void generateClassDocs() static void inheritDocumentation() { - MemberNameListIterator mnli(Doxygen::memberNameList); + MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); MemberName *mn; //int count=0; for (;(mn=mnli.current());++mnli) @@ -5326,7 +5348,7 @@ static void findDefineDocumentation(Entry *root) md->setFileDef(fd); //printf("Adding member=%s\n",md->name().data()); MemberName *mn; - if ((mn=Doxygen::functionNameDict[root->name])) + if ((mn=Doxygen::functionNameSDict[root->name])) { mn->append(md); } @@ -5334,11 +5356,12 @@ static void findDefineDocumentation(Entry *root) { mn = new MemberName(root->name); mn->append(md); - Doxygen::functionNameDict.insert(root->name,mn); - Doxygen::functionNameList.append(mn); + //Doxygen::functionNameDict.insert(root->name,mn); + //Doxygen::functionNameList.append(mn); + Doxygen::functionNameSDict.append(root->name,mn); } } - MemberName *mn=Doxygen::functionNameDict[root->name]; + MemberName *mn=Doxygen::functionNameSDict[root->name]; if (mn) { int count=0; @@ -5790,6 +5813,7 @@ static void generateNamespaceDocs() cd->writeDocumentation(*outputList); cd->writeMemberList(*outputList); } + cd->writeDocumentationForInnerClasses(*outputList); } } } @@ -7129,8 +7153,8 @@ void parseInput() findMainPage(root); msg("Sorting lists...\n"); - Doxygen::memberNameList.sort(); - Doxygen::functionNameList.sort(); + Doxygen::memberNameSDict.sort(); + Doxygen::functionNameSDict.sort(); Doxygen::hiddenClasses.sort(); Doxygen::classSDict.sort(); @@ -7337,13 +7361,14 @@ void generateOutput() Doxygen::formulaList.generateBitmaps(Config_getString("HTML_OUTPUT")); } - if (Config_getBool("SEARCHENGINE") || Config_getList("TAGFILES").count()>0) - { - msg("\nNow copy the file\n\n %s\n\nto the directory where the CGI binaries are " - "located and don't forget to run\n\n",(Config_getString("HTML_OUTPUT")+"/"+Config_getString("CGI_NAME")).data()); - msg(" %s/installdox\n\nto replace any dummy links.\n\n", - Config_getString("HTML_OUTPUT").data()); - } + // This is confusing people, so I removed it + //if (Config_getBool("SEARCHENGINE") || Config_getList("TAGFILES").count()>0) + //{ + // msg("\nNow copy the file\n\n %s\n\nto the directory where the CGI binaries are " + // "located and don't forget to run\n\n",(Config_getString("HTML_OUTPUT")+"/"+Config_getString("CGI_NAME")).data()); + // msg(" %s/installdox\n\nto replace any dummy links.\n\n", + // Config_getString("HTML_OUTPUT").data()); + //} if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) { diff --git a/src/doxygen.h b/src/doxygen.h index aa85485..913337c 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -70,10 +70,12 @@ class Doxygen static FileNameDict *imageNameDict; static FileNameDict *dotFileNameDict; static QStrList tagfileList; - static MemberNameList memberNameList; - static MemberNameList functionNameList; - static MemberNameDict memberNameDict; - static MemberNameDict functionNameDict; + //static MemberNameList memberNameList; + //static MemberNameList functionNameList; + //static MemberNameDict memberNameDict; + //static MemberNameDict functionNameDict; + static MemberNameSDict memberNameSDict; + static MemberNameSDict functionNameSDict; static FileList fileList; static FileDict fileDict; static ClassDef unrelatedClass; diff --git a/src/groupdef.cpp b/src/groupdef.cpp index bb1c2f0..3f21215 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -43,7 +43,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : pageDict = new PageSDict(257); exampleDict = new PageSDict(257); allMemberList = new MemberList; - allMemberNameInfoDict = new MemberNameInfoDict(1009); + allMemberNameInfoSDict = new MemberNameInfoSDict(17); fileName = (QCString)"group_"+na; setGroupTitle( t ); memberGroupList = new MemberGroupList; @@ -79,7 +79,7 @@ GroupDef::~GroupDef() delete pageDict; delete exampleDict; delete allMemberList; - delete allMemberNameInfoDict; + delete allMemberNameInfoSDict; delete memberGroupList; delete memberGroupDict; } @@ -170,7 +170,7 @@ void GroupDef::insertMember(MemberDef *md,bool docOnly) { //fprintf(stderr, "GroupDef(%s)::insertMember(%s)\n", title.data(), md->name().data()); MemberNameInfo *mni=0; - if ((mni=(*allMemberNameInfoDict)[md->name()])) + if ((mni=(*allMemberNameInfoSDict)[md->name()])) { // member with this name already found MemberNameInfoIterator srcMnii(*mni); MemberInfo *srcMi; @@ -189,7 +189,7 @@ void GroupDef::insertMember(MemberDef *md,bool docOnly) { mni = new MemberNameInfo(md->name()); mni->append(new MemberInfo(md,md->protection(),md->virtualness(),FALSE)); - allMemberNameInfoDict->insert(mni->memberName(),mni); + allMemberNameInfoSDict->append(mni->memberName(),mni); } allMemberList->append(md); switch(md->memberType()) @@ -251,7 +251,7 @@ void GroupDef::insertMember(MemberDef *md,bool docOnly) void GroupDef::removeMember(MemberDef *md) { // fprintf(stderr, "GroupDef(%s)::removeMember( %s )\n", title.data(), md->name().data()); - MemberNameInfo *mni = allMemberNameInfoDict->find(md->name()); + MemberNameInfo *mni = allMemberNameInfoSDict->find(md->name()); if (mni) { MemberNameInfoIterator mnii(*mni); @@ -266,7 +266,7 @@ void GroupDef::removeMember(MemberDef *md) } if( mni->isEmpty() ) { - allMemberNameInfoDict->remove(md->name()); + allMemberNameInfoSDict->remove(md->name()); delete mni; } diff --git a/src/groupdef.h b/src/groupdef.h index b4a446e..0adc59d 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -36,7 +36,7 @@ class OutputList; class NamespaceList; class MemberGroupList; class MemberGroupDict; -class MemberNameInfoDict; +class MemberNameInfoSDict; class PageSDict; class PageInfo; @@ -64,11 +64,11 @@ class GroupDef : public Definition int countMembers() const; bool isLinkableInProject() const { - return hasDocumentation() && !isReference(); + return !isReference(); } bool isLinkable() const { - return isLinkableInProject() || isReference(); + return TRUE; } bool isASubGroup() const; void computeAnchors(); @@ -97,7 +97,7 @@ class GroupDef : public Definition PageSDict *exampleDict; // list of examples in the group MemberList *allMemberList; - MemberNameInfoDict *allMemberNameInfoDict; + MemberNameInfoSDict *allMemberNameInfoSDict; // members in the declaration part of the documentation MemberList decDefineMembers; diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 8ef3df0..e3ec9e3 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -943,7 +943,7 @@ void HtmlGenerator::endMemberDocName() void HtmlGenerator::startParameterList() { DBG_HTML(t << "<!-- startParameterList -->" << endl;) - t << " <td class=\"md\">( </td>" << endl; + t << " <td class=\"md\" valign=\"top\">( </td>" << endl; } void HtmlGenerator::startParameterType(bool first) @@ -951,7 +951,7 @@ void HtmlGenerator::startParameterType(bool first) if (first) { DBG_HTML(t << "<!-- startFirstParameterType -->" << endl;) - t << " <td class=\"md\" nowrap>"; + t << " <td class=\"md\" nowrap valign=\"top\">"; } else { @@ -973,8 +973,11 @@ void HtmlGenerator::startParameterName(bool oneArgOnly) { DBG_HTML(t << "<!-- startParameterName -->" << endl;) t << " <td class=\"mdname"; - if (oneArgOnly) t << "1"; - t << "\"> "; + if (oneArgOnly) + { + t << "1\" valign=\"top"; + } + t << "\" nowrap> "; } void HtmlGenerator::endParameterName(bool last,bool emptyList) @@ -985,8 +988,8 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList) if (emptyList) { t << " </td>" << endl; - t << " <td class=\"md\">) </td>" << endl; - t << " <td class=\"md\">"; + t << " <td class=\"md\" valign=\"top\">) </td>" << endl; + t << " <td class=\"md\" nowrap>"; } else { diff --git a/src/index.cpp b/src/index.cpp index 492c4da..5caca70 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -323,7 +323,7 @@ void endFile(OutputList &ol,bool external) //---------------------------------------------------------------------------- -void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) +void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level) { HtmlHelp *htmlHelp=0; FTVHelp *ftvHelp=0; @@ -347,7 +347,16 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) { if (!started) { - ol.startItemList(); + { + // UGLY HACK! + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Latex); + if (level<6) ol.startIndexList(); + ol.enableAll(); + ol.disable(OutputGenerator::Latex); + ol.startItemList(); + ol.popGeneratorState(); + } if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasFtvHelp) ftvHelp->incContentsDepth(); started=TRUE; @@ -390,13 +399,22 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) //printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited); bool wasVisited=cd->visited; cd->visited=TRUE; - writeClassTree(ol,cd->subClasses(),wasVisited); + writeClassTree(ol,cd->subClasses(),wasVisited,level+1); } } } if (started) { - ol.endItemList(); + { + // UGLY HACK! + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Latex); + if (level<6) ol.endIndexList(); + ol.enableAll(); + ol.disable(OutputGenerator::Latex); + ol.endItemList(); + ol.popGeneratorState(); + } if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasFtvHelp) ftvHelp->decContentsDepth(); } @@ -406,7 +424,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) //---------------------------------------------------------------------------- /*! Generates HTML Help tree of classes */ -void writeClassTree(BaseClassList *cl) +void writeClassTree(BaseClassList *cl,int level) { HtmlHelp *htmlHelp=0; FTVHelp *ftvHelp=0; @@ -448,7 +466,7 @@ void writeClassTree(BaseClassList *cl) } if (hasChildren) { - writeClassTree(cd->subClasses()); + writeClassTree(cd->subClasses(),level+1); } cd->visited=TRUE; } @@ -463,7 +481,7 @@ void writeClassTree(BaseClassList *cl) //---------------------------------------------------------------------------- /*! Generates HTML Help tree of classes */ -void writeClassTreeNode(ClassDef *cd,bool hasHtmlHelp,bool hasFtvHelp,bool &started) +void writeClassTreeNode(ClassDef *cd,bool hasHtmlHelp,bool hasFtvHelp,bool &started,int level) { if (cd->isVisibleInHierarchy() && !cd->visited) { @@ -485,13 +503,13 @@ void writeClassTreeNode(ClassDef *cd,bool hasHtmlHelp,bool hasFtvHelp,bool &star } if (hasChildren) { - writeClassTree(cd->subClasses()); + writeClassTree(cd->subClasses(),level+1); } cd->visited=TRUE; } } -void writeClassTree(ClassList *cl) +void writeClassTree(ClassList *cl,int level) { bool &generateHtml = Config_getBool("GENERATE_HTML") ; bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); @@ -500,11 +518,11 @@ void writeClassTree(ClassList *cl) bool started=FALSE; for ( ; cli.current() ; ++cli) { - writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started); + writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started,level); } } -void writeClassTree(ClassSDict *d) +void writeClassTree(ClassSDict *d,int level) { bool &generateHtml = Config_getBool("GENERATE_HTML") ; bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); @@ -513,7 +531,7 @@ void writeClassTree(ClassSDict *d) bool started=FALSE; for ( ; cli.current() ; ++cli) { - writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started); + writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started,level); } } @@ -550,7 +568,16 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started) { if (!started) { - ol.startItemList(); + { + // UGLY HACK! + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Latex); + ol.startIndexList(); + ol.enableAll(); + ol.disable(OutputGenerator::Latex); + ol.startItemList(); + ol.popGeneratorState(); + } if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasFtvHelp) ftvHelp->incContentsDepth(); started=TRUE; @@ -589,7 +616,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started) } if (hasChildren) { - writeClassTree(ol,cd->subClasses(),cd->visited); + writeClassTree(ol,cd->subClasses(),cd->visited,1); cd->visited=TRUE; } } @@ -621,7 +648,16 @@ void writeClassHierarchy(OutputList &ol) writeClassTreeForList(ol,&Doxygen::hiddenClasses,started); if (started) { - ol.endItemList(); + { + // UGLY HACK! + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Latex); + ol.endIndexList(); + ol.enableAll(); + ol.disable(OutputGenerator::Latex); + ol.endItemList(); + ol.popGeneratorState(); + } if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasFtvHelp) ftvHelp->decContentsDepth(); } @@ -1476,8 +1512,10 @@ void writeMemberList(OutputList &ol,bool useSections) { bool first = TRUE; char lastChar = 0; - MemberName *mn=Doxygen::memberNameList.first(); - while (mn) + + MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); + MemberName *mn=0; + for (mnli.toFirst();(mn=mnli.current());++mnli) { MemberDef *md=mn->first(); bool found=FALSE; @@ -1549,7 +1587,6 @@ void writeMemberList(OutputList &ol,bool useSections) md=mn->prev(); } } - mn=Doxygen::memberNameList.next(); } ol.endItemList(); } @@ -1560,8 +1597,9 @@ int countClassMembers() { int i=0;for (i=0;i<256;i++) g_memberIndexLetterUsed[i]=FALSE; int count=0; - MemberName *mn=Doxygen::memberNameList.first(); - while (mn) + MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); + MemberName *mn=0; + for (mnli.toFirst();(mn=mnli.current());++mnli) { MemberDef *md=mn->first(); bool found=FALSE; @@ -1584,7 +1622,6 @@ int countClassMembers() if (!n.isEmpty()) g_memberIndexLetterUsed[tolower(n.at(0))]=TRUE; count++; } - mn=Doxygen::memberNameList.next(); } return count; } @@ -1661,8 +1698,9 @@ void writeFileMemberList(OutputList &ol,bool useSections) { char lastChar=0; bool first=TRUE; - MemberName *mn=Doxygen::functionNameList.first(); - while (mn) + MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); + MemberName *mn=0; + for (mnli.toFirst();(mn=mnli.current());++mnli) { MemberDef *md=mn->first(); bool found=FALSE; @@ -1732,7 +1770,6 @@ void writeFileMemberList(OutputList &ol,bool useSections) md=mn->prev(); } } - mn=Doxygen::functionNameList.next(); } ol.endItemList(); } @@ -1743,8 +1780,9 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) { char lastChar=0; bool first=TRUE; - MemberName *mn=Doxygen::functionNameList.first(); - while (mn) + MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); + MemberName *mn=0; + for (mnli.toFirst();(mn=mnli.current());++mnli) { MemberDef *md=mn->first(); bool found=FALSE; @@ -1807,7 +1845,6 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) md=mn->prev(); } } - mn=Doxygen::functionNameList.next(); } if (!first) ol.endItemList(); } @@ -1818,8 +1855,9 @@ int countNamespaceMembers() { int i=0;for (i=0;i<256;i++) g_namespaceIndexLetterUsed[i]=FALSE; int count=0; - MemberName *mn=Doxygen::functionNameList.first(); - while (mn) + MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); + MemberName *mn=0; + for (mnli.toFirst();(mn=mnli.current());++mnli) { MemberDef *md=mn->first(); bool found=FALSE; @@ -1836,7 +1874,6 @@ int countNamespaceMembers() md=mn->next(); } if (found) count++; - mn=Doxygen::functionNameList.next(); } return count; } @@ -1847,8 +1884,9 @@ int countFileMembers() { int i=0;for (i=0;i<256;i++) g_fileIndexLetterUsed[i]=FALSE; int count=0; - MemberName *mn=Doxygen::functionNameList.first(); - while (mn) + MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); + MemberName *mn=0; + for (mnli.toFirst();(mn=mnli.current());++mnli) { MemberDef *md=mn->first(); FileDef *fd; @@ -1868,7 +1906,6 @@ int countFileMembers() md=mn->next(); } if (found) count++; - mn=Doxygen::functionNameList.next(); } return count; } @@ -2398,7 +2435,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) ftvHelp->incContentsDepth(); } - writeClassTree(gd->classSDict); + writeClassTree(gd->classSDict,1); if(htmlHelp) htmlHelp->decContentsDepth(); if(ftvHelp) ftvHelp->decContentsDepth(); } diff --git a/src/membergroup.cpp b/src/membergroup.cpp index e124c8d..0ffe1b3 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -26,6 +26,7 @@ #include "language.h" #include "scanner.h" #include "groupdef.h" +#include "doxygen.h" //static QCString idToName(int id) //{ diff --git a/src/membername.cpp b/src/membername.cpp index 87b4c79..a250988 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -71,6 +71,8 @@ MemberNameIterator::MemberNameIterator(const MemberName &mnlist) : { } +#if 0 + MemberNameList::MemberNameList() : QList<MemberName>() { } @@ -91,3 +93,12 @@ MemberNameListIterator::MemberNameListIterator(const MemberNameList &mnlist) : { } +#endif + +int MemberNameSDict::compareItems(GCI item1, GCI item2) +{ + MemberName *n1=(MemberName *)item1; + MemberName *n2=(MemberName *)item2; + return stricmp(n1->memberName(),n2->memberName()); +} + diff --git a/src/membername.h b/src/membername.h index 74f81f5..b99b1da 100644 --- a/src/membername.h +++ b/src/membername.h @@ -40,6 +40,7 @@ class MemberNameIterator : public QListIterator<MemberDef> MemberNameIterator( const MemberName &list); }; +#if 0 class MemberNameList : public QList<MemberName> { public: @@ -56,6 +57,16 @@ class MemberNameListIterator : public QListIterator<MemberName> }; typedef QDict<MemberName> MemberNameDict; +#endif + +class MemberNameSDict : public SDict<MemberName> +{ + public: + MemberNameSDict(int size) : SDict<MemberName>(size) {} + ~MemberNameSDict() {} + + int compareItems(GCI item1,GCI item2); +}; struct MemberInfo { @@ -89,6 +100,7 @@ class MemberNameInfoIterator : public QListIterator<MemberInfo> : QListIterator<MemberInfo>(mnii) {} }; +#if 0 class MemberNameInfoList : public QList<MemberNameInfo> { public: @@ -108,6 +120,15 @@ class MemberNameInfoDict : public QDict<MemberNameInfo> ~MemberNameInfoDict() {} }; +class MemberNameInfoListIterator : public QListIterator<MemberNameInfo> +{ + public: + MemberNameInfoListIterator(const MemberNameInfoList &mil) : + QListIterator<MemberNameInfo>(mil) {} +}; +#endif + + class MemberNameInfoSDict : public SDict<MemberNameInfo> { public: @@ -121,11 +142,4 @@ class MemberNameInfoSDict : public SDict<MemberNameInfo> } }; -class MemberNameInfoListIterator : public QListIterator<MemberNameInfo> -{ - public: - MemberNameInfoListIterator(const MemberNameInfoList &mil) : - QListIterator<MemberNameInfo>(mil) {} -}; - #endif @@ -866,12 +866,13 @@ void addDefine() md->setFileDef(g_yyFileDef); md->setDefinition("#define "+g_defName); - MemberName *mn=Doxygen::functionNameDict[g_defName]; + MemberName *mn=Doxygen::functionNameSDict[g_defName]; if (mn==0) { mn = new MemberName(g_defName); - Doxygen::functionNameList.append(mn); - Doxygen::functionNameDict.insert(g_defName,mn); + //Doxygen::functionNameList.append(mn); + //Doxygen::functionNameDict.insert(g_defName,mn); + Doxygen::functionNameSDict.append(g_defName,mn); } mn->append(md); if (g_yyFileDef) g_yyFileDef->insertMember(md); diff --git a/src/scanner.l b/src/scanner.l index faa8f3c..43ed58f 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -150,6 +150,8 @@ static bool needsSemi; static int depthIf; static int initializerSharpCount; +static QCString memberGroupRelates; +static QCString memberGroupInside; //----------------------------------------------------------------------------- @@ -166,6 +168,8 @@ static void initParser() roundCount = 0; curlyCount = 0; memberGroupId = NOGROUP; + memberGroupRelates.resize(0); + memberGroupInside.resize(0); mtype = Method; gstat = FALSE; virt = Normal; @@ -185,6 +189,8 @@ static void initEntry() current->virt = virt; current->stat = gstat; current->mGrpId = memberGroupId; + current->relates = memberGroupRelates.copy(); + current->inside = memberGroupInside.copy(); if (!autoGroupStack.isEmpty()) { current->groups->append(new Grouping(*autoGroupStack.top())); @@ -1320,7 +1326,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) startGroup(); tmpDocType=-1; if (current_root->section & Entry::SCOPE_MASK) + { current->inside = current_root->name+"::"; + if (current->mGrpId!=NOGROUP) + { + memberGroupInside = current->inside.copy(); + } + } if (yytext[1]=='/') // C++ style comment { current->brief.resize(0); @@ -2589,14 +2601,26 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) current->doc.resize(0); lastDocContext = YY_START; if (current_root->section & Entry::SCOPE_MASK) + { current->inside = current_root->name+"::"; + if (current->mGrpId!=NOGROUP) + { + memberGroupInside = current->inside.copy(); + } + } BEGIN( Doc ); } <FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases>("//"{B}*)?"/**"/[^/*] { removeSlashes=(yytext[1]=='/'); lastDocContext = YY_START; if (current_root->section & Entry::SCOPE_MASK) + { current->inside = current_root->name+"::"; + if (current->mGrpId!=NOGROUP) + { + memberGroupInside = current->inside.copy(); + } + } if (!Config_getBool("JAVADOC_AUTOBRIEF")) // use the Qt style { tmpDocType=-1; @@ -2629,7 +2653,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) tmpDocType=-1; lastDocContext = YY_START; if (current_root->section & Entry::SCOPE_MASK) + { current->inside = current_root->name+"::"; + if (current->mGrpId!=NOGROUP) + { + memberGroupInside = current->inside.copy(); + } + } BEGIN( LineDoc ); } <FindMembers,FindFields,MemberSpec,FuncQual,Operator,ClassVar,Bases>"///"/[^/] { @@ -2637,7 +2667,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) tmpDocType=-1; lastDocContext = YY_START; if (current_root->section & Entry::SCOPE_MASK) + { current->inside = current_root->name+"::"; + if (current->mGrpId!=NOGROUP) + { + memberGroupInside = current->inside.copy(); + } + } BEGIN( LineDoc ); } <FindMembers>"extern"{BN}+"\"C"("++")?"\""{BN}*("{")? { @@ -2997,6 +3033,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } <ClassDocRelates>({ID}"::")*{ID} { current->relates = yytext; + if (current->mGrpId!=NOGROUP) + { + memberGroupRelates = yytext; + } BEGIN( lastDocRelContext ); } <NameSpaceDocArg1>{SCOPENAME} { @@ -3332,6 +3372,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) else if (current->section == Entry::MEMBERGRP_SEC) { memberGroupId = newMemberGroupId(); + memberGroupRelates = current->relates.copy(); + memberGroupInside = current->inside.copy(); current->mGrpId = memberGroupId; lastMemberGroupLine = yyLineNr; } @@ -3943,6 +3985,8 @@ static void startGroup() memberGroupHeader="[NOHEADER]"; } memberGroupId = newMemberGroupId(); + memberGroupRelates = current->relates.copy(); + memberGroupInside = current->inside.copy(); current->mGrpId = memberGroupId; lastMemberGroupLine = yyLineNr; } @@ -3964,9 +4008,12 @@ static void endGroup() new QCString(memberGroupDocs) ); memberGroupId=NOGROUP; + memberGroupRelates.resize(0); + memberGroupInside.resize(0); if (YY_START!=ReadInitializer) { current->mGrpId=NOGROUP; + current->relates.resize(0); } memberGroupHeader.resize(0); memberGroupDocs.resize(0); @@ -4056,6 +4103,8 @@ static void parseCompounds(Entry *rt) //printf("name=%s current->stat=%d gstat=%d\n",ce->name.data(),current->stat,gstat); memberGroupId = NOGROUP; + memberGroupRelates.resize(0); + memberGroupInside.resize(0); scanYYlex() ; delete current; current=0; diff --git a/src/sortdict.h b/src/sortdict.h index e78d038..b716d33 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -130,6 +130,12 @@ class SDict } #endif } + /*! Remove an item from the dictionary */ + bool remove(const char *key) + { + T *item = m_dict->take(key); + return item ? m_list->remove(item) : FALSE; + } /*! Sorts the members of the dictionary. First appending a number * of members and then sorting them is faster (O(NlogN) than using * inSort() for each member (O(N^2)). @@ -170,7 +176,7 @@ class SDict } /*! Equavalent to find(). */ - T *operator[](const char *key) + T *operator[](const char *key) const { return m_dict->find(key); } diff --git a/src/util.cpp b/src/util.cpp index cbc64d6..81c7916 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -370,14 +370,14 @@ QCString resolveTypeDef(Definition *d,const QCString &name) MemberDef *md=0; while (mContext && md==0) { - MemberNameDict *mnd=0; + MemberNameSDict *mnd=0; if (mContext->definitionType()==Definition::TypeClass) { - mnd=&Doxygen::memberNameDict; + mnd=&Doxygen::memberNameSDict; } else { - mnd=&Doxygen::functionNameDict; + mnd=&Doxygen::functionNameSDict; } MemberName *mn=mnd->find(name); if (mn) @@ -1080,7 +1080,7 @@ static QCString trimTemplateSpecifiers( QCString result=s; int i=className.length()-1; - if (className.at(i)=='>') // template specialization + if (i>=0 && className.at(i)=='>') // template specialization { // replace unspecialized occurrences in s, with their specialized versions. int count=1; @@ -2046,7 +2046,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, //printf("mScope=`%s' mName=`%s'\n",mScope.data(),mName.data()); - MemberName *mn = Doxygen::memberNameDict[mName]; + MemberName *mn = Doxygen::memberNameSDict[mName]; if (!forceEmptyScope && mn && !(scopeName.isEmpty() && mScope.isEmpty())) { //printf(" >member name found\n"); @@ -2157,7 +2157,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, // maybe an namespace, file or group member ? //printf("Testing for global function scopeName=`%s' mScope=`%s' :: mName=`%s'\n", // scopeName.data(),mScope.data(),mName.data()); - if ((mn=Doxygen::functionNameDict[mName])) // name is known + if ((mn=Doxygen::functionNameSDict[mName])) // name is known { //printf(" >function name found\n"); NamespaceDef *fnd=0; @@ -2239,8 +2239,8 @@ bool getDefs(const QCString &scName,const QCString &memberName, gd=md->getGroupDef(); //printf("md->name()=`%s' md->args=`%s' fd=%p gd=%p\n", // md->name().data(),args,fd,gd); - if ((fd && fd->isLinkable()) || - (gd && gd->isLinkable()) + if ( + (gd && gd->isLinkable()) || (fd && fd->isLinkable()) ) { //printf("fd=%p gd=%p inGroup=`%d' args=`%s'\n",fd,gd,inGroup,args); @@ -2274,8 +2274,8 @@ bool getDefs(const QCString &scName,const QCString &memberName, //printf("member is linkable md->name()=`%s'\n",md->name().data()); fd=md->getFileDef(); gd=md->getGroupDef(); - if ((fd && fd->isLinkable()) || - (gd && gd->isLinkable()) + if ( + (gd && gd->isLinkable()) || (fd && fd->isLinkable()) ) { members.append(md); @@ -2309,6 +2309,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, { fd=md->getFileDef(); gd=md->getGroupDef(); + //printf("fd=%p gd=%p gd->isLinkable()=%d\n",fd,gd,gd->isLinkable()); if (gd && gd->isLinkable()) fd=0; else gd=0; return TRUE; } |