void GroupDef::writeGroupGraph(OutputList &ol) { if (Config_getBool("HAVE_DOT") /*&& Config_getBool("GROUP_GRAPHS")*/ ) { DotGroupCollaboration graph(this); if (!graph.isTrivial()) { msg("Generating dependency graph for group %s\n",qualifiedName().data()); ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); //ol.startParagraph(); ol.startGroupCollaboration(); ol.parseText(theTranslator->trCollaborationDiagram(title)); ol.endGroupCollaboration(graph); //ol.endParagraph(); ol.popGeneratorState(); } } }
void FileDef::writeIncludedByGraph(OutputList &ol) { if (Config_getBool("HAVE_DOT") /*&& Config_getBool("INCLUDED_BY_GRAPH")*/) { //printf("Graph for file %s\n",name().data()); DotInclDepGraph incDepGraph(this,TRUE); if (!incDepGraph.isTrivial() && !incDepGraph.isTooBig()) { ol.startTextBlock(); ol.disable(OutputGenerator::Man); ol.startInclDepGraph(); ol.parseText(theTranslator->trInclByDepGraph()); ol.endInclDepGraph(incDepGraph); ol.enableAll(); ol.endTextBlock(TRUE); } //incDepGraph.writeGraph(Config_getString("HTML_OUTPUT"),fd->getOutputFileBase()); } }
void DirDef::writeDirectoryGraph(OutputList &ol) { // write graph dependency graph if (Config_getBool("DIRECTORY_GRAPH") && Config_getBool("HAVE_DOT")) { DotDirDeps dirDep(this); if (!dirDep.isTrivial()) { msg("Generating dependency graph for directory %s\n",displayName().data()); ol.disable(OutputGenerator::Man); //ol.startParagraph(); ol.startDirDepGraph(); ol.parseText(theTranslator->trDirDepGraph(shortName())); ol.endDirDepGraph(dirDep); //ol.endParagraph(); ol.enableAll(); } } }
void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title) { if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || !documentation().isEmpty()) { ol.writeRuler(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeAnchor(0,"_details"); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(title); ol.endGroupHeader(); // repeat brief description if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) { ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); } // separator between brief and details if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::RTF); // ol.newParagraph(); // FIXME:PARA ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.writeString("\n\n"); ol.popGeneratorState(); } // write documentation if (!documentation().isEmpty()) { ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); } } }
void MemberList::writeDocumentation(OutputList &ol, const char *scopeName, Definition *container, const char *title,bool showEnumValues,bool showInline) { //printf("MemberList::writeDocumentation()\n"); countDocMembers(showEnumValues); if (numDocMembers()==0) return; if (title) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); ol.writeRuler(); ol.popGeneratorState(); ol.startGroupHeader(showInline ? 2 : 0); ol.parseText(title); ol.endGroupHeader(showInline ? 2 : 0); } ol.startMemberDocList(); MemberListIterator mli(*this); MemberDef *md; for ( ; (md=mli.current()) ; ++mli) { md->writeDocumentation(this,ol,scopeName,container, m_inGroup,showEnumValues,showInline); } if (memberGroupList) { //printf("MemberList::writeDocumentation() -- member groups\n"); MemberGroupListIterator mgli(*memberGroupList); MemberGroup *mg; for (;(mg=mgli.current());++mgli) { mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline); } } ol.endMemberDocList(); }
void NamespaceDef::writeDetailedDocumentation(OutputList &ol) { if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || !documentation().isEmpty()) { ol.writeRuler(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); //bool latexOn = ol.isEnabled(OutputGenerator::Latex); //if (latexOn) ol.disable(OutputGenerator::Latex); ol.writeAnchor(0,"_details"); //if (latexOn) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(theTranslator->trDetailedDescription()); ol.endGroupHeader(); ol.startTextBlock(); if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) { ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); } if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.newParagraph(); ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.writeString("\n\n"); ol.popGeneratorState(); } if (!documentation().isEmpty()) { ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); ol.newParagraph(); } ol.endTextBlock(); } }
void NamespaceDef::writeBriefDescription(OutputList &ol) { if (hasBriefDescription()) { DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.writeString(" \n"); ol.enable(OutputGenerator::RTF); if (hasDetailedDescription()) { ol.disableAllBut(OutputGenerator::Html); ol.startTextLink(0,"details"); ol.parseText(theTranslator->trMore()); ol.endTextLink(); } ol.popGeneratorState(); ol.endParagraph(); } delete rootNode; // FIXME:PARA //ol.pushGeneratorState(); //ol.disable(OutputGenerator::RTF); //ol.newParagraph(); //ol.popGeneratorState(); } ol.writeSynopsis(); }
void FileDef::writeIncludeGraph(OutputList &ol) { if (Config_getBool("HAVE_DOT") /*&& Config_getBool("INCLUDE_GRAPH")*/) { //printf("Graph for file %s\n",name().data()); DotInclDepGraph incDepGraph(this,FALSE); if (incDepGraph.isTooBig()) { err("warning: Include graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",name().data()); } else if (!incDepGraph.isTrivial()) { ol.startTextBlock(); ol.disable(OutputGenerator::Man); ol.startInclDepGraph(); ol.parseText(theTranslator->trInclDepGraph(name())); ol.endInclDepGraph(incDepGraph); ol.enableAll(); ol.endTextBlock(TRUE); } //incDepGraph.writeGraph(Config_getString("HTML_OUTPUT"),fd->getOutputFileBase()); } }
void NamespaceDef::writeBriefDescription(OutputList &ol) { if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.writeString(" \n"); ol.enable(OutputGenerator::RTF); if (Config_getBool("REPEAT_BRIEF") || !documentation().isEmpty() ) { ol.disableAllBut(OutputGenerator::Html); ol.startTextLink(0,"details"); ol.parseText(theTranslator->trMore()); ol.endTextLink(); } ol.popGeneratorState(); ol.endParagraph(); } delete rootNode; // FIXME:PARA //ol.pushGeneratorState(); //ol.disable(OutputGenerator::RTF); //ol.newParagraph(); //ol.popGeneratorState(); } ol.writeSynopsis(); }
void DirDef::writeBriefDescription(OutputList &ol) { if (hasBriefDescription()) { DocRoot *rootNode = validatingParseDoc( briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE); if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.writeString(" \n"); ol.enable(OutputGenerator::RTF); if (Config_getBool(REPEAT_BRIEF) || !documentation().isEmpty() ) { ol.disableAllBut(OutputGenerator::Html); ol.startTextLink(0,"details"); ol.parseText(theTranslator->trMore()); ol.endTextLink(); } ol.popGeneratorState(); ol.endParagraph(); } delete rootNode; } ol.writeSynopsis(); }
void DirDef::writeDocumentation(OutputList &ol) { ol.pushGeneratorState(); QCString shortTitle=theTranslator->trDirReference(m_shortName); QCString title=theTranslator->trDirReference(m_dispName); startFile(ol,getOutputFileBase(),name(),title,HLI_None,TRUE); // write navigation path writeNavigationPath(ol); ol.endQuickIndices(); ol.startContents(); startTitle(ol,getOutputFileBase()); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.parseText(shortTitle); ol.enableAll(); ol.disable(OutputGenerator::Html); ol.parseText(title); ol.popGeneratorState(); endTitle(ol,getOutputFileBase(),title); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <compound kind=\"dir\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl; Doxygen::tagFile << " <path>" << convertToXML(name()) << "</path>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; } //---------------------------------------- start flexible part ------------------------------- QListIterator<LayoutDocEntry> eli( LayoutDocManager::instance().docEntries(LayoutDocManager::Directory)); LayoutDocEntry *lde; for (eli.toFirst();(lde=eli.current());++eli) { switch (lde->kind()) { case LayoutDocEntry::BriefDesc: writeBriefDescription(ol); break; case LayoutDocEntry::DirGraph: writeDirectoryGraph(ol); break; case LayoutDocEntry::MemberDeclStart: startMemberDeclarations(ol); break; case LayoutDocEntry::DirSubDirs: writeSubDirList(ol); break; case LayoutDocEntry::DirFiles: writeFileList(ol); break; case LayoutDocEntry::MemberDeclEnd: endMemberDeclarations(ol); break; case LayoutDocEntry::DetailedDesc: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDetailedDescription(ol,ls->title); } break; case LayoutDocEntry::ClassIncludes: case LayoutDocEntry::ClassInheritanceGraph: case LayoutDocEntry::ClassNestedClasses: case LayoutDocEntry::ClassCollaborationGraph: case LayoutDocEntry::ClassAllMembersLink: case LayoutDocEntry::ClassUsedFiles: case LayoutDocEntry::NamespaceNestedNamespaces: case LayoutDocEntry::NamespaceClasses: case LayoutDocEntry::FileClasses: case LayoutDocEntry::FileNamespaces: case LayoutDocEntry::FileIncludes: case LayoutDocEntry::FileIncludeGraph: case LayoutDocEntry::FileIncludedByGraph: case LayoutDocEntry::FileSourceLink: case LayoutDocEntry::GroupClasses: case LayoutDocEntry::GroupNamespaces: case LayoutDocEntry::GroupDirs: case LayoutDocEntry::GroupNestedGroups: case LayoutDocEntry::GroupFiles: case LayoutDocEntry::GroupGraph: case LayoutDocEntry::GroupPageDocs: case LayoutDocEntry::AuthorSection: case LayoutDocEntry::MemberGroups: case LayoutDocEntry::MemberDecl: case LayoutDocEntry::MemberDef: case LayoutDocEntry::MemberDefStart: case LayoutDocEntry::MemberDefEnd: err("Internal inconsistency: member %d should not be part of " "LayoutDocManager::Directory entry list\n",lde->kind()); break; } } //---------------------------------------- end flexible part ------------------------------- if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } endFile(ol); ol.popGeneratorState(); }
void MemberList::writeDocumentation(OutputList &ol, const char *scopeName, Definition *container, const char *title,bool showEnumValues,bool showInline) { //printf("MemberList::writeDocumentation()\n"); countDocMembers(showEnumValues); if (numDocMembers()==0) return; if (title) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); ol.writeRuler(); ol.popGeneratorState(); ol.startGroupHeader(showInline ? 2 : 0); ol.parseText(title); ol.endGroupHeader(showInline ? 2 : 0); } ol.startMemberDocList(); MemberListIterator mli(*this); MemberDef *md; // count the number of overloaded members QDict<uint> overloadTotalDict(67); QDict<uint> overloadCountDict(67); overloadTotalDict.setAutoDelete(TRUE); overloadCountDict.setAutoDelete(TRUE); for (mli.toFirst() ; (md=mli.current()) ; ++mli) { if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) && !(md->isEnumValue() && !showInline)) { uint *pCount = overloadTotalDict.find(md->name()); if (pCount) { (*pCount)++; } else { overloadTotalDict.insert(md->name(),new uint(1)); overloadCountDict.insert(md->name(),new uint(1)); } } } for (mli.toFirst() ; (md=mli.current()) ; ++mli) { if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) && !(md->isEnumValue() && !showInline)) { uint overloadCount = *overloadTotalDict.find(md->name()); uint *pCount = overloadCountDict.find(md->name()); md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container, m_inGroup,showEnumValues,showInline); (*pCount)++; } } if (memberGroupList) { printf("MemberList::writeDocumentation() -- member groups %d\n",memberGroupList->count()); MemberGroupListIterator mgli(*memberGroupList); MemberGroup *mg; for (; (mg=mgli.current()); ++mgli) { mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline); } } ol.endMemberDocList(); }
void FileDef::writeIncludeFiles(OutputList &ol) { if (/*Config_getBool("SHOW_INCLUDE_FILES") &&*/ includeList && includeList->count()>0) { ol.startTextBlock(TRUE); QListIterator<IncludeInfo> ili(*includeList); IncludeInfo *ii; for (;(ii=ili.current());++ili) { FileDef *fd=ii->fileDef; bool isIDLorJava = FALSE; if (fd) { SrcLangExt lang = fd->getLanguage(); isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java; } ol.startTypewriter(); if (isIDLorJava) // IDL/Java include { ol.docify("import "); } else if (ii->imported) // Objective-C include { ol.docify("#import "); } else // C/C++ include { ol.docify("#include "); } if (ii->local || isIDLorJava) ol.docify("\""); else ol.docify("<"); ol.disable(OutputGenerator::Html); ol.docify(ii->includeName); ol.enableAll(); ol.disableAllBut(OutputGenerator::Html); // Here we use the include file name as it appears in the file. // we could also we the name as it is used within doxygen, // then we should have used fd->docName() instead of ii->includeName if (fd && fd->isLinkable()) { ol.writeObjectLink(fd->getReference(), fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(), 0,ii->includeName); if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference()) { const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no"; const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no"; Doxygen::tagFile << " <includes id=\"" << convertToXML(fd->getOutputFileBase()) << "\" " << "name=\"" << convertToXML(fd->name()) << "\" " << "local=\"" << locStr << "\" " << "imported=\"" << impStr << "\">" << convertToXML(ii->includeName) << "</includes>" << endl; } } else { ol.docify(ii->includeName); } ol.enableAll(); if (ii->local || isIDLorJava) ol.docify("\""); else ol.docify(">"); if (isIDLorJava) ol.docify(";"); ol.endTypewriter(); ol.lineBreak(); } ol.endTextBlock(); } }
/*! Write the documentation page for this file to the file of output generators \a ol. */ void FileDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); //funcList->countDecMembers(); //QCString fn = name(); //if (Config_getBool("FULL_PATH_NAMES")) //{ // fn.prepend(stripFromPath(getPath().copy())); //} //printf("WriteDocumentation diskname=%s\n",diskname.data()); QCString versionTitle; if (!fileVersion.isEmpty()) { versionTitle=("("+fileVersion+")"); } QCString title = docname+versionTitle; QCString pageTitle=theTranslator->trFileReference(docname); if (Config_getBool("SHOW_DIRECTORIES") && getDirDef()) { startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView); if (!generateTreeView) { getDirDef()->writeNavigationPath(ol); ol.endQuickIndices(); } QCString pageTitleShort=theTranslator->trFileReference(name()); startTitle(ol,getOutputFileBase(),this); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.parseText(pageTitleShort); // Html only ol.enableAll(); ol.disable(OutputGenerator::Html); ol.parseText(pageTitle); // other output formats ol.popGeneratorState(); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),title); } else { startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView); if (!generateTreeView) { ol.endQuickIndices(); } startTitle(ol,getOutputFileBase(),this); ol.parseText(pageTitle); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),title); } ol.startContents(); if (!fileVersion.isEmpty()) { ol.disableAllBut(OutputGenerator::Html); ol.startProjectNumber(); ol.docify(versionTitle); ol.endProjectNumber(); ol.enableAll(); } if (Doxygen::searchIndex) { Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); Doxygen::searchIndex->addWord(localName(),TRUE); } if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <compound kind=\"file\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl; } //---------------------------------------- start flexible part ------------------------------- QListIterator<LayoutDocEntry> eli( LayoutDocManager::instance().docEntries(LayoutDocManager::File)); LayoutDocEntry *lde; for (eli.toFirst();(lde=eli.current());++eli) { switch (lde->kind()) { case LayoutDocEntry::BriefDesc: writeBriefDescription(ol); break; case LayoutDocEntry::MemberDeclStart: startMemberDeclarations(ol); break; case LayoutDocEntry::FileIncludes: writeIncludeFiles(ol); break; case LayoutDocEntry::FileIncludeGraph: writeIncludeGraph(ol); break; case LayoutDocEntry::FileIncludedByGraph: writeIncludedByGraph(ol); break; case LayoutDocEntry::FileSourceLink: writeSourceLink(ol); break; case LayoutDocEntry::FileClasses: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeClassDeclarations(ol,ls->title); } break; case LayoutDocEntry::FileNamespaces: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeNamespaceDeclarations(ol,ls->title); } break; case LayoutDocEntry::MemberGroups: writeMemberGroups(ol); break; case LayoutDocEntry::MemberDecl: { LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; writeMemberDeclarations(ol,lmd->type,lmd->title); } break; case LayoutDocEntry::MemberDeclEnd: endMemberDeclarations(ol); break; case LayoutDocEntry::DetailedDesc: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDetailedDescription(ol,ls->title); } break; case LayoutDocEntry::MemberDefStart: startMemberDocumentation(ol); break; case LayoutDocEntry::FileInlineClasses: writeInlineClasses(ol); break; case LayoutDocEntry::MemberDef: { LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde; writeMemberDocumentation(ol,lmd->type,lmd->title); } break; case LayoutDocEntry::MemberDefEnd: endMemberDocumentation(ol); break; case LayoutDocEntry::AuthorSection: writeAuthorSection(ol); break; case LayoutDocEntry::ClassIncludes: case LayoutDocEntry::ClassInheritanceGraph: case LayoutDocEntry::ClassNestedClasses: case LayoutDocEntry::ClassCollaborationGraph: case LayoutDocEntry::ClassAllMembersLink: case LayoutDocEntry::ClassUsedFiles: case LayoutDocEntry::ClassInlineClasses: case LayoutDocEntry::NamespaceNestedNamespaces: case LayoutDocEntry::NamespaceClasses: case LayoutDocEntry::NamespaceInlineClasses: case LayoutDocEntry::GroupClasses: case LayoutDocEntry::GroupInlineClasses: case LayoutDocEntry::GroupNamespaces: case LayoutDocEntry::GroupDirs: case LayoutDocEntry::GroupNestedGroups: case LayoutDocEntry::GroupFiles: case LayoutDocEntry::GroupGraph: case LayoutDocEntry::GroupPageDocs: case LayoutDocEntry::DirSubDirs: case LayoutDocEntry::DirFiles: case LayoutDocEntry::DirGraph: err("Internal inconsistency: member %d should not be part of " "LayoutDocManager::File entry list\n",lde->kind()); break; } } //---------------------------------------- end flexible part ------------------------------- if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } ol.endContents(); if (generateTreeView) { writeNavigationPath(ol); } endFile(ol,TRUE); if (Config_getBool("SEPARATE_MEMBER_PAGES")) { MemberList *ml = getMemberList(MemberList::allMembersList); if (ml) ml->sort(); writeMemberPages(ol); } }
/*! Write a source listing of this file to the output */ void FileDef::writeSource(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); QCString title = docname; if (!fileVersion.isEmpty()) { title+=(" ("+fileVersion+")"); } QCString pageTitle = theTranslator->trSourceFile(title); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::RTF); if (!latexSourceCode) ol.disable(OutputGenerator::Latex); if (Config_getBool("SHOW_DIRECTORIES") && getDirDef()) { startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible, !generateTreeView,getOutputFileBase()); if (!generateTreeView) { getDirDef()->writeNavigationPath(ol); ol.endQuickIndices(); } startTitle(ol,getOutputFileBase()); ol.parseText(name()); endTitle(ol,getOutputFileBase(),title); } else { startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible, !generateTreeView,getOutputFileBase()); startTitle(ol,getSourceFileBase()); ol.parseText(title); endTitle(ol,getSourceFileBase(),0); } ol.startContents(); if (isLinkable()) { if (latexSourceCode) ol.disable(OutputGenerator::Latex); ol.startTextLink(getOutputFileBase(),0); ol.parseText(theTranslator->trGotoDocumentation()); ol.endTextLink(); if (latexSourceCode) ol.enable(OutputGenerator::Latex); } ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension()); pIntf->resetCodeParserState(); ol.startCodeFragment(); pIntf->parseCode(ol,0, fileToString(absFilePath(),filterSourceFiles,TRUE), FALSE,0,this ); ol.endCodeFragment(); ol.endContents(); if (generateTreeView) { writeNavigationPath(ol); endFile(ol,TRUE); } else { endFile(ol); } ol.enableAll(); }
void GroupDef::writeDocumentation(OutputList &ol) { ol.pushGeneratorState(); startFile(ol,getOutputFileBase(),name(),title); startTitle(ol,getOutputFileBase()); ol.parseText(title); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),title); if (Config_getBool("SEARCHENGINE")) { Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase()); static QRegExp we("[a-zA-Z_][a-zA-Z_0-9]*"); int i=0,p=0,l=0; while ((i=we.match(title,p,&l))!=-1) // foreach word in the title { Doxygen::searchIndex->addWord(title.mid(i,l),TRUE); p=i+l; } } if (Config_getBool("HAVE_DOT") && Config_getBool("GROUP_GRAPHS") ) { DotGroupCollaboration graph(this); if (!graph.isTrivial()) { msg("Generating dependency graph for group %s\n",qualifiedName().data()); ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.newParagraph(); ol.startGroupCollaboration(); ol.parseText(theTranslator->trCollaborationDiagram(title)); ol.endGroupCollaboration(graph); ol.popGeneratorState(); } } if (Config_getBool("DETAILS_AT_TOP")) { writeDetailedDocumentation(ol); ol.newParagraph(); } else if (!briefDescription().isEmpty()) { ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE); ol.writeString(" \n"); ol.pushGeneratorState(); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); ol.startTextLink(0,"_details"); ol.parseText(theTranslator->trMore()); ol.endTextLink(); ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.newParagraph(); ol.popGeneratorState(); } if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <compound kind=\"group\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <title>" << convertToXML(title) << "</title>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; } ol.startMemberSections(); // write list of files if (fileList->count()>0) { ol.startMemberHeader(); ol.parseText(theTranslator->trFile(TRUE,FALSE)); ol.endMemberHeader(); ol.startMemberList(); FileDef *fd=fileList->first(); while (fd) { ol.startMemberItem(0); ol.docify(theTranslator->trFile(FALSE,TRUE)+" "); ol.insertMemberAlign(); ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; } ol.endMemberItem(); if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); ol.newParagraph(); } fd=fileList->next(); } ol.endMemberList(); } // write list of namespaces namespaceSDict->writeDeclaration(ol); // write list of groups if (groupList->count()>0) { ol.startMemberHeader(); ol.parseText(theTranslator->trModules()); ol.endMemberHeader(); ol.startMemberList(); GroupDef *gd=groupList->first(); while (gd) { ol.startMemberItem(0); //ol.docify(theTranslator->trGroup(FALSE,TRUE)); //ol.docify(" "); ol.insertMemberAlign(); ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle()); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl; } ol.endMemberItem(); if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); ol.newParagraph(); } gd=groupList->next(); } ol.endMemberList(); } // write list of directories if (dirList->count()>0) { ol.startMemberHeader(); ol.parseText(theTranslator->trDirectories()); ol.endMemberHeader(); ol.startMemberList(); DirDef *dd=dirList->first(); while (dd) { ol.startMemberItem(0); ol.parseText(theTranslator->trDir(FALSE,TRUE)); ol.insertMemberAlign(); ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName()); ol.endMemberItem(); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl; } if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); ol.newParagraph(); } dd=dirList->next(); } ol.endMemberList(); } // write list of classes classSDict->writeDeclaration(ol); // write list of members if (allMemberList->count()>0) { /* write user defined member groups */ MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroup *mg; for (; (mg=mgli.current()); ++mgli) { mg->writeDeclarations(ol,0,0,0,this); } //allMemberList->writeDeclarations(ol,0,0,0,this,0,0); decDefineMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trDefines(),0); decProtoMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trFuncProtos(),0); decTypedefMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trTypedefs(),0); decEnumMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trEnumerations(),0); decFuncMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trFunctions(),0); decVarMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trVariables(),0); } ol.endMemberSections(); if (!Config_getBool("DETAILS_AT_TOP")) { writeDetailedDocumentation(ol); } PageDef *pd=0; PageSDict::Iterator pdi(*pageDict); for (pdi.toFirst(); (pd=pdi.current()); ++pdi) { if (!pd->isReference()) { QCString pageName = pd->getOutputFileBase(); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl; } SectionInfo *si=0; if (!pd->title().isEmpty() && !pd->name().isEmpty() && (si=Doxygen::sectionDict[pd->name()])!=0) { ol.startSection(si->label,si->title,SectionInfo::Subsection); ol.docify(si->title); ol.endSection(si->label,SectionInfo::Subsection); } ol.startTextBlock(); ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation(),TRUE,FALSE); ol.endTextBlock(); } } writeMemberDocumentation(ol); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } endFile(ol); ol.popGeneratorState(); if (Config_getBool("SEPARATE_MEMBER_PAGES")) { allMemberList->sort(); writeMemberPages(ol); } }
void DirDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); ol.pushGeneratorState(); QCString title=theTranslator->trDirReference(m_dispName); startFile(ol,getOutputFileBase(),name(),title,HLI_Files,!generateTreeView); if (!generateTreeView) { // write navigation path writeNavigationPath(ol); ol.endQuickIndices(); } startTitle(ol,getOutputFileBase()); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.parseText(shortTitle()); ol.enableAll(); ol.disable(OutputGenerator::Html); ol.parseText(title); ol.popGeneratorState(); endTitle(ol,getOutputFileBase(),title); ol.startContents(); //---------------------------------------- start flexible part ------------------------------- SrcLangExt lang = getLanguage(); QListIterator<LayoutDocEntry> eli( LayoutDocManager::instance().docEntries(LayoutDocManager::Directory)); LayoutDocEntry *lde; for (eli.toFirst();(lde=eli.current());++eli) { switch (lde->kind()) { case LayoutDocEntry::BriefDesc: writeBriefDescription(ol); break; case LayoutDocEntry::DirGraph: writeDirectoryGraph(ol); break; case LayoutDocEntry::MemberDeclStart: startMemberDeclarations(ol); break; case LayoutDocEntry::DirSubDirs: writeSubDirList(ol); break; case LayoutDocEntry::DirFiles: writeFileList(ol); break; case LayoutDocEntry::MemberDeclEnd: endMemberDeclarations(ol); break; case LayoutDocEntry::DetailedDesc: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDetailedDescription(ol,ls->title(lang)); } break; case LayoutDocEntry::ClassIncludes: case LayoutDocEntry::ClassInlineClasses: case LayoutDocEntry::ClassInheritanceGraph: case LayoutDocEntry::ClassNestedClasses: case LayoutDocEntry::ClassCollaborationGraph: case LayoutDocEntry::ClassAllMembersLink: case LayoutDocEntry::ClassUsedFiles: case LayoutDocEntry::NamespaceNestedNamespaces: case LayoutDocEntry::NamespaceNestedConstantGroups: case LayoutDocEntry::NamespaceClasses: case LayoutDocEntry::NamespaceInlineClasses: case LayoutDocEntry::FileClasses: case LayoutDocEntry::FileNamespaces: case LayoutDocEntry::FileConstantGroups: case LayoutDocEntry::FileIncludes: case LayoutDocEntry::FileIncludeGraph: case LayoutDocEntry::FileIncludedByGraph: case LayoutDocEntry::FileSourceLink: case LayoutDocEntry::FileInlineClasses: case LayoutDocEntry::GroupClasses: case LayoutDocEntry::GroupInlineClasses: case LayoutDocEntry::GroupNamespaces: case LayoutDocEntry::GroupDirs: case LayoutDocEntry::GroupNestedGroups: case LayoutDocEntry::GroupFiles: case LayoutDocEntry::GroupGraph: case LayoutDocEntry::GroupPageDocs: case LayoutDocEntry::AuthorSection: case LayoutDocEntry::MemberGroups: case LayoutDocEntry::MemberDecl: case LayoutDocEntry::MemberDef: case LayoutDocEntry::MemberDefStart: case LayoutDocEntry::MemberDefEnd: err("Internal inconsistency: member %d should not be part of " "LayoutDocManager::Directory entry list\n",lde->kind()); break; } } //---------------------------------------- end flexible part ------------------------------- ol.endContents(); endFileWithNavPath(this,ol); ol.popGeneratorState(); }
void PageDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); //outputList->disable(OutputGenerator::Man); QCString pageName,manPageName; pageName = escapeCharsInString(name(),FALSE,TRUE); manPageName = escapeCharsInString(name(),TRUE,TRUE); //printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data()); ol.pushGeneratorState(); //1.{ if (m_nestingLevel>0 //&& // a sub page //(Doxygen::mainPage==0 || getOuterScope()!=Doxygen::mainPage) // and not a subpage of the mainpage ) { // do not generate sub page output for RTF and LaTeX, as these are // part of their parent page ol.disableAll(); ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Html); } ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); startFile(ol,getOutputFileBase(),manPageName,title(),HLI_Pages,!generateTreeView); ol.enableAll(); ol.disable(OutputGenerator::Man); startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView); ol.popGeneratorState(); //2.} if (!generateTreeView) { if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX)) { getOuterScope()->writeNavigationPath(ol); } ol.endQuickIndices(); } SectionInfo *si=Doxygen::sectionDict->find(name()); // save old generator state and write title only to Man generator ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); ol.startTitleHead(manPageName); ol.endTitleHead(manPageName, manPageName); if (si) { ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); ol.endSection(si->label,si->type); } ol.popGeneratorState(); //2.} // for Latex the section is already generated as a chapter in the index! ol.pushGeneratorState(); //2.{ ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!title().isEmpty() && !name().isEmpty() && si!=0) { //ol.startSection(si->label,si->title,si->type); startTitle(ol,getOutputFileBase(),this); ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); //stringToSearchIndex(getOutputFileBase(), // theTranslator->trPage(TRUE,TRUE)+" "+si->title, // si->title); //ol.endSection(si->label,si->type); endTitle(ol,getOutputFileBase(),name()); } ol.startContents(); ol.popGeneratorState(); //2.} if (m_showToc && hasSections()) { writeToc(ol); } writeGeneratedFromFile(ol, this->getDefFileName()); writePageDocumentation(ol); if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX)) { ol.endContents(); endFileWithNavPath(getOuterScope(),ol); } else { endFile(ol); } ol.popGeneratorState(); //1.} Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title())); }
void PageDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); //outputList->disable(OutputGenerator::Man); QCString pageName,manPageName; pageName = escapeCharsInString(name(),FALSE,TRUE); manPageName = escapeCharsInString(name(),TRUE,TRUE); //printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data()); ol.pushGeneratorState(); //1.{ if (m_nestingLevel>0 //&& // a sub page //(Doxygen::mainPage==0 || getOuterScope()!=Doxygen::mainPage) // and not a subpage of the mainpage ) { // do not generate sub page output for RTF and LaTeX, as these are // part of their parent page ol.disableAll(); ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Html); } ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); startFile(ol,getOutputFileBase(),manPageName,title(),HLI_Pages,!generateTreeView); ol.enableAll(); ol.disable(OutputGenerator::Man); startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView); ol.popGeneratorState(); //2.} if (!generateTreeView) { if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX")) { getOuterScope()->writeNavigationPath(ol); } ol.endQuickIndices(); } SectionInfo *si=Doxygen::sectionDict->find(name()); // save old generator state and write title only to Man generator ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); ol.startTitleHead(manPageName); ol.endTitleHead(manPageName, manPageName); if (si) { ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); ol.endSection(si->label,si->type); } ol.popGeneratorState(); //2.} // for Latex the section is already generated as a chapter in the index! ol.pushGeneratorState(); //2.{ ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!title().isEmpty() && !name().isEmpty() && si!=0) { //ol.startSection(si->label,si->title,si->type); startTitle(ol,getOutputFileBase(),this); ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); //stringToSearchIndex(getOutputFileBase(), // theTranslator->trPage(TRUE,TRUE)+" "+si->title, // si->title); //ol.endSection(si->label,si->type); endTitle(ol,getOutputFileBase(),name()); } ol.startContents(); ol.popGeneratorState(); //2.} if (m_showToc && hasSections()) { writeToc(ol); } writePageDocumentation(ol); if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX")) { ol.endContents(); endFileWithNavPath(getOuterScope(),ol); } else { endFile(ol); } ol.popGeneratorState(); //1.} if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { bool found = name()=="citelist"; QDictIterator<RefList> rli(*Doxygen::xrefLists); RefList *rl; for (rli.toFirst();(rl=rli.current()) && !found;++rli) { if (rl->listName()==name()) { found=TRUE; break; } } if (!found) // not one of the generated related pages { Doxygen::tagFile << " <compound kind=\"page\">" << endl; Doxygen::tagFile << " <name>" << name() << "</name>" << endl; Doxygen::tagFile << " <title>" << convertToXML(title()) << "</title>" << endl; Doxygen::tagFile << " <filename>" << getOutputFileBase() << "</filename>" << endl; writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } } Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title())); }
void NamespaceDef::writeDocumentation(OutputList &ol) { QCString pageTitle; if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) { pageTitle = theTranslator->trPackage(displayName()); } else { pageTitle = theTranslator->trNamespaceReference(displayName()); } startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_NamespaceVisible); if (getOuterScope()!=Doxygen::globalScope) { writeNavigationPath(ol); } startTitle(ol,getOutputFileBase()); ol.parseText(pageTitle); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),displayName()); if (Config_getBool("SEARCHENGINE")) { Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); Doxygen::searchIndex->addWord(localName(),TRUE); } if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <compound kind=\"namespace\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; } ol.startTextBlock(); if (Config_getBool("DETAILS_AT_TOP")) { writeDetailedDocumentation(ol); ol.newParagraph(); } else if (!briefDescription().isEmpty()) { ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE); ol.writeString(" \n"); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.startTextLink(0,"_details"); ol.parseText(theTranslator->trMore()); ol.endTextLink(); ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.newParagraph(); ol.popGeneratorState(); } ol.disable(OutputGenerator::Man); ol.newParagraph(); ol.enable(OutputGenerator::Man); ol.writeSynopsis(); ol.endTextBlock(); ol.startMemberSections(); classSDict->writeDeclaration(ol,0,0,TRUE); namespaceSDict->writeDeclaration(ol,TRUE); /* write user defined member groups */ MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroup *mg; for (;(mg=mgli.current());++mgli) { mg->writeDeclarations(ol,0,this,0,0); } //allMemberList.writeDeclarations(ol,0,this,0,0,0,0); decDefineMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trDefines(),0); decProtoMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trFuncProtos(),0); decTypedefMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trTypedefs(),0); decEnumMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trEnumerations(),0); decFuncMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trFunctions(),0); decVarMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trVariables(),0); ol.endMemberSections(); if (!Config_getBool("DETAILS_AT_TOP")) { writeDetailedDocumentation(ol); } writeMemberDocumentation(ol); // write Author section (Man only) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.startGroupHeader(); ol.parseText(theTranslator->trAuthor(TRUE,TRUE)); ol.endGroupHeader(); ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } ol.popGeneratorState(); endFile(ol); if (Config_getBool("SEPARATE_MEMBER_PAGES")) { allMemberList.sort(); writeMemberPages(ol); } }
/*! Write a reference to the source code defining this definition */ void Definition::writeSourceDef(OutputList &ol,const char *) { static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); makeResident(); ol.pushGeneratorState(); //printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef); if (sourceBrowser && m_impl->body && m_impl->body->startLine!=-1 && m_impl->body->fileDef) { QCString refText = theTranslator->trDefinedAtLineInSourceFile(); int lineMarkerPos = refText.find("@0"); int fileMarkerPos = refText.find("@1"); if (lineMarkerPos!=-1 && fileMarkerPos!=-1) // should always pass this. { QCString lineStr,anchorStr; lineStr.sprintf("%d",m_impl->body->startLine); anchorStr.sprintf(Htags::useHtags ? "L%d" : "l%05d",m_impl->body->startLine); ol.startParagraph(); if (lineMarkerPos<fileMarkerPos) // line marker before file marker { // write text left from linePos marker ol.parseText(refText.left(lineMarkerPos)); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!latexSourceCode) { ol.disable(OutputGenerator::Latex); } // write line link (HTML, LaTeX optionally) ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), anchorStr,lineStr); ol.enableAll(); ol.disable(OutputGenerator::Html); if (latexSourceCode) { ol.disable(OutputGenerator::Latex); } // write normal text (Man/RTF, Latex optionally) ol.docify(lineStr); ol.popGeneratorState(); // write text between markers ol.parseText(refText.mid(lineMarkerPos+2, fileMarkerPos-lineMarkerPos-2)); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!latexSourceCode) { ol.disable(OutputGenerator::Latex); } // write line link (HTML, LaTeX optionally) ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), 0,m_impl->body->fileDef->name()); ol.enableAll(); ol.disable(OutputGenerator::Html); if (latexSourceCode) { ol.disable(OutputGenerator::Latex); } // write normal text (Man/RTF, Latex optionally) ol.docify(m_impl->body->fileDef->name()); ol.popGeneratorState(); // write text right from file marker ol.parseText(refText.right( refText.length()-fileMarkerPos-2)); } else // file marker before line marker { // write text left from file marker ol.parseText(refText.left(fileMarkerPos)); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!latexSourceCode) { ol.disable(OutputGenerator::Latex); } // write file link (HTML only) ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), 0,m_impl->body->fileDef->name()); ol.enableAll(); ol.disable(OutputGenerator::Html); if (latexSourceCode) { ol.disable(OutputGenerator::Latex); } // write normal text (Latex/Man only) ol.docify(m_impl->body->fileDef->name()); ol.popGeneratorState(); // write text between markers ol.parseText(refText.mid(fileMarkerPos+2, lineMarkerPos-fileMarkerPos-2)); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!latexSourceCode) { ol.disable(OutputGenerator::Latex); } ol.disableAllBut(OutputGenerator::Html); // write line link (HTML only) ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), anchorStr,lineStr); ol.enableAll(); ol.disable(OutputGenerator::Html); if (latexSourceCode) { ol.disable(OutputGenerator::Latex); } // write normal text (Latex/Man only) ol.docify(lineStr); ol.popGeneratorState(); // write text right from linePos marker ol.parseText(refText.right( refText.length()-lineMarkerPos-2)); } ol.endParagraph(); } else { err("error: translation error: invalid markers in trDefinedInSourceFile()\n"); } } ol.popGeneratorState(); }
/*! Write a reference to the source code fragments in which this * definition is used. */ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, const QCString &text,MemberSDict *members,bool /*funcOnly*/) { static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); static bool refLinkSource = Config_getBool("REFERENCES_LINK_SOURCE"); ol.pushGeneratorState(); if (members) { ol.startParagraph(); ol.parseText(text); ol.docify(" "); QCString ldefLine=theTranslator->trWriteList(members->count()); QRegExp marker("@[0-9]+"); int index=0,newIndex,matchLen; // now replace all markers in inheritLine with links to the classes while ((newIndex=marker.match(ldefLine,index,&matchLen))!=-1) { bool ok; ol.parseText(ldefLine.mid(index,newIndex-index)); uint entryIndex = ldefLine.mid(newIndex+1,matchLen-1).toUInt(&ok); MemberDef *md=members->at(entryIndex); if (ok && md) { QCString scope=md->getScopeString(); QCString name=md->name(); //printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),scope.data(),scopeName); if (!scope.isEmpty() && scope!=scopeName) { if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) { name.prepend(scope+"."); } else { name.prepend(scope+"::"); } } if (!md->isObjCMethod() && (md->isFunction() || md->isSlot() || md->isPrototype() || md->isSignal() ) ) { name+="()"; } //Definition *d = md->getOutputFileBase(); //if (d==Doxygen::globalScope) d=md->getBodyDef(); if (sourceBrowser && !(md->isLinkable() && !refLinkSource) && md->getStartBodyLine()!=-1 && md->getBodyDef() ) { //printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope); // for HTML write a real link ol.pushGeneratorState(); //ol.disableAllBut(OutputGenerator::Html); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!latexSourceCode) { ol.disable(OutputGenerator::Latex); } QCString lineStr,anchorStr; anchorStr.sprintf("l%05d",md->getStartBodyLine()); //printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data()); ol.writeObjectLink(0,md->getBodyDef()->getSourceFileBase(),anchorStr,name); ol.popGeneratorState(); // for the other output formats just mention the name ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); if (latexSourceCode) { ol.disable(OutputGenerator::Latex); } ol.docify(name); ol.popGeneratorState(); } else if (md->isLinkable() /*&& d && d->isLinkable()*/) { // for HTML write a real link ol.pushGeneratorState(); //ol.disableAllBut(OutputGenerator::Html); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!latexSourceCode) { ol.disable(OutputGenerator::Latex); } ol.writeObjectLink(md->getReference(), md->getOutputFileBase(), md->anchor(),name); ol.popGeneratorState(); // for the other output formats just mention the name ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); if (latexSourceCode) { ol.disable(OutputGenerator::Latex); } ol.docify(name); ol.popGeneratorState(); } else { ol.docify(name); } } index=newIndex+matchLen; } ol.parseText(ldefLine.right(ldefLine.length()-index)); ol.writeString("."); ol.endParagraph(); } ol.popGeneratorState(); }
void GroupDef::writeDocumentation(OutputList &ol) { //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); ol.pushGeneratorState(); startFile(ol,getOutputFileBase(),name(),title,HLI_None); ol.startHeaderSection(); writeSummaryLinks(ol); ol.startTitleHead(getOutputFileBase()); ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.parseText(title); ol.popGeneratorState(); ol.endTitleHead(getOutputFileBase(),title); addGroupListToTitle(ol,this); ol.endHeaderSection(); ol.startContents(); if (Doxygen::searchIndex) { Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase()); static QRegExp we("[a-zA-Z_][-a-zA-Z_0-9]*"); int i=0,p=0,l=0; while ((i=we.match(title,p,&l))!=-1) // foreach word in the title { Doxygen::searchIndex->addWord(title.mid(i,l),TRUE); p=i+l; } } Doxygen::indexList.addIndexItem(this,0,title); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <compound kind=\"group\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <title>" << convertToXML(title) << "</title>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; } //---------------------------------------- start flexible part ------------------------------- QListIterator<LayoutDocEntry> eli( LayoutDocManager::instance().docEntries(LayoutDocManager::Group)); LayoutDocEntry *lde; for (eli.toFirst();(lde=eli.current());++eli) { switch (lde->kind()) { case LayoutDocEntry::BriefDesc: writeBriefDescription(ol); break; case LayoutDocEntry::MemberDeclStart: startMemberDeclarations(ol); break; case LayoutDocEntry::GroupClasses: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeClasses(ol,ls->title); } break; case LayoutDocEntry::GroupInlineClasses: { writeInlineClasses(ol); } break; case LayoutDocEntry::GroupNamespaces: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeNamespaces(ol,ls->title); } break; case LayoutDocEntry::MemberGroups: writeMemberGroups(ol); break; case LayoutDocEntry::MemberDecl: { LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; writeMemberDeclarations(ol,lmd->type,lmd->title); } break; case LayoutDocEntry::MemberDeclEnd: endMemberDeclarations(ol); break; case LayoutDocEntry::DetailedDesc: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDetailedDescription(ol,ls->title); } break; case LayoutDocEntry::MemberDefStart: startMemberDocumentation(ol); break; case LayoutDocEntry::MemberDef: { LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde; writeMemberDocumentation(ol,lmd->type,lmd->title); } break; case LayoutDocEntry::MemberDefEnd: endMemberDocumentation(ol); break; case LayoutDocEntry::GroupNestedGroups: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeNestedGroups(ol,ls->title); } break; case LayoutDocEntry::GroupPageDocs: writePageDocumentation(ol); break; case LayoutDocEntry::GroupDirs: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDirs(ol,ls->title); } break; case LayoutDocEntry::GroupFiles: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeFiles(ol,ls->title); } break; case LayoutDocEntry::GroupGraph: writeGroupGraph(ol); break; case LayoutDocEntry::AuthorSection: writeAuthorSection(ol); break; case LayoutDocEntry::ClassIncludes: case LayoutDocEntry::ClassInheritanceGraph: case LayoutDocEntry::ClassNestedClasses: case LayoutDocEntry::ClassCollaborationGraph: case LayoutDocEntry::ClassAllMembersLink: case LayoutDocEntry::ClassUsedFiles: case LayoutDocEntry::ClassInlineClasses: case LayoutDocEntry::NamespaceNestedNamespaces: case LayoutDocEntry::NamespaceClasses: case LayoutDocEntry::NamespaceInlineClasses: case LayoutDocEntry::FileClasses: case LayoutDocEntry::FileNamespaces: case LayoutDocEntry::FileIncludes: case LayoutDocEntry::FileIncludeGraph: case LayoutDocEntry::FileIncludedByGraph: case LayoutDocEntry::FileSourceLink: case LayoutDocEntry::FileInlineClasses: case LayoutDocEntry::DirSubDirs: case LayoutDocEntry::DirFiles: case LayoutDocEntry::DirGraph: err("Internal inconsistency: member %d should not be part of " "LayoutDocManager::Group entry list\n",lde->kind()); break; } } //---------------------------------------- end flexible part ------------------------------- endFile(ol); ol.popGeneratorState(); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } if (Config_getBool("SEPARATE_MEMBER_PAGES")) { allMemberList->sort(); writeMemberPages(ol); } }
void VerilogDocGen::writeVerilogDeclarations(MemberDef* mdef,OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, bool inGroup) { static bool bComp=false; //LockingPtr<MemberDef> lock(mdef,mdef); Definition *d=0; // ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something //static_cast<VPreProcImp*>(m_opaquep); if (cd) d=cd; else if (nd) d=(Definition*)nd; else if (fd) d=fd; else if (gd) d=(Definition*)gd; else d=(Definition*)mdef; //if (cd) d=cd; // write tag file information of this member int memType=mdef->getMemberSpecifiers(); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <member kind=\""; Doxygen::tagFile << VerilogDocGen::convertTypeToString(memType); Doxygen::tagFile << "\">" << endl; Doxygen::tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl; Doxygen::tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl; Doxygen::tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl; Doxygen::tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl; if(memType==VerilogDocGen::FUNCTION) Doxygen::tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),true)) << "</arglist>" << endl; else if(memType==VerilogDocGen::ALWAYS) Doxygen::tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),false)) << "</arglist>" << endl; else{ Doxygen::tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl; Doxygen::tagFile << " <arglist>" << convertToXML(mdef->typeString()) << "</arglist>" << endl; } mdef->writeDocAnchorsToTagFile(); Doxygen::tagFile << " </member>" << endl; } // write search index info if (Doxygen::searchIndex) { Doxygen::searchIndex->setCurrentDoc(mdef,mdef->anchor(),FALSE); Doxygen::searchIndex->addWord(mdef->localName(),TRUE); Doxygen::searchIndex->addWord(mdef->qualifiedName(),FALSE); } QCString cname = d->name(); QCString cfname = mdef->getOutputFileBase(); // HtmlHelp *htmlHelp=0; // bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); // if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); // search for the last anonymous scope in the member type // ClassDef *annoClassDef=mdef->getClassDefOfAnonymousType(); // start a new member declaration // bool isAnonymous = annoClassDef; // || m_impl->annMemb || m_impl->annEnumType; ///printf("startMemberItem for %s\n",name().data()); // if(mdef->getMemberSpecifiers()==VerilogDocGen::FEATURE) // ol.startMemberItem(mdef->anchor(),3); //? 1 : m_impl->tArgList ? 3 : 0); // else ol.startMemberItem(mdef->anchor(), 0);// ? 1 : m_impl->tArgList ? 3 : 0); // If there is no detailed description we need to write the anchor here. bool detailsVisible = mdef->isDetailedSectionLinkable(); if (!detailsVisible) // && !m_impl->annMemb) { QCString doxyName=mdef->name().copy(); if (!cname.isEmpty()) doxyName.prepend(cname+"::"); QCString doxyArgs=mdef->argsString(); ol.startDoxyAnchor(cfname,cname,mdef->anchor(),doxyName,doxyArgs); ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Latex); ol.docify("\n"); ol.popGeneratorState(); } // *** write type /*Verilog CHANGE */ VerilogDocGen::adjustMemberName(mdef); QCString ltype(mdef->typeString()); QCString largs(mdef->argsString()); int mm=mdef->getMemberSpecifiers(); ClassDef *kl=NULL; FileDef *fdd=NULL; ArgumentList *alp = mdef->argumentList(); QCString nn; if(gd)gd=NULL; switch(mm) { case VhdlDocGen::MISCELLANEOUS: VhdlDocGen::writeSource(mdef,ol,nn); break; case VhdlDocGen::UCF_CONST: mm=mdef->name().findRev('_'); if(mm>0) mdef->setName(mdef->name().left(mm)); writeUCFLink(mdef,ol); break; case VerilogDocGen::INCLUDE: bool ambig; largs=mdef->name(); fdd=findFileDef(Doxygen::inputNameDict,largs.data(),ambig); if(fdd){ QCString fbb=fdd->getFileBase(); fbb=fdd->getReference(); fbb= fdd->getOutputFileBase(); fbb=fdd->getSourceFileBase(); fbb=fdd->convertNameToFile(largs.data(),true); fbb=fdd->getPath(); fbb+=fdd->getOutputFileBase()+".html"; ol.writeObjectLink(fdd->getReference(), fdd->getOutputFileBase(), 0, fdd->name()); } else VhdlDocGen::formatString(largs,ol,mdef); break; case VerilogDocGen::FEATURE: parseDefineConstruct(largs,mdef,ol); break; case VerilogDocGen::MODULE: ol.startBold(); VhdlDocGen::formatString(ltype,ol,mdef); ol.endBold(); ol.insertMemberAlign(); //writeLink(mdef,ol); case VerilogDocGen::PORT: writeLink(mdef,ol); ol.insertMemberAlign(); if(largs.length()>0) VhdlDocGen::formatString(largs,ol,mdef); if(ltype.length()>0) VhdlDocGen::formatString(ltype,ol,mdef); break; case VerilogDocGen::ALWAYS: writeLink(mdef,ol); ol.insertMemberAlign(); VhdlDocGen::writeProcessProto(ol,alp,mdef); break; case VerilogDocGen::FUNCTION: case VerilogDocGen::TASK: writeLink(mdef,ol); ol.docify(" ");// need for pdf has no effect in html ol.insertMemberAlign(); if(ltype.length()>0) VhdlDocGen::formatString(ltype,ol,mdef); writeFunctionProto(ol,alp,mdef); break; case VerilogDocGen::SIGNAL: if(largs.length()>0) VhdlDocGen::formatString(largs,ol,mdef); ol.docify(" "); ol.insertMemberAlign(); writeLink(mdef,ol); ol.docify(" "); if(ltype.length()) VhdlDocGen::formatString(ltype,ol,mdef); break; case VerilogDocGen::CONFIGURATION: case VerilogDocGen::LIBRARY: writeLink(mdef,ol); break; case VerilogDocGen::INPUT: case VerilogDocGen::OUTPUT: case VerilogDocGen::INOUT: case VerilogDocGen::PARAMETER: writeLink(mdef,ol); ol.docify(" "); ol.insertMemberAlign(); if(ltype.length()>0){ VhdlDocGen::formatString(ltype,ol,mdef); ol.writeString(" "); } //ol.insertMemberAlign(); if(largs.length()>0) VhdlDocGen::formatString(largs,ol,mdef); break; case VerilogDocGen::COMPONENT: //VhdlDocGen::writeLink(mdef,ol); if(true) { nn=mdef->name(); kl=VhdlDocGen::getClass(nn); //if(kl==NULL){ ol.startBold(); QCString inst=mdef->name()+"::"+ltype; ol.writeObjectLink(mdef->getReference(), mdef->getOutputFileBase(), mdef->anchor(), inst.data()); ol.docify(" "); ol.endBold(); //} ol.insertMemberAlign(); if(kl) { nn=kl->getOutputFileBase(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.docify(" "); QCString name=VerilogDocGen::getClassTitle(kl); name=VhdlDocGen::getIndexWord(name.data(),1); // ol.insertMemberAlign(); ol.startBold(); ol.docify(name.data()); ol.endBold(); ol.startEmphasis(); ol.docify(" "); ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,mdef->name().data()); ol.endEmphasis(); ol.popGeneratorState(); } if(largs.data()) { ol.docify(" "); ol.docify(largs.data()); } } break; default: break; } bool htmlOn = ol.isEnabled(OutputGenerator::Html); if (htmlOn && !ltype.isEmpty()) { ol.disable(OutputGenerator::Html); } if (!ltype.isEmpty()) ol.docify(" "); if (htmlOn) { ol.enable(OutputGenerator::Html); } if (!detailsVisible)// && !m_impl->annMemb) { ol.endDoxyAnchor(cfname,mdef->anchor()); } //printf("endMember %s annoClassDef=%p annEnumType=%p\n", // name().data(),annoClassDef,annEnumType); ol.endMemberItem(); //fprintf(stderr,"\n%d %s",mdef->docLine,mdef->name().data()); if (!mdef->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC") /* && !annMemb */) { ol.startMemberDescription(mdef->anchor()); ol.generateDoc(mdef->briefFile(),mdef->briefLine(),mdef->getOuterScope()?mdef->getOuterScope():d,mdef,mdef->briefDescription(),TRUE,FALSE,0,TRUE,FALSE); if (detailsVisible) { ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); //ol.endEmphasis(); ol.docify(" "); if (mdef->getGroupDef()!=0 && gd==0) // forward link to the group { ol.startTextLink(mdef->getOutputFileBase(),mdef->anchor()); } else // local link { ol.startTextLink(0,mdef->anchor()); } ol.endTextLink(); //ol.startEmphasis(); ol.popGeneratorState(); } //ol.newParagraph(); ol.endMemberDescription(); // if(VhdlDocGen::isComponent(mdef)) // ol.lineBreak(); } mdef->warnIfUndocumented(); }// end writeVerilogDeclaration