diff options
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 368 |
1 files changed, 267 insertions, 101 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 9d4b870..f9918ff 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -26,6 +26,7 @@ #include <qtextcodec.h> #include <unistd.h> #include <errno.h> +#include <qptrdict.h> #include "version.h" #include "doxygen.h" @@ -70,6 +71,7 @@ #include "pyscanner.h" #include "fortranscanner.h" #include "dbusxmlscanner.h" +#include "tclscanner.h" #include "code.h" #include "objcache.h" #include "store.h" @@ -522,6 +524,7 @@ static void buildGroupListFiltered(EntryNav *rootNav,bool additional, bool inclu gd->setInbodyDocumentation( root->inbodyDocs, root->inbodyFile, root->inbodyLine ); gd->addSectionsToDefinition(root->anchors); gd->setRefItems(root->sli); + gd->setLanguage(root->lang); } else { @@ -540,6 +543,7 @@ static void buildGroupListFiltered(EntryNav *rootNav,bool additional, bool inclu gd->addSectionsToDefinition(root->anchors); Doxygen::groupSDict->append(root->name,gd); gd->setRefItems(root->sli); + gd->setLanguage(root->lang); } } @@ -693,11 +697,10 @@ static void buildFileList(EntryNav *rootNav) else { const char *fn = root->fileName.data(); - QCString text; + QCString text(4096); text.sprintf("warning: the name `%s' supplied as " "the second argument in the \\file statement ", - qPrint(root->name) - ); + qPrint(root->name)); if (ambig) // name is ambiguous { text+="matches the following input files:\n"; @@ -1172,30 +1175,6 @@ static void addClassToContext(EntryNav *rootNav) fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); - cd->setLanguage(root->lang); - cd->setHidden(root->hidden); - cd->setArtificial(root->artificial); - cd->setTypeConstraints(root->typeConstr); - //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data()); - - ArgumentList *tArgList = - getTemplateArgumentsFromName(fullName,root->tArgLists); - //printf("class %s template args=%s\n",fullName.data(), - // tArgList ? tempArgListToString(tArgList).data() : "<none>"); - cd->setTemplateArguments(tArgList); - cd->setProtection(root->protection); - cd->setIsStatic(root->stat); - - // file definition containing the class cd - cd->setBodySegment(root->bodyLine,root->endBodyLine); - cd->setBodyDef(fd); - - // see if the class is found inside a namespace - //bool found=addNamespace(root,cd); - - - // the empty string test is needed for extract all case - cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); cd->insertUsedFile(root->fileName); // add class to the list @@ -1351,6 +1330,184 @@ void distributeClassGroupRelations() } } +//---------------------------- + +static ClassDef *createTagLessInstance(ClassDef *rootCd,ClassDef *templ,const QCString &fieldName) +{ + QCString fullName = removeAnonymousScopes(templ->name()); + if (fullName.right(2)=="::") fullName=fullName.left(fullName.length()-2); + fullName+="."+fieldName; + ClassDef *cd = new ClassDef(templ->getDefFileName(), + templ->getDefLine(), + fullName, + templ->compoundType()); + cd->setDocumentation(templ->documentation(),templ->docFile(),templ->docLine()); // copy docs to definition + cd->setBriefDescription(templ->briefDescription(),templ->briefFile(),templ->briefLine()); + cd->setLanguage(templ->getLanguage()); + cd->setBodySegment(templ->getStartBodyLine(),templ->getEndBodyLine()); + cd->setBodyDef(templ->getBodyDef()); + cd->setOuterScope(rootCd->getOuterScope()); + if (rootCd->getOuterScope()!=Doxygen::globalScope) + { + rootCd->getOuterScope()->addInnerCompound(cd); + } + FileDef *fd = templ->getFileDef(); + if (fd) + { + cd->setFileDef(fd); + fd->insertClass(cd); + } + LockingPtr<GroupList> groups = rootCd->partOfGroups(); + if ( groups!=0 ) + { + GroupListIterator gli(*groups); + GroupDef *gd; + for (gli.toFirst();(gd=gli.current());++gli) + { + cd->makePartOfGroup(gd); + gd->addClass(cd); + } + } + //cd->insertUsedFile(root->fileName); + //printf("** adding class %s based on %s\n",fullName.data(),templ->name().data()); + Doxygen::classSDict->append(fullName,cd); + + MemberList *ml = templ->getMemberList(MemberList::pubAttribs); + if (ml) + { + MemberListIterator li(*ml); + MemberDef *md; + for (li.toFirst();(md=li.current());++li) + { + //printf(" Member %s type=%s\n",md->name().data(),md->typeString()); + MemberDef *imd = new MemberDef(md->getDefFileName(),md->getDefLine(), + md->typeString(),md->name(),md->argsString(),md->excpString(), + md->protection(),md->virtualness(),md->isStatic(),Member, + md->memberType(), + 0,0); + imd->setMemberClass(cd); + imd->setDocumentation(md->documentation(),md->docFile(),md->docLine()); + imd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine()); + imd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine()); + imd->setMemberSpecifiers(md->getMemberSpecifiers()); + imd->setMemberGroupId(md->getMemberGroupId()); + imd->setInitializer(md->initializer()); + imd->setMaxInitLines(md->initializerLines()); + imd->setBitfields(md->bitfieldString()); + imd->setLanguage(md->getLanguage()); + cd->insertMember(imd); + } + } + return cd; +} + +/** Look through the members of class \a cd and its public members. + * If there is a member m of a tag less struct/union, + * then we create a duplicate of the struct/union with the name of the + * member to identify it. + * So if cd has name S, then the tag less struct/union will get name S.m + * Since tag less structs can be nested we need to call this function + * recursively. Later on we need to patch the member types so we keep + * track of the hierarchy of classes we create. + */ +static void processTagLessClasses(ClassDef *rootCd, + ClassDef *cd, + ClassDef *tagParentCd, + const QCString &prefix,int count) +{ + printf("%d: processTagLessClasses %s\n",count,cd->name().data()); + //printf("checking members for %s\n",cd->name().data()); + if (cd->getInnerClasses()) + { + MemberList *ml = cd->getMemberList(MemberList::pubAttribs); + if (ml) + { + MemberListIterator li(*ml); + MemberDef *md; + for (li.toFirst();(md=li.current());++li) + { + QCString type = md->typeString(); + if (type.find("::@")!=-1) // member of tag less struct/union + { + ClassSDict::Iterator it(*cd->getInnerClasses()); + ClassDef *icd; + for (it.toFirst();(icd=it.current());++it) + { + printf(" member %s: type='%s'\n",md->name().data(),type.data()); + //printf(" comparing '%s'<->'%s'\n",type.data(),icd->name().data()); + if (type.find(icd->name())!=-1) // matching tag less struct/union + { + QCString name = md->name(); + if (name.at(0)=='@') name = "__unnamed__"; + if (!prefix.isEmpty()) name.prepend(prefix+"."); + //printf(" found %s for class %s\n",name.data(),cd->name().data()); + ClassDef *ncd = createTagLessInstance(rootCd,icd,name); + processTagLessClasses(rootCd,icd,ncd,name,count+1); + //printf(" addTagged %s to %s\n",ncd->name().data(),cd->name().data()); + tagParentCd->addTaggedInnerClass(ncd); + ncd->setTagLessReference(icd); + + // replace tag-less type for generated/original member + // by newly created class name. + // note the difference between changing cd and tagParentCd. + // for the initial call this is the same pointer, but for + // recursive calls cd is the original tag-less struct (of which + // there is only one instance) and tagParentCd is the newly + // generated tagged struct of which there can be multiple instances! + MemberList *pml = tagParentCd->getMemberList(MemberList::pubAttribs); + if (pml) + { + MemberListIterator pli(*pml); + MemberDef *pmd; + for (pli.toFirst();(pmd=pli.current());++pli) + { + if (pmd->name()==md->name()) + { + pmd->setType(substitute(pmd->typeString(),icd->name(),ncd->name())); + } + } + } + } + } + } + } + } + } +} + +static void findTagLessClasses(ClassDef *cd) +{ + if (cd->getInnerClasses()) + { + ClassSDict::Iterator it(*cd->getInnerClasses()); + ClassDef *icd; + for (it.toFirst();(icd=it.current());++it) + { + if (icd->name().find("@")==-1) // process all non-anonymous inner classes + { + findTagLessClasses(icd); + } + } + } + + processTagLessClasses(cd,cd,cd,"",0); // process tag less inner struct/classes (if any) +} + +static void findTagLessClasses() +{ + ClassSDict::Iterator cli(*Doxygen::classSDict); + ClassDef *cd; + for (cli.toFirst();(cd=cli.current());++cli) // for each class + { + Definition *scope = cd->getOuterScope(); + if (scope && scope->definitionType()!=Definition::TypeClass) // that is not nested + { + findTagLessClasses(cd); + } + } +} + + //---------------------------------------------------------------------- // build a list of all namespaces mentioned in the documentation // and all namespaces that have a documentation block before their definition. @@ -1383,42 +1540,14 @@ static void buildNamespaceList(EntryNav *rootNav) NamespaceDef *nd; if ((nd=Doxygen::namespaceSDict->find(fullName))) // existing namespace { -#if 0 - if (!root->doc.isEmpty() || !root->brief.isEmpty()) // block contains docs - { - if (nd->documentation().isEmpty() && !root->doc.isEmpty()) - { -#endif - nd->setDocumentation(root->doc,root->docFile,root->docLine); - nd->setName(fullName); // change name to match docs - nd->addSectionsToDefinition(root->anchors); -#if 0 - } - else if (!nd->documentation().isEmpty() && !root->doc.isEmpty()) - { - warn( - root->fileName,root->startLine, - "warning: namespace %s already has a detailed description found in file %s at line %d. " - "Skipping the documentation found here.", - fullName.data(),nd->docFile().data(),nd->docLine()); - } - if (nd->briefDescription().isEmpty() && !root->brief.isEmpty()) - { -#endif - nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); -#if 0 - nd->setName(fullName); // change name to match docs - } - else if (!nd->briefDescription().isEmpty() && !root->brief.isEmpty()) - { - warn(root->fileName,root->startLine, - "warning: namespace %s already has a brief description found in file %s at line %d. " - "Skipping the documentation found here.", - fullName.data(),nd->docFile().data(),nd->docLine() - ); - } + nd->setDocumentation(root->doc,root->docFile,root->docLine); + nd->setName(fullName); // change name to match docs + nd->addSectionsToDefinition(root->anchors); + nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); + if (nd->getLanguage()==SrcLangExt_Unknown) + { + nd->setLanguage(root->lang); } -#endif // file definition containing the namespace nd FileDef *fd=rootNav->fileDef(); @@ -1436,13 +1565,14 @@ static void buildNamespaceList(EntryNav *rootNav) tagName=rootNav->tagInfo()->tagName; tagFileName=rootNav->tagInfo()->fileName; } - //printf("++ new namespace %s\n",fullName.data()); + //printf("++ new namespace %s lang=%s\n",fullName.data(),langToString(root->lang).data()); NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,fullName,tagName,tagFileName); nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->addSectionsToDefinition(root->anchors); nd->setHidden(root->hidden); nd->setArtificial(root->artificial); + nd->setLanguage(root->lang); //printf("Adding namespace to group\n"); addNamespaceToGroups(root,nd); @@ -1527,7 +1657,7 @@ static void findUsingDirectives(EntryNav *rootNav) // see if the using statement was found inside a namespace or inside // the global file scope. if (rootNav->parent() && rootNav->parent()->section()==Entry::NAMESPACE_SEC && - (fd==0 || !fd->isJava()) // not a .java file + (fd==0 || fd->getLanguage()!=SrcLangExt_Java) // not a .java file ) { nsName=stripAnonymousNamespaceScope(rootNav->parent()->name()); @@ -1604,7 +1734,7 @@ static void findUsingDirectives(EntryNav *rootNav) } else // unknown namespace, but add it anyway. { - //printf("++ new unknown namespace %s\n",name.data()); + //printf("++ new unknown namespace %s lang=%s\n",name.data(),langToString(root->lang).data()); NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,name); nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); @@ -1612,6 +1742,7 @@ static void findUsingDirectives(EntryNav *rootNav) //printf("** Adding namespace %s hidden=%d\n",name.data(),root->hidden); nd->setHidden(root->hidden); nd->setArtificial(TRUE); + nd->setLanguage(root->lang); QListIterator<Grouping> gli(*root->groups); Grouping *g; @@ -1723,6 +1854,7 @@ static void findUsingDeclarations(EntryNav *rootNav) name,ClassDef::Class); Doxygen::hiddenClasses->append(root->name,usingCd); usingCd->setArtificial(TRUE); + usingCd->setLanguage(root->lang); } else { @@ -1832,6 +1964,7 @@ static void findUsingDeclImports(EntryNav *rootNav) newMd->setMaxInitLines(md->initializerLines()); newMd->setMemberGroupId(root->mGrpId); newMd->setMemberSpecifiers(md->getMemberSpecifiers()); + newMd->setLanguage(root->lang); rootNav->releaseEntry(); } @@ -1895,7 +2028,8 @@ static MemberDef *addVariableToClass( QCString qualScope = cd->qualifiedNameWithTemplateParameters(); QCString scopeSeparator="::"; - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + SrcLangExt lang = cd->getLanguage(); + if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp) { qualScope = substitute(qualScope,"::","."); scopeSeparator="."; @@ -1999,6 +2133,7 @@ static MemberDef *addVariableToClass( md->enableCallerGraph(root->callerGraph); md->setHidden(root->hidden); md->setArtificial(root->artificial); + md->setLanguage(root->lang); addMemberToGroups(root,md); //if (root->mGrpId!=-1) //{ @@ -2107,9 +2242,8 @@ static MemberDef *addVariableToFile( ) // variable is inside a namespace, so put the scope before the name { - static bool optimizeForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); - QCString sep="::"; - if (optimizeForJava) sep="."; + SrcLangExt lang = nd->getLanguage(); + QCString sep=getLanguageSpecificSeparator(lang); if (!root->type.isEmpty()) { @@ -2164,7 +2298,7 @@ static MemberDef *addVariableToFile( if (md->getFileDef() && ! // not a php array ( - (getLanguageFromFileName(md->getFileDef()->name())==SrcLangExt_PHP) && + (md->getLanguage()==SrcLangExt_PHP) && (md->argsString()!=root->args && root->args.find('[')!=-1) ) ) @@ -2199,6 +2333,7 @@ static MemberDef *addVariableToFile( md->setMaxInitLines(root->initLines); md->setMemberGroupId(root->mGrpId); md->setDefinition(def); + md->setLanguage(root->lang); md->enableCallGraph(root->callGraph); md->enableCallerGraph(root->callerGraph); md->setExplicitExternal(root->explicitExternal); @@ -2246,7 +2381,7 @@ static MemberDef *addVariableToFile( */ static int findFunctionPtr(const QCString &type,int lang, int *pLength=0) { - if (lang == SrcLangExt_F90) return -1; // Fortran does not have function pointers + if (lang == SrcLangExt_Fortran) return -1; // Fortran does not have function pointers static const QRegExp re("([^)]*[\\*\\^][^)]*)"); int i=-1,l; if (!type.isEmpty() && // return type is non-empty @@ -2535,8 +2670,8 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) { MemberDef *md=0; - // if cd is an anonymous scope we insert the member - // into a non-anonymous scope as well. This is needed to + // if cd is an anonymous (=tag less) scope we insert the member + // into a non-anonymous parent scope as well. This is needed to // be able to refer to it using \var or \fn //int indentDepth=0; @@ -2544,11 +2679,12 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) //int anonyScopes = 0; bool added=FALSE; - if (si!=-1) // anonymous scope + static bool inlineSimpleStructs = Config_getBool("INLINE_SIMPLE_STRUCTS"); + if (si!=-1 && !inlineSimpleStructs) // anonymous scope or type { QCString pScope; ClassDef *pcd=0; - pScope = scope.left(QMAX(si-2,0)); + pScope = scope.left(QMAX(si-2,0)); // scope without tag less parts if (!pScope.isEmpty()) pScope.prepend(annScopePrefix); else if (annScopePrefix.length()>2) @@ -2679,7 +2815,8 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd, int l,i=-1; static QRegExp re("([a-z_A-Z0-9: ]*[ &*]+[ ]*"); - if (!root->type.isEmpty() && (i=re.match(root->type,0,&l))!=-1) // function variable + if (cd->getLanguage()==SrcLangExt_Cpp && // only C has pointers + !root->type.isEmpty() && (i=re.match(root->type,0,&l))!=-1) // function variable { root->args+=root->type.right(root->type.length()-i-l); root->type=root->type.left(i+l); @@ -2696,7 +2833,7 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd, else mtype=MemberDef::Function; // strip redundant template specifier for constructors - if ((fd==0 || getLanguageFromFileName(fd->name())==SrcLangExt_Cpp) && + if ((fd==0 || fd->getLanguage()==SrcLangExt_Cpp) && name.left(9)!="operator " && (i=name.find('<'))!=-1 && name.find('>')!=-1) { name=name.left(i); @@ -2725,17 +2862,23 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd, md->setMemberSpecifiers(root->spec); md->setMemberGroupId(root->mGrpId); md->setTypeConstraints(root->typeConstr); + md->setLanguage(root->lang); md->setBodyDef(fd); md->setFileDef(fd); //md->setScopeTemplateArguments(root->tArgList); md->addSectionsToDefinition(root->anchors); QCString def; QCString qualScope = cd->qualifiedNameWithTemplateParameters(); - QCString scopeSeparator="::"; - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + SrcLangExt lang = cd->getLanguage(); + QCString scopeSeparator=getLanguageSpecificSeparator(lang); + if (scopeSeparator!="::") { - qualScope = substitute(qualScope,"::","."); - scopeSeparator="."; + qualScope = substitute(qualScope,"::",scopeSeparator); + } + if (lang==SrcLangExt_PHP) + { + // for PHP we use Class::method and Namespace\method + scopeSeparator="::"; } if (!root->relates.isEmpty() || isFriend || Config_getBool("HIDE_SCOPE_NAMES")) { @@ -2910,8 +3053,9 @@ static void buildFunctionList(EntryNav *rootNav) cd && // do some fuzzy things to exclude function pointers (root->type.isEmpty() || - (root->type.find(re,0)==-1 || root->args.find(")[")!=-1) || // type contains ..(..* and args not )[.. -> function pointer - root->type.find(")(")!=-1 || root->type.find("operator")!=-1 // type contains ..)(.. and not "operator" + (root->type.find(re,0)==-1 || root->args.find(")[")!=-1) || // type contains ..(..* and args not )[.. -> function pointer + root->type.find(")(")!=-1 || root->type.find("operator")!=-1 || // type contains ..)(.. and not "operator" + cd->getLanguage()!=SrcLangExt_Cpp // language other than C ) ) { @@ -3083,6 +3227,7 @@ static void buildFunctionList(EntryNav *rootNav) MemberDef::Function,tArgList,root->argList); md->setTagInfo(rootNav->tagInfo()); + md->setLanguage(root->lang); //md->setDefFile(root->fileName); //md->setDefLine(root->startLine); md->setDocumentation(root->doc,root->docFile,root->docLine); @@ -3113,14 +3258,12 @@ static void buildFunctionList(EntryNav *rootNav) if (!scope.isEmpty()) { - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + QCString sep = getLanguageSpecificSeparator(root->lang); + if (sep!="::") { - scope = substitute(scope,"::",".")+"."; - } - else - { - scope+="::"; + scope = substitute(scope,"::",sep); } + scope+=sep; } QCString def; @@ -3825,6 +3968,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, //printf("making %s a template argument!!!\n",usedCd->name().data()); usedCd->makeTemplateArgument(); usedCd->setUsedOnly(TRUE); + usedCd->setLanguage(masterCd->getLanguage()); Doxygen::hiddenClasses->append(usedName,usedCd); } if (usedCd) @@ -3872,6 +4016,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, masterCd->getDefFileName(),masterCd->getDefLine(), type,ClassDef::Class); usedCd->setUsedOnly(TRUE); + usedCd->setLanguage(masterCd->getLanguage()); Doxygen::hiddenClasses->append(type,usedCd); } if (usedCd) @@ -4372,6 +4517,7 @@ static bool findClassRelation( baseClassName,ClassDef::Class); Doxygen::hiddenClasses->append(baseClassName,baseClass); if (isArtificial) baseClass->setArtificial(TRUE); + baseClass->setLanguage(root->lang); } } else @@ -4385,6 +4531,7 @@ static bool findClassRelation( baseClassName,ClassDef::Class); Doxygen::classSDict->append(baseClassName,baseClass); if (isArtificial) baseClass->setArtificial(TRUE); + baseClass->setLanguage(root->lang); } } // add base class to this class @@ -5048,14 +5195,14 @@ static bool findGlobalMember(EntryNav *rootNav, QCString fullFuncDecl=decl; if (root->argList) fullFuncDecl+=argListToString(root->argList,TRUE); QCString warnMsg = - QCString("warning: no matching file member found for \n")+fullFuncDecl; + QCString("warning: no matching file member found for \n")+substitute(fullFuncDecl,"%","%%"); if (mn->count()>0) { warnMsg+="Possible candidates:\n"; for (mni.toFirst();(md=mni.current());++mni) { warnMsg+=" "; - warnMsg+=md->declaration(); + warnMsg+=substitute(md->declaration(),"%","%%"); warnMsg+='\n'; } } @@ -5834,6 +5981,7 @@ static void findMember(EntryNav *rootNav, mtype,tArgList,root->argList); //printf("new specialized member %s args=`%s'\n",md->name().data(),funcArgs.data()); md->setTagInfo(rootNav->tagInfo()); + md->setLanguage(root->lang); md->setMemberClass(cd); md->setTemplateSpecialization(TRUE); md->setTypeConstraints(root->typeConstr); @@ -5897,6 +6045,7 @@ static void findMember(EntryNav *rootNav, root->protection,root->virt,root->stat,Related, mtype,tArgList,root->argList); md->setTagInfo(rootNav->tagInfo()); + md->setLanguage(root->lang); md->setTypeConstraints(root->typeConstr); md->setMemberClass(cd); md->setDefinition(funcDecl); @@ -6109,6 +6258,7 @@ static void findMember(EntryNav *rootNav, md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->addSectionsToDefinition(root->anchors); md->setMemberGroupId(root->mGrpId); + md->setLanguage(root->lang); //md->setMemberDefTemplateArguments(root->mtArgList); mn->append(md); cd->insertMember(md); @@ -6156,6 +6306,8 @@ localObjCMethod: //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); if (Config_getBool("EXTRACT_LOCAL_METHODS") && (cd=getClass(scopeName))) { + Debug::print(Debug::FindMembers,0,"4. Local objective C method %s\n" + " scopeName=%s className=%s\n",root->name.data(),scopeName.data(),className.data()); //printf("Local objective C method `%s' of class `%s' found\n",root->name.data(),cd->name().data()); MemberDef *md=new MemberDef( root->fileName,root->startLine, @@ -6163,6 +6315,7 @@ localObjCMethod: root->protection,root->virt,root->stat,Member, MemberDef::Function,0,root->argList); md->setTagInfo(rootNav->tagInfo()); + md->setLanguage(root->lang); md->makeImplementationDetail(); md->setMemberClass(cd); md->setDefinition(funcDecl); @@ -6491,6 +6644,7 @@ static void findEnums(EntryNav *rootNav) MemberDef::Enumeration, 0,0); md->setTagInfo(rootNav->tagInfo()); + md->setLanguage(root->lang); if (!isGlobal) md->setMemberClass(cd); else md->setFileDef(fd); md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodyDef(rootNav->fileDef()); @@ -6756,6 +6910,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav) else if (md->getFileDef()) fmd->setFileDef(md->getFileDef()); fmd->setOuterScope(md->getOuterScope()); fmd->setTagInfo(e->tagInfo()); + fmd->setLanguage(root->lang); fmd->setDocumentation(root->doc,root->docFile,root->docLine); fmd->setBriefDescription(root->brief,root->briefFile,root->briefLine); fmd->addSectionsToDefinition(root->anchors); @@ -7178,13 +7333,11 @@ static void createTemplateInstanceMembers() //---------------------------------------------------------------------------- -// builds the list of all members for each class - -static void buildCompleteMemberLists() +static void mergeCategories() { ClassDef *cd; - // merge members of categories into the class they extend ClassSDict::Iterator cli(*Doxygen::classSDict); + // merge members of categories into the class they extend for (cli.toFirst();(cd=cli.current());++cli) { int i=cd->name().find('('); @@ -7200,6 +7353,14 @@ static void buildCompleteMemberLists() } } } +} + +// builds the list of all members for each class + +static void buildCompleteMemberLists() +{ + ClassDef *cd; + ClassSDict::Iterator cli(*Doxygen::classSDict); // merge the member list of base classes into the inherited classes. for (cli.toFirst();(cd=cli.current());++cli) { @@ -7783,6 +7944,7 @@ static void findDefineDocumentation(EntryNav *rootNav) "#define",root->name,root->args,0, Public,Normal,FALSE,Member,MemberDef::Define,0,0); md->setTagInfo(rootNav->tagInfo()); + md->setLanguage(root->lang); //printf("Searching for `%s' fd=%p\n",filePathName.data(),fd); md->setFileDef(rootNav->parent()->fileDef()); //printf("Adding member=%s\n",md->name().data()); @@ -7872,6 +8034,7 @@ static void findDefineDocumentation(EntryNav *rootNav) md->setBodyDef(rootNav->fileDef()); md->addSectionsToDefinition(root->anchors); md->setRefItems(root->sli); + md->setLanguage(root->lang); if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId); addMemberToGroups(root,md); } @@ -9255,6 +9418,7 @@ void initDoxygen() Doxygen::parserManager->registerParser("fortran", new FortranLanguageScanner); Doxygen::parserManager->registerParser("vhdl", new VHDLLanguageScanner); Doxygen::parserManager->registerParser("dbusxml", new DBusXMLScanner); + Doxygen::parserManager->registerParser("tcl", new TclLanguageScanner); // register any additional parsers here... @@ -10108,7 +10272,7 @@ void parseInput() msg("Parsing layout file %s...\n",layoutFileName.data()); QTextStream t(&layoutFile); t.setEncoding(QTextStream::Latin1); - LayoutDocManager::instance().parse(t); + LayoutDocManager::instance().parse(t,layoutFileName); } else if (!defaultLayoutUsed) { @@ -10272,6 +10436,11 @@ void parseInput() findInheritedTemplateInstances(); msg("Computing class usage relations...\n"); findUsedTemplateInstances(); + if (Config_getBool("INLINE_SIMPLE_STRUCTS")) + { + msg("Searching for tag less structs...\n"); + findTagLessClasses(); + } msg("Flushing cached template relations that have become invalid...\n"); flushCachedTemplateRelations(); @@ -10282,12 +10451,8 @@ void parseInput() msg("Computing class relations...\n"); computeTemplateClassRelations(); flushUnresolvedRelations(); - computeClassRelations(); - - if (Config_getBool("OPTIMIZE_OUTPUT_VHDL")) - VhdlDocGen::computeVhdlComponentRelations(); - + VhdlDocGen::computeVhdlComponentRelations(); g_classEntries.clear(); msg("Add enum values to enums...\n"); @@ -10336,6 +10501,7 @@ void parseInput() computeMemberRelations(); msg("Building full member lists recursively...\n"); + mergeCategories(); buildCompleteMemberLists(); msg("Adding members to member groups.\n"); |