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 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()); } }
static void generateSqlite3ForFile(sqlite3 *db, FileDef *fd) { // + includes files // + includedby files // + include graph // + included by graph // + contained class definitions // + contained namespace definitions // + member groups // + normal members // + brief desc // + detailed desc // + source code // + location // - number of lines if (fd->isReference()) return; // skip external references #if 0 ti << " <compound refid=\"" << fd->getOutputFileBase() << "\" kind=\"file\"><name>" << convertToXML(fd->name()) << "</name>" << endl; QCString outputDirectory = Config_getString("XML_OUTPUT"); QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml"; QFile f(fileName); if (!f.open(IO_WriteOnly)) { err("Cannot open file %s for writing!\n",fileName.data()); return; } FTextStream t(&f); //t.setEncoding(FTextStream::UnicodeUTF8); writeXMLHeader(t); t << " <compounddef id=\"" << fd->getOutputFileBase() << "\" kind=\"file\">" << endl; t << " <compoundname>"; writeXMLString(t,fd->name()); t << "</compoundname>" << endl; IncludeInfo *inc; if (fd->includeFileList()) { QListIterator<IncludeInfo> ili1(*fd->includeFileList()); for (ili1.toFirst();(inc=ili1.current());++ili1) { t << " <includes"; if (inc->fileDef && !inc->fileDef->isReference()) // TODO: support external references { t << " refid=\"" << inc->fileDef->getOutputFileBase() << "\""; } t << " local=\"" << (inc->local ? "yes" : "no") << "\">"; t << inc->includeName; t << "</includes>" << endl; } } if (fd->includedByFileList()) { QListIterator<IncludeInfo> ili2(*fd->includedByFileList()); for (ili2.toFirst();(inc=ili2.current());++ili2) { t << " <includedby"; if (inc->fileDef && !inc->fileDef->isReference()) // TODO: support external references { t << " refid=\"" << inc->fileDef->getOutputFileBase() << "\""; } t << " local=\"" << (inc->local ? "yes" : "no") << "\">"; t << inc->includeName; t << "</includedby>" << endl; } } DotInclDepGraph incDepGraph(fd,FALSE); if (!incDepGraph.isTrivial()) { t << " <incdepgraph>" << endl; incDepGraph.writeXML(t); t << " </incdepgraph>" << endl; } DotInclDepGraph invIncDepGraph(fd,TRUE); if (!invIncDepGraph.isTrivial()) { t << " <invincdepgraph>" << endl; invIncDepGraph.writeXML(t); t << " </invincdepgraph>" << endl; } #endif if (fd->getClassSDict()) { writeInnerClasses(db,fd->getClassSDict()); } if (fd->getNamespaceSDict()) { writeInnerNamespaces(db,fd->getNamespaceSDict()); } if (fd->getMemberGroupSDict()) { MemberGroupSDict::Iterator mgli(*fd->getMemberGroupSDict()); MemberGroup *mg; for (;(mg=mgli.current());++mgli) { generateSqlite3Section(db,fd,mg->members(),"user-defined",mg->header(), mg->documentation()); } } QListIterator<MemberList> mli(fd->getMemberLists()); MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { if ((ml->listType()&MemberListType_declarationLists)!=0) { generateSqlite3Section(db,fd,ml,"user-defined");//g_xmlSectionMapper.find(ml->listType())); } } #if 0 generateXMLSection(fd,ti,t,fd->decDefineMembers,"define"); generateXMLSection(fd,ti,t,fd->decProtoMembers,"prototype"); generateXMLSection(fd,ti,t,fd->decTypedefMembers,"typedef"); generateXMLSection(fd,ti,t,fd->decEnumMembers,"enum"); generateXMLSection(fd,ti,t,fd->decFuncMembers,"func"); generateXMLSection(fd,ti,t,fd->decVarMembers,"var"); #endif #if 0 t << " <briefdescription>" << endl; writeXMLDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription()); t << " </briefdescription>" << endl; t << " <detaileddescription>" << endl; writeXMLDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation()); t << " </detaileddescription>" << endl; if (Config_getBool("XML_PROGRAMLISTING")) { t << " <programlisting>" << endl; writeXMLCodeBlock(t,fd); t << " </programlisting>" << endl; } t << " <location file=\"" << fd->getDefFileName() << "\"/>" << endl; t << " </compounddef>" << endl; t << "</doxygen>" << endl; ti << " </compound>" << endl; #endif }