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); } }
void Qhp::initialize() { /* <QtHelpProject version="1.0"> <namespace>mycompany.com.myapplication.1_0</namespace> <virtualFolder>doc</virtualFolder> <customFilter name="My Application 1.0"> <filterAttribute>myapp</filterAttribute> <filterAttribute>1.0</filterAttribute> </customFilter> <filterSection> <filterAttribute>myapp</filterAttribute> <filterAttribute>1.0</filterAttribute> .. */ QCString nameSpace = Config_getString("QHP_NAMESPACE"); QCString virtualFolder = Config_getString("QHP_VIRTUAL_FOLDER"); const char * rootAttributes[] = { "version", "1.0", 0 }; m_doc.open("QtHelpProject", rootAttributes); m_doc.openCloseContent("namespace", nameSpace); m_doc.openCloseContent("virtualFolder", virtualFolder); // Add custom filter QCString filterName = Config_getString("QHP_CUST_FILTER_NAME"); if (!filterName.isEmpty()) { const char * tagAttributes[] = { "name", filterName, 0 }; m_doc.open("customFilter", tagAttributes); QStringList customFilterAttributes = QStringList::split(' ', Config_getString("QHP_CUST_FILTER_ATTRS")); for (int i = 0; i < (int)customFilterAttributes.count(); i++) { m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]); } m_doc.close("customFilter"); } m_doc.open("filterSection"); // Add section attributes QStringList sectionFilterAttributes = QStringList::split(' ', Config_getString("QHP_SECT_FILTER_ATTRS")); if (!sectionFilterAttributes.contains(QString("doxygen"))) { sectionFilterAttributes << "doxygen"; } for (int i = 0; i < (int)sectionFilterAttributes.count(); i++) { m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i]); } m_toc.open("toc"); // Add extra root node QCString fullProjectname = getFullProjectName(); const char * const attributes[] = { "title", fullProjectname, "ref", "index.html", NULL }; m_toc.open("section", attributes); m_prevSectionLevel = 1; m_sectionLevel = 1; m_index.open("keywords"); m_files.open("files"); }
void initWarningFormat() { // int filePos = Config_getString("WARN_FORMAT").find("$file"); // int linePos = Config_getString("WARN_FORMAT").find("$line"); // int textPos = Config_getString("WARN_FORMAT").find("$text"); // // // sort items on position (there are 6 cases) // warnFormatOrder = 1; // if (filePos>linePos && filePos>textPos) // { // if (linePos>textPos) // $text,$line,$file // { // warnFormatOrder = 2; // } // else // $line,$text,$file // { // warnFormatOrder = 3; // } // } // else if (filePos<linePos && filePos<textPos) // { // if (linePos>textPos) // $file,$text,$line // { // warnFormatOrder = 4; // } // } // else if (filePos<linePos && filePos>textPos) // $text,$file,$line // { // warnFormatOrder = 5; // } // else // $line,$file,$text // { // warnFormatOrder = 6; // } // outputFormat = // substitute( // substitute( // substitute( // Config_getString("WARN_FORMAT"), // "$file","%s" // ), // "$text","%s" // ), // "$line","%d" // )+'\n'; // replace(QRegExp("\\$file"),"%s"). // replace(QRegExp("\\$text"),"%s"). // replace(QRegExp("\\$line"),"%d")+ // '\n'; outputFormat = Config_getString("WARN_FORMAT"); if (!Config_getString("WARN_LOGFILE").isEmpty()) { warnFile = portable_fopen(Config_getString("WARN_LOGFILE"),"w"); } if (!warnFile) // point it to something valid, because warn() relies on it { warnFile = stderr; } }
void RTFDocVisitor::visit(DocVerbatim *s) { if (m_hide) return; DBG_RTF("{\\comment RTFDocVisitor::visit(DocVerbatim)}\n"); QCString lang = m_langExt; if (!s->language().isEmpty()) // explicit language setting { lang = s->language(); } SrcLangExt langExt = getLanguageFromFileName(lang); switch(s->type()) { case DocVerbatim::Code: // fall though m_t << "{" << endl; m_t << "\\par" << endl; m_t << rtf_Style_Reset << getStyle("CodeExample"); Doxygen::parserManager->getParser(lang) ->parseCode(m_ci,s->context(),s->text(),langExt, s->isExample(),s->exampleFile()); //m_t << "\\par" << endl; m_t << "}" << endl; break; case DocVerbatim::Verbatim: m_t << "{" << endl; m_t << "\\par" << endl; m_t << rtf_Style_Reset << getStyle("CodeExample"); filter(s->text(),TRUE); //m_t << "\\par" << endl; m_t << "}" << endl; break; case DocVerbatim::RtfOnly: m_t << s->text(); break; case DocVerbatim::HtmlOnly: case DocVerbatim::LatexOnly: case DocVerbatim::XmlOnly: case DocVerbatim::ManOnly: case DocVerbatim::DocbookOnly: /* nothing */ break; case DocVerbatim::Dot: { static int dotindex = 1; QCString fileName(4096); fileName.sprintf("%s%d%s", (Config_getString("RTF_OUTPUT")+"/inline_dotgraph_").data(), dotindex++, ".dot" ); QFile file(fileName); if (!file.open(IO_WriteOnly)) { err("Could not open file %s for writing\n",fileName.data()); } file.writeBlock( s->text(), s->text().length() ); file.close(); m_t << "\\par{\\qc "; // center picture writeDotFile(fileName); m_t << "} "; if (Config_getBool("DOT_CLEANUP")) file.remove(); } break; case DocVerbatim::Msc: { static int mscindex = 1; QCString baseName(4096); baseName.sprintf("%s%d", (Config_getString("RTF_OUTPUT")+"/inline_mscgraph_").data(), mscindex++ ); QFile file(baseName+".msc"); if (!file.open(IO_WriteOnly)) { err("Could not open file %s for writing\n",baseName.data()); } QCString text = "msc {"; text+=s->text(); text+="}"; file.writeBlock( text, text.length() ); file.close(); m_t << "\\par{\\qc "; // center picture writeMscFile(baseName); m_t << "} "; if (Config_getBool("DOT_CLEANUP")) file.remove(); } break; } m_lastIsPara=FALSE; }
void LatexDocVisitor::visit(DocVerbatim *s) { //static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); if (m_hide) return; QCString lang = m_langExt; if (!s->language().isEmpty()) // explicit language setting { lang = s->language(); } switch(s->type()) { case DocVerbatim::Code: { m_t << "\n\\begin{DoxyCode}\n"; Doxygen::parserManager->getParser(lang) ->parseCode(m_ci,s->context(),s->text(), s->isExample(),s->exampleFile()); m_t << "\\end{DoxyCode}\n"; } break; case DocVerbatim::Verbatim: m_t << "\\begin{DoxyVerb}"; m_t << s->text(); m_t << "\\end{DoxyVerb}\n"; break; case DocVerbatim::HtmlOnly: case DocVerbatim::XmlOnly: case DocVerbatim::ManOnly: /* nothing */ break; case DocVerbatim::LatexOnly: m_t << s->text(); break; case DocVerbatim::Dot: { static int dotindex = 1; QCString fileName(4096); fileName.sprintf("%s%d%s", (Config_getString("LATEX_OUTPUT")+"/inline_dotgraph_").data(), dotindex++, ".dot" ); QFile file(fileName); if (!file.open(IO_WriteOnly)) { err("Could not open file %s for writing\n",fileName.data()); } file.writeBlock( s->text(), s->text().length() ); file.close(); m_t << "\\begin{center}\n"; startDotFile(fileName,"","",FALSE); endDotFile(FALSE); m_t << "\\end{center}\n"; if (Config_getBool("DOT_CLEANUP")) file.remove(); } break; case DocVerbatim::Msc: { static int mscindex = 1; QCString baseName(4096); baseName.sprintf("%s%d", (Config_getString("LATEX_OUTPUT")+"/inline_mscgraph_").data(), mscindex++ ); QFile file(baseName+".msc"); if (!file.open(IO_WriteOnly)) { err("Could not open file %s.msc for writing\n",baseName.data()); } QCString text = "msc {"; text+=s->text(); text+="}"; file.writeBlock( text, text.length() ); file.close(); m_t << "\\begin{center}\n"; writeMscFile(baseName); m_t << "\\end{center}\n"; if (Config_getBool("DOT_CLEANUP")) file.remove(); } break; } }
void FTVHelp::generateTreeView() { QCString fileName; QFile f; static bool searchEngine = Config_getBool("SEARCHENGINE"); static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH"); generateTreeViewImages(); fileName=Config_getString("HTML_OUTPUT")+"/index"+Doxygen::htmlFileExtension; f.setName(fileName); if (!f.open(IO_WriteOnly)) { err("Cannot open file %s for writing!\n",fileName.data()); return; } else { FTextStream t(&f); //t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n"; t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n"; t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n"; t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"; t << "<title>"; if (Config_getString("PROJECT_NAME").isEmpty()) { t << "Doxygen Documentation"; } else { t << Config_getString("PROJECT_NAME"); } t << "</title>\n</head>" << endl; t << "<frameset cols=\"" << Config_getInt("TREEVIEW_WIDTH") << ",*\">" << endl; t << " <frame src=\"tree" << Doxygen::htmlFileExtension << "\" name=\"treefrm\"/>" << endl; t << " <frame src=\"main" << Doxygen::htmlFileExtension << "\" name=\"basefrm\"/>" << endl; t << " <noframes>" << endl; t << " <body>" << endl; t << " <a href=\"main" << Doxygen::htmlFileExtension << "\">Frames are disabled. Click here to go to the main page.</a>" << endl; t << " </body>" << endl; t << " </noframes>" << endl; t << "</frameset>" << endl; t << "</html>" << endl; f.close(); } // Generate tree view fileName=Config_getString("HTML_OUTPUT")+"/tree"+Doxygen::htmlFileExtension; f.setName(fileName); if (!f.open(IO_WriteOnly)) { err("Cannot open file %s for writing!\n",fileName.data()); return; } else { FTextStream t(&f); //if (searchEngine) //{ // t << "<!-- This comment will put IE 6, 7 and 8 in quirks mode -->" << endl; //} t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n"; t << " <head>\n"; t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"; t << " <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n"; t << " <meta http-equiv=\"Content-Language\" content=\"en\" />\n"; if (searchEngine) { t << " <link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>" << endl; t << " <script type=\"text/javaScript\" src=\"search/search.js\"></script>" << endl; } t << " <link rel=\"stylesheet\" href=\""; QCString cssname=Config_getString("HTML_STYLESHEET"); if (cssname.isEmpty()) { t << "doxygen.css"; } else { QFileInfo cssfi(cssname); if (!cssfi.exists()) { err("Error: user specified HTML style sheet file does not exist!\n"); } t << cssfi.fileName(); } t << "\"/>" << endl; t << " <title>TreeView</title>\n"; generateScript(t); t << " </head>\n"; t << "\n"; t << " <body class=\"ftvtree\""; if (searchEngine && !serverBasedSearch) { t << " onload='searchBox.OnSelectItem(0);'"; } t << ">\n"; if (searchEngine) { t << " <script type=\"text/javascript\"><!--\n"; t << " var searchBox = new SearchBox(\"searchBox\", \"search\", true, '" << theTranslator->trSearch() << "');\n"; t << " --></script>\n"; if (!serverBasedSearch) { t << " <div class=\"tabsearch\">\n"; t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n"; t << " <span class=\"left\">\n"; t << " <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">" << "<img id=\"MSearchCloseImg\" border=\"0\" src=\"search/close.png\" alt=\"\"/></a>\n"; t << " <input type=\"text\" id=\"MSearchField\" value=\"" << theTranslator->trSearch() << "\" accesskey=\"S\"\n"; t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n"; t << " onblur=\"searchBox.OnSearchFieldFocus(false)\" \n"; t << " onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n"; t << " </span><span class=\"right\">\n"; t << " <img id=\"MSearchSelect\" src=\"search/mag_sel.png\"\n"; t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n"; t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n"; t << " alt=\"\"/>\n"; t << " </span>\n"; t << " </div>\n"; t << " </div>\n"; HtmlGenerator::writeSearchFooter(t,QCString()); } else { t << " <div class=\"tabsearch\">\n"; t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n"; t << " <span class=\"left\">\n"; t << " <form id=\"FSearchBox\" action=\"search.php\" method=\"get\" target=\"basefrm\">\n"; t << " <img id=\"MSearchSelect\" src=\"search/mag.png\" alt=\"\"/>\n"; t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"" << theTranslator->trSearch() << "\" size=\"20\" accesskey=\"S\" \n"; t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n"; t << " onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n"; t << " </form>\n"; t << " </span><span class=\"right\"></span>\n"; t << " </div>\n"; t << " </div>\n"; } } t << " <div class=\"directory\">\n"; t << " <h3 class=\"swap\"><span>"; QCString &projName = Config_getString("PROJECT_NAME"); if (projName.isEmpty()) { t << "Root"; } else { t << projName; } t << "</span></h3>\n"; t << " <div style=\"display: block;\">\n"; generateTree(t,m_indentNodes[0],0); t << " </div>\n"; t << " </div>\n"; t << " </body>\n"; t << "</html>\n"; f.close(); } }
void NamespaceDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); //static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); QCString pageTitle = title(); startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_NamespaceVisible,!generateTreeView); if (!generateTreeView) { if (getOuterScope()!=Doxygen::globalScope) { writeNavigationPath(ol); } ol.endQuickIndices(); } startTitle(ol,getOutputFileBase(),this); ol.parseText(pageTitle); addGroupListToTitle(ol,this); addNamespaceAttributes(ol); endTitle(ol,getOutputFileBase(),displayName()); ol.startContents(); if (Doxygen::searchIndex) { Doxygen::searchIndex->setCurrentDoc(this,anchor(),FALSE); Doxygen::searchIndex->addWord(localName(),TRUE); } bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty(); if (generateTagFile) { Doxygen::tagFile << " <compound kind=\"namespace\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; QCString idStr = id(); if (!idStr.isEmpty()) { Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl; } } Doxygen::indexList->addIndexItem(this,0); //---------------------------------------- start flexible part ------------------------------- SrcLangExt lang = getLanguage(); QListIterator<LayoutDocEntry> eli( LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace)); 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::NamespaceClasses: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeClassDeclarations(ol,ls->title(lang)); } break; case LayoutDocEntry::NamespaceNestedNamespaces: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeNamespaceDeclarations(ol,ls->title(lang),false); } break; case LayoutDocEntry::NamespaceNestedConstantGroups: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeNamespaceDeclarations(ol,ls->title(lang),true); } break; case LayoutDocEntry::MemberGroups: writeMemberGroups(ol); break; case LayoutDocEntry::MemberDecl: { LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; writeMemberDeclarations(ol,lmd->type,lmd->title(lang)); } break; case LayoutDocEntry::MemberDeclEnd: endMemberDeclarations(ol); break; case LayoutDocEntry::DetailedDesc: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDetailedDescription(ol,ls->title(lang)); } break; case LayoutDocEntry::MemberDefStart: startMemberDocumentation(ol); break; case LayoutDocEntry::NamespaceInlineClasses: writeInlineClasses(ol); break; case LayoutDocEntry::MemberDef: { LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde; writeMemberDocumentation(ol,lmd->type,lmd->title(lang)); } 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::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::DirSubDirs: case LayoutDocEntry::DirFiles: case LayoutDocEntry::DirGraph: err("Internal inconsistency: member %d should not be part of " "LayoutDocManager::Namespace entry list\n",lde->kind()); break; } } //---------------------------------------- end flexible part ------------------------------- ol.endContents(); endFileWithNavPath(this,ol); if (generateTagFile) { writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } if (Config_getBool("SEPARATE_MEMBER_PAGES")) { MemberList *allMemberList = getMemberList(MemberListType_allMembersList); if (allMemberList) allMemberList->sort(); writeMemberPages(ol); } }
void LatexDocVisitor::visit(DocVerbatim *s) { if (m_hide) return; QCString lang = m_langExt; if (!s->language().isEmpty()) // explicit language setting { lang = s->language(); } SrcLangExt langExt = getLanguageFromFileName(lang); switch(s->type()) { case DocVerbatim::Code: { m_t << "\n\\begin{DoxyCode}\n"; Doxygen::parserManager->getParser(lang) ->parseCode(m_ci,s->context(),s->text(),langExt, s->isExample(),s->exampleFile()); m_t << "\\end{DoxyCode}\n"; } break; case DocVerbatim::Verbatim: m_t << "\\begin{DoxyVerb}"; m_t << s->text(); m_t << "\\end{DoxyVerb}\n"; break; case DocVerbatim::HtmlOnly: case DocVerbatim::XmlOnly: case DocVerbatim::ManOnly: case DocVerbatim::RtfOnly: case DocVerbatim::DocbookOnly: /* nothing */ break; case DocVerbatim::LatexOnly: m_t << s->text(); break; case DocVerbatim::Dot: { static int dotindex = 1; QCString fileName(4096); fileName.sprintf("%s%d%s", (Config_getString("LATEX_OUTPUT")+"/inline_dotgraph_").data(), dotindex++, ".dot" ); QFile file(fileName); if (!file.open(IO_WriteOnly)) { err("Could not open file %s for writing\n",fileName.data()); } else { file.writeBlock( s->text(), s->text().length() ); file.close(); startDotFile(fileName,s->width(),s->height(),s->hasCaption()); visitCaption(this, s->children()); endDotFile(s->hasCaption()); if (Config_getBool("DOT_CLEANUP")) file.remove(); } } break; case DocVerbatim::Msc: { static int mscindex = 1; QCString baseName(4096); baseName.sprintf("%s%d", (Config_getString("LATEX_OUTPUT")+"/inline_mscgraph_").data(), mscindex++ ); QFile file(baseName+".msc"); if (!file.open(IO_WriteOnly)) { err("Could not open file %s.msc for writing\n",baseName.data()); } else { QCString text = "msc {"; text+=s->text(); text+="}"; file.writeBlock( text, text.length() ); file.close(); writeMscFile(baseName, s); if (Config_getBool("DOT_CLEANUP")) file.remove(); } } break; case DocVerbatim::PlantUML: { QCString latexOutput = Config_getString("LATEX_OUTPUT"); QCString baseName = writePlantUMLSource(latexOutput,s->exampleFile(),s->text()); writePlantUMLFile(baseName, s); } break; } }
void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool localName) { if (count()==0) return; // no namespaces in the list SDict<NamespaceDef>::Iterator ni(*this); NamespaceDef *nd; bool found=FALSE; for (ni.toFirst();(nd=ni.current()) && !found;++ni) { if (nd->isLinkable()) found=TRUE; } if (!found) return; // no linkable namespaces in the list // write list of namespaces ol.startMemberHeader("namespaces"); bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); #if 0 if (javaOpt) { ol.parseText(theTranslator->trPackages()); } else if (fortranOpt) { ol.parseText(theTranslator->trModules()); } else { ol.parseText(theTranslator->trNamespaces()); } #endif ol.parseText(title); ol.endMemberHeader(); ol.startMemberList(); for (ni.toFirst();(nd=ni.current());++ni) { if (nd->isLinkable()) { ol.startMemberItem(0); if (javaOpt) { ol.docify("package "); } else if (fortranOpt) { ol.docify("module "); } else { ol.docify("namespace "); } ol.insertMemberAlign(); QCString name; if (localName) { name = nd->localName(); } else { name = nd->displayName(); } ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name); if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !nd->isReference()) { Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; } ol.endMemberItem(); if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); } } } ol.endMemberList(); }
/*! This will create a contents file (index.hhc) and a index file (index.hhk) * and write the header of those files. * It also creates a project file (index.hhp) * \sa finalize() */ void HtmlHelp::initialize() { const char *str = Config_getString("CHM_INDEX_ENCODING"); if (!str) str = "CP1250"; // use safe and likely default m_fromUtf8 = portable_iconv_open(str,"UTF-8"); if (m_fromUtf8==(void *)(-1)) { err("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str); exit(1); } /* open the contents file */ QCString fName = Config_getString("HTML_OUTPUT") + "/index.hhc"; cf = new QFile(fName); if (!cf->open(IO_WriteOnly)) { err("Could not open file %s for writing\n",fName.data()); exit(1); } /* Write the header of the contents file */ cts.setDevice(cf); cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n" "<HTML><HEAD></HEAD><BODY>\n" "<OBJECT type=\"text/site properties\">\n" "<param name=\"FrameName\" value=\"right\">\n" "</OBJECT>\n" "<UL>\n"; /* open the contents file */ fName = Config_getString("HTML_OUTPUT") + "/index.hhk"; kf = new QFile(fName); if (!kf->open(IO_WriteOnly)) { err("Could not open file %s for writing\n",fName.data()); exit(1); } /* Write the header of the contents file */ kts.setDevice(kf); kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n" "<HTML><HEAD></HEAD><BODY>\n" "<OBJECT type=\"text/site properties\">\n" "<param name=\"FrameName\" value=\"right\">\n" "</OBJECT>\n" "<UL>\n"; /* language codes for Html help 0x405 Czech 0x406 Danish 0x413 Dutch 0xC09 English (Australia) 0x809 English (Britain) 0x1009 English (Canada) 0x1809 English (Ireland) 0x1409 English (New Zealand) 0x1C09 English (South Africa) 0x409 English (United States) 0x40B Finnish 0x40C French 0x407 German 0x408 Greece 0x40E Hungarian 0x410 Italian 0x814 Norwegian 0x415 Polish 0x816 Portuguese(Portugal) 0x416 Portuguese(Brazil) 0x419 Russian 0x80A Spanish(Mexico) 0xC0A Spanish(Modern Sort) 0x40A Spanish(Traditional Sort) 0x41D Swedish 0x41F Turkey 0x411 Japanese 0x412 Korean 0x804 Chinese (PRC) 0x404 Chinese (Taiwan) New LCIDs: 0x421 Indonesian 0x41A Croatian 0x418 Romanian 0x424 Slovenian 0x41B Slovak 0x422 Ukrainian 0x81A Serbian (Serbia, Latin) 0x403 Catalan 0x426 Latvian 0x427 Lithuanian 0x436 Afrikaans 0x42A Vietnamese 0x429 Persian (Iran) 0xC01 Arabic (Egypt) - I don't know which version of arabic is used inside translator_ar.h , so I have chosen Egypt at random */ s_languageDict.setAutoDelete(TRUE); s_languageDict.clear(); s_languageDict.insert("czech", new QCString("0x405 Czech")); s_languageDict.insert("danish", new QCString("0x406 Danish")); s_languageDict.insert("dutch", new QCString("0x413 Dutch")); s_languageDict.insert("finnish", new QCString("0x40B Finnish")); s_languageDict.insert("french", new QCString("0x40C French")); s_languageDict.insert("german", new QCString("0x407 German")); s_languageDict.insert("greek", new QCString("0x408 Greece")); s_languageDict.insert("hungarian", new QCString("0x40E Hungarian")); s_languageDict.insert("italian", new QCString("0x410 Italian")); s_languageDict.insert("norwegian", new QCString("0x814 Norwegian")); s_languageDict.insert("polish", new QCString("0x415 Polish")); s_languageDict.insert("portuguese", new QCString("0x816 Portuguese(Portugal)")); s_languageDict.insert("brazil", new QCString("0x416 Portuguese(Brazil)")); s_languageDict.insert("russian", new QCString("0x419 Russian")); s_languageDict.insert("spanish", new QCString("0x40A Spanish(Traditional Sort)")); s_languageDict.insert("swedish", new QCString("0x41D Swedish")); s_languageDict.insert("turkish", new QCString("0x41F Turkey")); s_languageDict.insert("japanese", new QCString("0x411 Japanese")); s_languageDict.insert("japanese-en", new QCString("0x411 Japanese")); s_languageDict.insert("korean", new QCString("0x412 Korean")); s_languageDict.insert("korean-en", new QCString("0x412 Korean")); s_languageDict.insert("chinese", new QCString("0x804 Chinese (PRC)")); s_languageDict.insert("chinese-traditional", new QCString("0x404 Chinese (Taiwan)")); // new LCIDs s_languageDict.insert("indonesian", new QCString("0x412 Indonesian")); s_languageDict.insert("croatian", new QCString("0x41A Croatian")); s_languageDict.insert("romanian", new QCString("0x418 Romanian")); s_languageDict.insert("slovene", new QCString("0x424 Slovenian")); s_languageDict.insert("slovak", new QCString("0x41B Slovak")); s_languageDict.insert("ukrainian", new QCString("0x422 Ukrainian")); s_languageDict.insert("serbian", new QCString("0x81A Serbian (Serbia, Latin)")); s_languageDict.insert("catalan", new QCString("0x403 Catalan")); s_languageDict.insert("lithuanian", new QCString("0x427 Lithuanian")); s_languageDict.insert("afrikaans", new QCString("0x436 Afrikaans")); s_languageDict.insert("vietnamese", new QCString("0x42A Vietnamese")); s_languageDict.insert("persian", new QCString("0x429 Persian (Iran)")); s_languageDict.insert("arabic", new QCString("0xC01 Arabic (Egypt)")); s_languageDict.insert("latvian", new QCString("0x426 Latvian")); }
void writeInstallScript() { QCString fileName=Config_getString("HTML_OUTPUT")+"/installdox"; QFile f(fileName); if (f.open(IO_WriteOnly)) { FTextStream t(&f); t << "#!" << Config_getString("PERL_PATH") << endl << endl << "%subst = ( "; char *s=Config_getList("TAGFILES").first(); while (s) { QCString tagLine=s; QCString fileName; int eqPos = tagLine.find('='); if (eqPos!=-1) // strip destination part { fileName = tagLine.left(eqPos).stripWhiteSpace(); } else { fileName = tagLine; } QFileInfo fi(fileName); t << "\"" << fi.fileName() << "\", \"\""; s=Config_getList("TAGFILES").next(); if (s) t << ", "; } t << ");\n"; t << "$quiet = 0;\n"; t << "\n"; t << "while ( @ARGV ) {\n"; t << " $_ = shift @ARGV;\n"; t << " if ( s/^-// ) {\n"; t << " if ( /^l(.*)/ ) {\n"; t << " $v = ($1 eq \"\") ? shift @ARGV : $1;\n"; t << " ($v =~ /\\/$/) || ($v .= \"/\");\n"; t << " $_ = $v;\n"; t << " if ( /(.+)\\@(.+)/ ) {\n"; t << " if ( exists $subst{$1} ) {\n"; t << " $subst{$1} = $2;\n"; t << " } else {\n"; t << " print STDERR \"Unknown tag file $1 given with option -l\\n\";\n"; t << " &usage();\n"; t << " }\n"; t << " } else {\n"; t << " print STDERR \"Argument $_ is invalid for option -l\\n\";\n"; t << " &usage();\n"; t << " }\n"; t << " }\n"; t << " elsif ( /^q/ ) {\n"; t << " $quiet = 1;\n"; t << " }\n"; t << " elsif ( /^\\?|^h/ ) {\n"; t << " &usage();\n"; t << " }\n"; t << " else {\n"; t << " print STDERR \"Illegal option -$_\\n\";\n"; t << " &usage();\n"; t << " }\n"; t << " }\n"; t << " else {\n"; t << " push (@files, $_ );\n"; t << " }\n"; t << "}\n"; t << "\n"; t << "foreach $sub (keys %subst)\n"; t << "{\n"; t << " if ( $subst{$sub} eq \"\" ) \n"; t << " {\n"; t << " print STDERR \"No substitute given for tag file `$sub'\\n\";\n"; t << " &usage();\n"; t << " }\n"; t << " elsif ( ! $quiet && $sub ne \"_doc\" && $sub ne \"_cgi\" )\n"; t << " {\n"; t << " print \"Substituting $subst{$sub} for each occurrence of tag file $sub\\n\"; \n"; t << " }\n"; t << "}\n"; t << "\n"; t << "if ( ! @files ) {\n"; t << " if (opendir(D,\".\")) {\n"; t << " foreach $file ( readdir(D) ) {\n"; t << " $match = \"" << Config_getString("HTML_FILE_EXTENSION") << "\";\n"; t << " next if ( $file =~ /^\\.\\.?$/ );\n"; t << " ($file =~ /$match/) && (push @files, $file);\n"; t << " ($file =~ /\\.svg/) && (push @files, $file);\n"; t << " ($file =~ \"navtree.js\") && (push @files, $file);\n"; t << " }\n"; t << " closedir(D);\n"; t << " }\n"; t << "}\n"; t << "\n"; t << "if ( ! @files ) {\n"; t << " print STDERR \"Warning: No input files given and none found!\\n\";\n"; t << "}\n"; t << "\n"; t << "foreach $f (@files)\n"; t << "{\n"; t << " if ( ! $quiet ) {\n"; t << " print \"Editing: $f...\\n\";\n"; t << " }\n"; t << " $oldf = $f;\n"; t << " $f .= \".bak\";\n"; t << " unless (rename $oldf,$f) {\n"; t << " print STDERR \"Error: cannot rename file $oldf\\n\";\n"; t << " exit 1;\n"; t << " }\n"; t << " if (open(F,\"<$f\")) {\n"; t << " unless (open(G,\">$oldf\")) {\n"; t << " print STDERR \"Error: opening file $oldf for writing\\n\";\n"; t << " exit 1;\n"; t << " }\n"; t << " if ($oldf ne \"tree.js\") {\n"; t << " while (<F>) {\n"; t << " s/doxygen\\=\\\"([^ \\\"\\:\\t\\>\\<]*)\\:([^ \\\"\\t\\>\\<]*)\\\" (xlink:href|href|src)=\\\"\\2/doxygen\\=\\\"$1:$subst{$1}\\\" \\3=\\\"$subst{$1}/g;\n"; t << " print G \"$_\";\n"; t << " }\n"; t << " }\n"; t << " else {\n"; t << " while (<F>) {\n"; t << " s/\\\"([^ \\\"\\:\\t\\>\\<]*)\\:([^ \\\"\\t\\>\\<]*)\\\", \\\"\\2/\\\"$1:$subst{$1}\\\" ,\\\"$subst{$1}/g;\n"; t << " print G \"$_\";\n"; t << " }\n"; t << " }\n"; t << " } \n"; t << " else {\n"; t << " print STDERR \"Warning file $f does not exist\\n\";\n"; t << " }\n"; t << " unlink $f;\n"; t << "}\n"; t << "\n"; t << "sub usage {\n"; t << " print STDERR \"Usage: installdox [options] [html-file [html-file ...]]\\n\";\n"; t << " print STDERR \"Options:\\n\";\n"; t << " print STDERR \" -l tagfile\\@linkName tag file + URL or directory \\n\";\n"; t << " print STDERR \" -q Quiet mode\\n\\n\";\n"; t << " exit 1;\n"; t << "}\n"; } else { err("Error: Cannot open file %s for writing\n",fileName.data()); } f.close(); struct stat stat_struct; stat(fileName,&stat_struct); #if !defined(_WIN32) chmod(fileName,stat_struct.st_mode|S_IXUSR|S_IXGRP|S_IXOTH); #endif }
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
void generateDEF() { QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); if (outputDirectory.isEmpty()) { outputDirectory=QDir::currentDirPath().utf8(); } else { QDir dir(outputDirectory); if (!dir.exists()) { dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { err("error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " "exist and cannot be created\n",outputDirectory.data()); exit(1); } else if (!Config_getBool("QUIET")) { err("notice: Output directory `%s' does not exist. " "I have created it for you.\n", outputDirectory.data()); } dir.cd(outputDirectory); } outputDirectory=dir.absPath().utf8(); } QDir dir(outputDirectory); if (!dir.exists()) { dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { err("Cannot create directory %s\n",outputDirectory.data()); return; } } QDir defDir(outputDirectory+"/def"); if (!defDir.exists() && !defDir.mkdir(outputDirectory+"/def")) { err("Could not create def directory in %s\n",outputDirectory.data()); return; } QCString fileName=outputDirectory+"/def/doxygen.def"; QFile f(fileName); if (!f.open(IO_WriteOnly)) { err("Cannot open file %s for writing!\n",fileName.data()); return; } FTextStream t(&f); t << "AutoGen Definitions dummy;" << endl; if (Doxygen::classSDict->count()+Doxygen::inputNameList->count()>0) { ClassSDict::Iterator cli(*Doxygen::classSDict); ClassDef *cd; for (cli.toFirst();(cd=cli.current());++cli) { generateDEFForClass(cd,t); } FileNameListIterator fnli(*Doxygen::inputNameList); FileName *fn; for (;(fn=fnli.current());++fnli) { FileNameIterator fni(*fn); FileDef *fd; for (;(fd=fni.current());++fni) { generateDEFForFile(fd,t); } } } else { t << "dummy_value = true;" << endl; } }
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(); addGroupListToTitle(ol,this); ol.endTitleHead(getOutputFileBase(),title); ol.endHeaderSection(); ol.startContents(); if (Doxygen::searchIndex) { Doxygen::searchIndex->setCurrentDoc(this,anchor(),FALSE); 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,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 ------------------------------- SrcLangExt lang=getLanguage(); 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(lang)); } break; case LayoutDocEntry::GroupInlineClasses: { writeInlineClasses(ol); } break; case LayoutDocEntry::GroupNamespaces: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeNamespaces(ol,ls->title(lang)); } break; case LayoutDocEntry::MemberGroups: writeMemberGroups(ol); break; case LayoutDocEntry::MemberDecl: { LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; writeMemberDeclarations(ol,lmd->type,lmd->title(lang)); } break; case LayoutDocEntry::MemberDeclEnd: endMemberDeclarations(ol); break; case LayoutDocEntry::DetailedDesc: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDetailedDescription(ol,ls->title(lang)); } break; case LayoutDocEntry::MemberDefStart: startMemberDocumentation(ol); break; case LayoutDocEntry::MemberDef: { LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde; writeMemberDocumentation(ol,lmd->type,lmd->title(lang)); } break; case LayoutDocEntry::MemberDefEnd: endMemberDocumentation(ol); break; case LayoutDocEntry::GroupNestedGroups: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeNestedGroups(ol,ls->title(lang)); } break; case LayoutDocEntry::GroupPageDocs: writePageDocumentation(ol); break; case LayoutDocEntry::GroupDirs: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeDirs(ol,ls->title(lang)); } break; case LayoutDocEntry::GroupFiles: { LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; writeFiles(ol,ls->title(lang)); } 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 DocbookDocVisitor::visit(DocVerbatim *s) { if (m_hide) return; switch(s->type()) { case DocVerbatim::Code: // fall though m_t << "<programlisting>"; Doxygen::parserManager->getParser(m_langExt) ->parseCode(m_ci,s->context(),s->text(), s->isExample(),s->exampleFile()); m_t << "</programlisting>"; break; case DocVerbatim::Verbatim: m_t << "<programlisting><literallayout>"; filter(s->text()); m_t << "</literallayout></programlisting>"; break; case DocVerbatim::HtmlOnly: break; case DocVerbatim::RtfOnly: break; case DocVerbatim::ManOnly: break; case DocVerbatim::LatexOnly: break; case DocVerbatim::XmlOnly: break; case DocVerbatim::DocbookOnly: break; m_t << s->text(); break; case DocVerbatim::Dot: { static int dotindex = 1; QCString baseName(4096); QCString stext = s->text(); m_t << "<para>" << endl; baseName.sprintf("%s%d", (Config_getString("DOCBOOK_OUTPUT")+"/inline_dotgraph_").data(), dotindex++ ); QFile file(baseName+".dot"); if (!file.open(IO_WriteOnly)) { err("Could not open file %s.msc for writing\n",baseName.data()); } file.writeBlock( stext, stext.length() ); file.close(); m_t << " <figure>" << endl; m_t << " <title></title>" << endl; m_t << " <mediaobject>" << endl; m_t << " <imageobject>" << endl; writeDotFile(baseName); m_t << " </imageobject>" << endl; m_t << " </mediaobject>" << endl; m_t << " </figure>" << endl; m_t << "</para>" << endl; } break; case DocVerbatim::Msc: static int mscindex = 1; QCString baseName(4096); QCString stext = s->text(); m_t << "<para>" << endl; baseName.sprintf("%s%d", (Config_getString("DOCBOOK_OUTPUT")+"/inline_mscgraph_").data(), mscindex++ ); QFile file(baseName+".msc"); if (!file.open(IO_WriteOnly)) { err("Could not open file %s.msc for writing\n",baseName.data()); } QCString text = "msc {"; text+=stext; text+="}"; file.writeBlock( text, text.length() ); file.close(); m_t << " <figure>" << endl; m_t << " <title></title>" << endl; m_t << " <mediaobject>" << endl; m_t << " <imageobject>" << endl; writeMscFile(baseName); m_t << " </imageobject>" << endl; m_t << " </mediaobject>" << endl; m_t << " </figure>" << endl; m_t << "</para>" << endl; break; } }
void DirDef::writeFileList(OutputList &ol) { // write file list if (m_fileList->count()>0) { ol.startMemberHeader("files"); ol.parseText(theTranslator->trFile(TRUE,FALSE)); ol.endMemberHeader(); ol.startMemberList(); FileDef *fd=m_fileList->first(); while (fd) { ol.startMemberDeclaration(); ol.startMemberItem(fd->getOutputFileBase(),0); ol.docify(theTranslator->trFile(FALSE,TRUE)+" "); ol.insertMemberAlign(); if (fd->isLinkable()) { ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); } else { ol.startBold(); ol.docify(fd->name()); ol.endBold(); } if (fd->generateSourceFile()) { ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.docify(" "); ol.startTextLink(fd->includeName(),0); ol.docify("["); ol.parseText(theTranslator->trCode()); ol.docify("]"); ol.endTextLink(); ol.popGeneratorState(); } 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(fd->getOutputFileBase()); ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(), FALSE, // indexWords FALSE, // isExample 0, // exampleName TRUE, // single line TRUE // link from index ); ol.endMemberDescription(); } ol.endMemberDeclaration(0,0); fd=m_fileList->next(); } ol.endMemberList(); } }
void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title, bool const isConstantGroup,bool localName) { if (count()==0) return; // no namespaces in the list if (Config_getBool("OPTIMIZE_OUTPUT_VHDL")) return; SDict<NamespaceDef>::Iterator ni(*this); NamespaceDef *nd; bool found=FALSE; for (ni.toFirst();(nd=ni.current()) && !found;++ni) { if (nd->isLinkable()) { SrcLangExt lang = nd->getLanguage(); if (SrcLangExt_IDL==lang) { if (isConstantGroup == nd->isConstantGroup()) { found=TRUE; break; } } else if (!isConstantGroup) // ensure we only get extra section in IDL { if (nd->isConstantGroup()) { err("Internal inconsistency: constant group but not IDL?\n"); } found=TRUE; break; } } } if (!found) return; // no linkable namespaces in the list // write list of namespaces ol.startMemberHeader("namespaces"); //bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); ol.parseText(title); ol.endMemberHeader(); ol.startMemberList(); for (ni.toFirst();(nd=ni.current());++ni) { if (nd->isLinkable()) { SrcLangExt lang = nd->getLanguage(); if (lang==SrcLangExt_IDL && (isConstantGroup != nd->isConstantGroup())) continue; // will be output in another pass, see layout_default.xml ol.startMemberDeclaration(); ol.startMemberItem(nd->getOutputFileBase(),0); if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp) { ol.docify("package "); } else if (lang==SrcLangExt_Fortran) { ol.docify("module "); } else if (lang==SrcLangExt_IDL) { if (nd->isModule()) { ol.docify("module "); } else if (nd->isConstantGroup()) { ol.docify("constants"); } else { err("Internal inconsistency: namespace in IDL not module or cg\n"); } } ol.insertMemberAlign(); QCString name; if (localName) { name = nd->localName(); } else { name = nd->displayName(); } ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name); if (!Config_getString("GENERATE_TAGFILE").isEmpty() && nd->isLinkableInProject()) { Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; } ol.endMemberItem(); if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(nd->getOutputFileBase()); ol.generateDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE,0,TRUE); ol.endMemberDescription(); } ol.endMemberDeclaration(0,0); } } ol.endMemberList(); }
void DirDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); ol.pushGeneratorState(); QCString shortTitle=theTranslator->trDirReference(m_shortName); QCString title=theTranslator->trDirReference(m_dispName); startFile(ol,getOutputFileBase(),name(),title,HLI_None,!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(); 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 ------------------------------- 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 ------------------------------- if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } ol.endContents(); endFileWithNavPath(this,ol); ol.popGeneratorState(); }
void writeMscGraphFromFile(const char *inFile,const char *outDir, const char *outFile,MscOutputFormat format) { QCString absOutFile = outDir; absOutFile+=portable_pathSeparator(); absOutFile+=outFile; // chdir to the output dir, so dot can find the font file. QCString oldDir = QDir::currentDirPath().utf8(); // go to the html output directory (i.e. path) QDir::setCurrent(outDir); //printf("Going to dir %s\n",QDir::currentDirPath().data()); QCString mscExe = Config_getString(MSCGEN_PATH)+"mscgen"+portable_commandExtension(); QCString mscArgs; QCString imgName = outFile; switch (format) { case MSC_BITMAP: mscArgs+="-T png"; imgName+=".png"; break; case MSC_EPS: mscArgs+="-T eps"; imgName+=".eps"; break; case MSC_SVG: mscArgs+="-T svg"; imgName+=".svg"; break; default: goto error; // I am not very fond of goto statements, but when in Rome... } mscArgs+=" -i \""; mscArgs+=inFile; mscArgs+="\" -o \""; mscArgs+=imgName+"\""; int exitCode; // printf("*** running: %s %s outDir:%s %s\n",mscExe.data(),mscArgs.data(),outDir,outFile); portable_sysTimerStart(); if ((exitCode=portable_system(mscExe,mscArgs,FALSE))!=0) { portable_sysTimerStop(); goto error; } portable_sysTimerStop(); if ( (format==MSC_EPS) && (Config_getBool(USE_PDFLATEX)) ) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", outFile,outFile); portable_sysTimerStart(); if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Problems running epstopdf. Check your TeX installation!\n"); } portable_sysTimerStop(); } Doxygen::indexList->addImageFile(imgName); error: QDir::setCurrent(oldDir); }
void DocSets::initialize() { // -- get config options QCString projectName = Config_getString("PROJECT_NAME"); if (projectName.isEmpty()) projectName="root"; QCString bundleId = Config_getString("DOCSET_BUNDLE_ID"); if (bundleId.isEmpty()) bundleId="org.doxygen.Project"; QCString feedName = Config_getString("DOCSET_FEEDNAME"); if (feedName.isEmpty()) feedName="FeedName"; // -- write Makefile { QCString mfName = Config_getString("HTML_OUTPUT") + "/Makefile"; QFile makefile(mfName); if (!makefile.open(IO_WriteOnly)) { err("Could not open file %s for writing\n",mfName.data()); exit(1); } QTextStream ts(&makefile); ts.setEncoding(QTextStream::UnicodeUTF8); ts << "DOCSET_NAME=" << bundleId << ".docset\n" "DOCSET_CONTENTS=$(DOCSET_NAME)/Contents\n" "DOCSET_RESOURCES=$(DOCSET_CONTENTS)/Resources\n" "DOCSET_DOCUMENTS=$(DOCSET_RESOURCES)/Documents\n" "DOCSET_INSTALL=~/Library/Developer/Shared/Documentation/DocSets\n" "XCODE_INSTALL=$(shell xcode-select -print-path)\n" "\n" "all: docset\n" "\n" "docset:\n" "\tmkdir -p $(DOCSET_DOCUMENTS)\n" "\tcp Nodes.xml $(DOCSET_RESOURCES)\n" "\tcp Tokens.xml $(DOCSET_RESOURCES)\n" "\tcp Info.plist $(DOCSET_CONTENTS)\n" "\ttar --exclude $(DOCSET_NAME) \\\n" "\t --exclude Nodes.xml \\\n" "\t --exclude Tokens.xml \\\n" "\t --exclude Info.plist \\\n" "\t --exclude Makefile -c -f - . \\\n" "\t | (cd $(DOCSET_DOCUMENTS); tar xvf -)\n" "\t$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME)\n" "\trm -f $(DOCSET_DOCUMENTS)/Nodes.xml\n" "\trm -f $(DOCSET_DOCUMENTS)/Info.plist\n" "\trm -f $(DOCSET_DOCUMENTS)/Makefile\n" "\trm -f $(DOCSET_RESOURCES)/Nodes.xml\n" "\trm -f $(DOCSET_RESOURCES)/Tokens.xml\n" "\n" "install: docset\n" "\tmkdir -p $(DOCSET_INSTALL)\n" "\tcp -R $(DOCSET_NAME) $(DOCSET_INSTALL)\n" "\n" "uninstall:\n" "\trm -rf $(DOCSET_INSTALL)\n" "\n" "always:\n"; } // -- write Info.plist { QCString plName = Config_getString("HTML_OUTPUT") + "/Info.plist"; QFile plist(plName); if (!plist.open(IO_WriteOnly)) { err("Could not open file %s for writing\n",plName.data()); exit(1); } QTextStream ts(&plist); ts.setEncoding(QTextStream::UnicodeUTF8); ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n" "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n" "<plist version=\"1.0\">\n" "<dict>\n" " <key>CFBundleName</key>\n" " <string>" << projectName << "</string>\n" " <key>CFBundleIdentifier</key>\n" " <string>" << bundleId << ".docset</string>\n" " <key>DocSetFeedName</key>\n" " <string>" << feedName << "</string>\n" "</dict>\n" "</plist>\n"; } // -- start Nodes.xml QCString notes = Config_getString("HTML_OUTPUT") + "/Nodes.xml"; m_nf = new QFile(notes); if (!m_nf->open(IO_WriteOnly)) { err("Could not open file %s for writing\n",notes.data()); exit(1); } QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; m_nts.setDevice(m_nf); m_nts.setEncoding(QTextStream::UnicodeUTF8); m_nts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; m_nts << "<DocSetNodes version=\"1.0\">" << endl; m_nts << " <TOC>" << endl; m_nts << " <Node>" << endl; m_nts << " <Name>Root</Name>" << endl; m_nts << " <Path>" << indexName << Doxygen::htmlFileExtension << "</Path>" << endl; m_nts << " <Subnodes>" << endl; m_dc = 1; m_firstNode.resize(m_dc); m_firstNode.at(0)=TRUE; QCString tokens = Config_getString("HTML_OUTPUT") + "/Tokens.xml"; m_tf = new QFile(tokens); if (!m_tf->open(IO_WriteOnly)) { err("Could not open file %s for writing\n",tokens.data()); exit(1); } m_tts.setDevice(m_tf); m_tts.setEncoding(QTextStream::UnicodeUTF8); m_tts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; m_tts << "<Tokens version=\"1.0\">" << endl; }