From 832e08dcc70203d84f75249583a95fa172492aa2 Mon Sep 17 00:00:00 2001 From: dimitri Date: Sun, 28 May 2000 19:46:08 +0000 Subject: Release-1.1.3-20000528 --- INSTALL | 8 +- README | 4 +- VERSION | 2 +- addon/configgen/config_templ.l | 14 +-- doc/config.doc | 159 +++++++++++++------------- doc/faq.doc | 2 +- doc/index.doc | 2 + packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 4 +- src/code.l | 4 +- src/config.l | 17 +-- src/dot.cpp | 254 ++++++++++++++++++++++++++++------------- src/dot.h | 26 +++-- src/doxygen.cpp | 181 ++++++++++++++++++++++++----- src/entry.h | 3 +- src/filedef.cpp | 25 ++-- src/filedef.h | 7 +- src/filename.cpp | 2 +- src/groupdef.cpp | 2 +- src/htmlgen.cpp | 17 ++- src/htmlgen.h | 6 +- src/latexgen.cpp | 40 ++++++- src/latexgen.h | 10 +- src/mangen.h | 2 +- src/memberdef.cpp | 2 +- src/message.cpp | 23 +++- src/namespacedef.cpp | 23 +++- src/namespacedef.h | 9 +- src/outputgen.h | 2 +- src/outputlist.h | 4 +- src/pre.l | 3 +- src/rtfgen.cpp | 28 +++-- src/rtfgen.h | 2 +- src/scanner.l | 88 ++++++++++++-- src/translator.h | 12 +- src/util.cpp | 10 +- 36 files changed, 701 insertions(+), 298 deletions(-) diff --git a/INSTALL b/INSTALL index ae4f4c2..b347d12 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -DOXYGEN Version 1.1.3-20000522 +DOXYGEN Version 1.1.3-20000528 CONTENTS -------- @@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: 1. Unpack the archive, unless you already have: - gunzip doxygen-1.1.3-20000522.src.tar.gz # uncompress the archive - tar xf doxygen-1.1.3-20000522.src.tar # unpack it + gunzip doxygen-1.1.3-20000528.src.tar.gz # uncompress the archive + tar xf doxygen-1.1.3-20000528.src.tar # unpack it 2. Run the configure script: @@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (22 May 2000) +Dimitri van Heesch (28 May 2000) diff --git a/README b/README index 3f8b02f..7e91368 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.1.3-20000522 +DOXYGEN Version 1.1.3-20000528 Please read INSTALL for compilation instructions. @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (22 May 2000) +Dimitri van Heesch (28 May 2000) diff --git a/VERSION b/VERSION index 77d7b83..35ab29c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.3-20000522 +1.1.3-20000528 diff --git a/addon/configgen/config_templ.l b/addon/configgen/config_templ.l index a7b1289..006bdc6 100644 --- a/addon/configgen/config_templ.l +++ b/addon/configgen/config_templ.l @@ -317,7 +317,7 @@ void configStrToVal() static void substEnvVarsInString(QCString &s) { - QRegExp re("\\$([a-z_A-Z0-9]+)"); + static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)"); int p=0; int i,l; //printf("substEnvVarInString(%s) start\n",s.data()); @@ -644,19 +644,19 @@ void checkConfig() } // add default pattern if needed - if (Config::filePatternList.count()==0) + if (Config::filePatternList.isEmpty()) { - Config::filePatternList.append("*"); + Config::filePatternList="*"; } // add default pattern if needed - if (Config::examplePatternList.count()==0) + if (Config::examplePatternList.isEmpty()) { - Config::examplePatternList.append("*"); + Config::examplePatternList="*"; } // add default pattern if needed - //if (Config::imagePatternList.count()==0) + //if (Config::imagePatternList.isEmpty()) //{ // Config::imagePatternList.append("*"); //} @@ -685,7 +685,7 @@ void checkConfig() // check documentation URL if (Config::docURL.isEmpty()) { - Config::docURL = Config::outputDir.copy().prepend("file://").append("html"); + Config::docURL = Config::outputDir.copy().prepend("file://")+"html"; } else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://") { diff --git a/doc/config.doc b/doc/config.doc index bc27a16..cfd41d9 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -148,9 +148,9 @@ followed by the descriptions of the tags grouped by category. \endlatexonly \subsection config_general General options +\anchor cfg_project_name
-\anchor cfg_project_name
\c PROJECT_NAME
\addindex PROJECT_NAME The \c PROJECT_NAME tag is a single word (or a sequence of words @@ -269,9 +269,9 @@ followed by the descriptions of the tags grouped by category. \anchor cfg_always_detailed_sec
\c ALWAYS_DETAILED_SEC
-If the \c ALWAYS_DETAILED_SEC and \c REPEAT_BRIEF tags are both set to \c YES then -Doxygen will generate a detailed section even if there is only a brief -description. + If the \c ALWAYS_DETAILED_SEC and \c REPEAT_BRIEF tags are both set to \c YES then + Doxygen will generate a detailed section even if there is only a brief + description. \anchor cfg_full_path_names
\c FULL_PATH_NAMES
@@ -369,23 +369,23 @@ description. \anchor cfg_tab_size
\c TAB_SIZE
- \addindex TAB_SIZE - the \c TAB_SIZE tag can be used to set the number of spaces in a tab. - Doxygen uses this value to replace tabs by spaces in code fragments. + \addindex TAB_SIZE + the \c TAB_SIZE tag can be used to set the number of spaces in a tab. + Doxygen uses this value to replace tabs by spaces in code fragments. \anchor cfg_enabled_sections
\c ENABLED_SECTIONS
- \addindex ENABLED_SECTIONS - The \c ENABLE_SECTIONS tag can be used to enable conditional - documentation sections, marked by \ref cmdif "\\if" \ ... - \ref cmdendif "\\endif" blocks. + \addindex ENABLED_SECTIONS + The \c ENABLE_SECTIONS tag can be used to enable conditional + documentation sections, marked by \ref cmdif "\\if" \ ... + \ref cmdendif "\\endif" blocks.
\subsection config_input Input related options +\anchor cfg_input
-\anchor cfg_input
\c INPUT
\addindex INPUT The \c INPUT tag is used to specify the files and/or directories that contain @@ -465,9 +465,9 @@ description.
\subsection html_output HTML related options +\anchor cfg_generate_html
-\anchor cfg_generate_html
\c GENERATE_HTML
\addindex GENERATE_HTML If the \c GENERATE_HTML tag is set to \c YES (the default) Doxygen will @@ -553,7 +553,7 @@ TD.md { background-color: #f2f2ff } DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } FONT.keyword { color: #008000 } -FONT.keywordtype { color: #008060 } +FONT.keywordtype { color: #604020 } FONT.keywordflow { color: #e08000 } FONT.comment { color: #800000 } FONT.preprocessor { color: #806020 } @@ -563,66 +563,70 @@ FONT.charliteral { color: #008080 } \anchor cfg_html_align_members
\c HTML_ALIGN_MEMBERS
-If the \c HTML_ALIGN_MEMBERS tag is set to \c YES, the members of classes, -files or namespaces will be aligned in HTML using tables. If set to -NO a bullet list will be used. + \addindex HTML_ALIGN_MEMBERS + If the \c HTML_ALIGN_MEMBERS tag is set to \c YES, the members of classes, + files or namespaces will be aligned in HTML using tables. If set to + NO a bullet list will be used. -Note: -Setting this tag to NO will become obsolete in the future, since I only -intent to support and test the aligned representation. + Note: + Setting this tag to NO will become obsolete in the future, since I only + intent to support and test the aligned representation. \anchor cfg_generate_htmlhelp
\c GENERATE_HTMLHELP
-If the \c GENERATE_HTMLHELP tag is set to \c YES then -doxygen generates three additional HTML index files: -\c index.hhp, \c index.hhc, and \c index.hhk. The \c index.hhp is a -project file that can be read by - -Microsoft HTML help workshop -\latexonly -(see http://msdn.microsoft.com/workshop/author/htmlhelp) -\endlatexonly -on Windows. - -The HTML workshop contains a compiler that can convert all HTML output -generated by doxygen into a single compressed HTML file (.chm). Compressed -HTML files are now used as the Windows 98 help format, and will replace -the old windows help format (.hlp) on all Windows platforms in the future. -Compressed HTML files also contain an index, a table of contents, -and you can search for words in the documentation -(which basically renders \c doxysearch obsolete on Windows). -The HTML workshop also contains a viewer for compressed HTML files. + \addindex GENERATE_HTMLHELP + If the \c GENERATE_HTMLHELP tag is set to \c YES then + doxygen generates three additional HTML index files: + \c index.hhp, \c index.hhc, and \c index.hhk. The \c index.hhp is a + project file that can be read by + + Microsoft HTML help workshop + \latexonly + (see http://msdn.microsoft.com/workshop/author/htmlhelp) + \endlatexonly + on Windows. + + The HTML workshop contains a compiler that can convert all HTML output + generated by doxygen into a single compressed HTML file (.chm). Compressed + HTML files are now used as the Windows 98 help format, and will replace + the old windows help format (.hlp) on all Windows platforms in the future. + Compressed HTML files also contain an index, a table of contents, + and you can search for words in the documentation + (which basically renders \c doxysearch obsolete on Windows). + The HTML workshop also contains a viewer for compressed HTML files.
\subsection alphabetical_index Alphabetical index options +\anchor cfg_alphabetical_index
-\anchor cfg_alphabetical_index
\c ALPHABETICAL_INDEX
-If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index -of all compounds will be generated. Enable this if the project contains -a lot of classes, structs, unions or interfaces. + \addindex ALPHABETICAL_INDEX + If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index + of all compounds will be generated. Enable this if the project contains + a lot of classes, structs, unions or interfaces. \anchor cfg_cols_in_alpha_index
\c COLS_IN_ALPHA_INDEX
-If the alphabetical index is enabled -(see \c ALPHABETICAL_INDEX) then the \c COLS_IN_ALPHA_INDEX tag can be -used to specify the number of columns in which this list will be split (can be a number in the range [1..20]) + \addindex COLS_IN_ALPHA_INDEX + If the alphabetical index is enabled + (see \c ALPHABETICAL_INDEX) then the \c COLS_IN_ALPHA_INDEX tag can be + used to specify the number of columns in which this list will be split (can be a number in the range [1..20]) \anchor cfg_ignore_prefix
\c IGNORE_PREFIX
-In case all classes in a project start with a common prefix, all classes will -be put under the same header in the alphabetical index. -The \c IGNORE_PREFIX tag can be used to specify a prefix -(or a list of prefixes) that should be ignored while generating the index -headers. + \addindex IGNORE_PREFIX + In case all classes in a project start with a common prefix, all classes will + be put under the same header in the alphabetical index. + The \c IGNORE_PREFIX tag can be used to specify a prefix + (or a list of prefixes) that should be ignored while generating the index + headers.
- \subsection latex_output LaTeX related options +\anchor cfg_generate_latex
-\anchor cfg_generate_latex
\c GENERATE_LATEX
\addindex GENERATE_LATEX If the \c GENERATE_LATEX tag is set to \c YES (the default) Doxygen will @@ -716,32 +720,32 @@ EXTRA_PACKAGES = times
\c PDF_HYPERLINKS
\addindex PDF_HYPERLINKS -If the \c PDF_HYPERLINKS tag is set to \c YES, the LaTeX that is generated -is prepared for conversion to pdf (using ps2pdf). The pdf file will -contain links (just like the HTML output) instead of page references -This makes the output suitable for online browsing using a pdf viewer. + If the \c PDF_HYPERLINKS tag is set to \c YES, the LaTeX that is generated + is prepared for conversion to pdf (using ps2pdf). The pdf file will + contain links (just like the HTML output) instead of page references + This makes the output suitable for online browsing using a pdf viewer. \anchor cfg_latex_batchmode
\c LATEX_BATCHMODE
\addindex LATEX_BATCHMODE -If the \c LATEX_BATCHMODE tag is set to \c YES, doxygen will add the \\batchmode. -command to the generated \f$\mbox{\LaTeX}\f$ files. This will -instruct \f$\mbox{\LaTeX}\f$ to keep running if errors occur, instead of -asking the user for help. This option is also used when generating formulas -in HTML. + If the \c LATEX_BATCHMODE tag is set to \c YES, doxygen will add the \\batchmode. + command to the generated \f$\mbox{\LaTeX}\f$ files. This will + instruct \f$\mbox{\LaTeX}\f$ to keep running if errors occur, instead of + asking the user for help. This option is also used when generating formulas + in HTML.
- \subsection rtf_output RTF related options -
\anchor cfg_generate_rtf +
+
\c GENERATE_RTF
\addindex GENERATE_RTF - If the \c GENERATE_RTF tag is set to \c YES Doxygen will generate RTF output. - For now this is experimental and is disabled by default. The RTF - output is optimised for Word 97 and may not look too pretty with - other readers/editors. + If the \c GENERATE_RTF tag is set to \c YES Doxygen will generate RTF output. + For now this is experimental and is disabled by default. The RTF + output is optimised for Word 97 and may not look too pretty with + other readers/editors. \anchor cfg_rtf_output
\c RTF_OUTPUT
@@ -772,9 +776,9 @@ in HTML.
\subsection man_output Man page related options +\anchor cfg_generate_man
-\anchor cfg_generate_man
\c GENERATE_MAN
\addindex GENERATE_MAN If the \c GENERATE_MAN tag is set to \c YES (the default) Doxygen will @@ -797,9 +801,9 @@ in HTML.
\subsection config_prepro Preprocessor related options +\anchor cfg_enable_preprocessing
-\anchor cfg_enable_preprocessing
\c ENABLE_PREPROCESSING
\addindex ENABLE_PREPROCESSING If the \c ENABLE_PREPROCESSING tag is set to \c YES (the default) Doxygen will @@ -843,11 +847,10 @@ in HTML. \c PREDEFINED tag.
- \subsection config_extref External reference options +\anchor cfg_tagfiles
-\anchor cfg_tagfiles
\c TAGFILES
\addindex TAGFILES The \c TAGFILES tag can be used to specify one or more tagfiles. @@ -896,9 +899,9 @@ TAGFILES = file1=loc1 "file2 = loc2" ...
\subsection config_dot Dot options +\anchor cfg_have_dot
-\anchor cfg_have_dot
\c HAVE_DOT
\addindex HAVE_DOT If you set the \c HAVE_DOT tag to \c YES then doxygen will assume the dot tool is @@ -910,10 +913,10 @@ TAGFILES = file1=loc1 "file2 = loc2" ... \anchor cfg_class_graph
\c CLASS_GRAPH
\addindex CLASS_GRAPH -If the \c CLASS_GRAPH and \c HAVE_DOT tags are set to \c YES then doxygen -will generate a graph for each documented class showing the direct and -indirect inheritance relations. Setting this tag to \c YES will force the -the \c CLASS_DIAGRAMS tag to NO. + If the \c CLASS_GRAPH and \c HAVE_DOT tags are set to \c YES then doxygen + will generate a graph for each documented class showing the direct and + indirect inheritance relations. Setting this tag to \c YES will force the + the \c CLASS_DIAGRAMS tag to NO. \anchor cfg_collaboration_graph
\c COLLABORATION_GRAPH
@@ -939,9 +942,9 @@ the \c CLASS_DIAGRAMS tag to NO.
\subsection config_search Search engine options +\anchor cfg_searchengine
-\anchor cfg_searchengine
\c SEARCHENGINE
\addindex SEARCHENGINE The \c SEARCHENGINE tag specifies whether or not a diff --git a/doc/faq.doc b/doc/faq.doc index 8e3bc1b..cf679f3 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -149,7 +149,7 @@ QDict, QString, QArray, QTextStream, QRegExp etc. The GUI front-end doxywizard uses Qt for... well... the GUI! -
  • Can use doxygen on my Java code? +
  • Can I use doxygen on my Java code? No, at the moment there is no support for Java. I suggest to use Sun's JavaDoc instead. diff --git a/doc/index.doc b/doc/index.doc index 1657d03..1c52565 100644 --- a/doc/index.doc +++ b/doc/index.doc @@ -163,6 +163,7 @@ Thanks go to: PDF links, and the configuration generator.
  • Matthias Andree for providing a .spec script for building rpms from the sources. +
  • Tim Mensch for adding the todo command.
  • Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon, Vlastimil Havran, Ahmed Also Faisal, Alessandro Falappa, Kenji Nagamatsu, Francisco Oltra Thennet, Olli Korhonen for providing translations into @@ -236,6 +237,7 @@ Peter Garner, Fred Labrosse, Frank Schimmel, Reinhard Nissl, +Alexander Gidon, and many others for suggestions, patches and bug reports. */ diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index c15f207..b30cca8 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,5 +1,5 @@ Name: doxygen -Version: 1.1.3-20000522 +Version: 1.1.3-20000528 Summary: documentation system for C, C++ and IDL Release: 1 Source0: doxygen-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index eeae69e..7d35be4 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -710,7 +710,6 @@ void ClassDef::writeDocumentation(OutputList &ol) if (!inheritanceGraph.isTrivial()) { ol.pushGeneratorState(); - ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Man); ol.startDotGraph(); parseText(ol,theTranslator->trClassDiagram(name())); @@ -735,7 +734,6 @@ void ClassDef::writeDocumentation(OutputList &ol) if (!usageImplGraph.isTrivial()) { ol.pushGeneratorState(); - ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Man); ol.startDotGraph(); parseText(ol,theTranslator->trCollaborationDiagram(name())); @@ -822,7 +820,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); - ol.writeAnchor("_details"); + ol.writeAnchor(0,"_details"); ol.popGeneratorState(); ol.startGroupHeader(); parseText(ol,theTranslator->trDetailedDescription()); diff --git a/src/code.l b/src/code.l index 5e0e724..660b361 100644 --- a/src/code.l +++ b/src/code.l @@ -304,7 +304,7 @@ static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0) //if (latexOn) ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); - ol.writeAnchor(anchor); + ol.writeAnchor(0,anchor); //if (latexOn) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); g_anchorCount++; @@ -347,7 +347,7 @@ static bool getLink(const char *className, result.pushGeneratorState(); //if (latexEnabled) result.disable(OutputGenerator::Latex); result.disable(OutputGenerator::Latex); - result.writeAnchor(anchor); + result.writeAnchor(0,anchor); result.popGeneratorState(); //if (latexEnabled) result.enable(OutputGenerator::Latex); g_anchorCount++; diff --git a/src/config.l b/src/config.l index 4e13bf0..4a3804d 100644 --- a/src/config.l +++ b/src/config.l @@ -47,6 +47,9 @@ void warn_cont(const char *fmt, ...) vfprintf(stderr, fmt, args); va_end(args); } +void initWarningFormat() +{ +} #else #include "doxygen.h" #include "message.h" @@ -1842,7 +1845,7 @@ void configStrToVal() static void substEnvVarsInString(QCString &s) { - QRegExp re("\\$([a-z_A-Z0-9]+)"); + static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)"); int p=0; int i,l; //printf("substEnvVarInString(%s) start\n",s.data()); @@ -2206,19 +2209,19 @@ void checkConfig() } // add default pattern if needed - if (Config::filePatternList.count()==0) + if (Config::filePatternList.isEmpty()) { - Config::filePatternList.append("*"); + Config::filePatternList="*"; } // add default pattern if needed - if (Config::examplePatternList.count()==0) + if (Config::examplePatternList.isEmpty()) { - Config::examplePatternList.append("*"); + Config::examplePatternList="*"; } // add default pattern if needed - //if (Config::imagePatternList.count()==0) + //if (Config::imagePatternList.isEmpty()) //{ // Config::imagePatternList.append("*"); //} @@ -2247,7 +2250,7 @@ void checkConfig() // check documentation URL if (Config::docURL.isEmpty()) { - Config::docURL = Config::outputDir.copy().prepend("file://").append("html"); + Config::docURL = Config::outputDir.copy().prepend("file://")+"html"; } else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://") { diff --git a/src/dot.cpp b/src/dot.cpp index 8587866..83ac1b8 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -101,7 +101,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName) return TRUE; } -static bool readBoundingBox(const char *fileName,int *width,int *height) +static bool readBoundingBoxDot(const char *fileName,int *width,int *height) { QFile f(fileName); if (!f.open(IO_ReadOnly)) return FALSE; @@ -113,13 +113,34 @@ static bool readBoundingBox(const char *fileName,int *width,int *height) buf[numBytes-1]='\0'; if (strncmp(buf,"\tgraph [bb",10)==0) { - int x,y,w,h; - if (sscanf(buf,"\tgraph [bb= \"%d,%d,%d,%d\"];",&x,&y,&w,&h)!=4) + int x,y; + if (sscanf(buf,"\tgraph [bb= \"%d,%d,%d,%d\"];",&x,&y,width,height)!=4) + { + return FALSE; + } + return TRUE; + } + } + return FALSE; +} + +static bool readBoundingBoxEPS(const char *fileName,int *width,int *height) +{ + QFile f(fileName); + if (!f.open(IO_ReadOnly)) return FALSE; + const int maxLineLen=1024; + char buf[maxLineLen]; + while (!f.atEnd()) + { + int numBytes = f.readLine(buf,maxLineLen); + buf[numBytes-1]='\0'; + if (strncmp(buf,"%%BoundingBox: ",15)==0) + { + int x,y; + if (sscanf(buf,"%%%%BoundingBox: %d %d %d %d",&x,&y,width,height)!=4) { return FALSE; } - *width = w*96/72; // 96 pixels/inch, 72 points/inch - *height = h*96/72; // 96 pixels/inch, 72 points/inch return TRUE; } } @@ -290,7 +311,9 @@ static QCString convertLabel(const QCString &l) return result; } -void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren) +void DotNode::writeBox(QTextStream &t, + GraphOutputFormat format, + bool hasNonReachableChildren) { const char *labCol = m_url.isEmpty() ? "grey" : // non link @@ -299,7 +322,8 @@ void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren) ); t << " Node" << m_number << " [shape=\"box\",label=\"" << convertLabel(m_label) - << "\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\""; + << "\",fontsize=10,height=0.2,width=0.4"; + if (format==GIF) t << ",fontname=\"doxfont\""; t << ",color=\"" << labCol << "\""; if (m_isRoot) { @@ -312,8 +336,13 @@ void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren) t << "];" << endl; } -void DotNode::writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown, - bool pointBack) +void DotNode::writeArrow(QTextStream &t, + GraphOutputFormat format, + DotNode *cn, + EdgeInfo *ei, + bool topDown, + bool pointBack + ) { t << " Node"; if (topDown) t << cn->number(); else t << m_number; @@ -327,11 +356,16 @@ void DotNode::writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown, { t << ",label=\"" << ei->m_label << "\""; } - t << ",fontname=\"doxfont\""; + if (format==GIF) t << ",fontname=\"doxfont\""; t << "];" << endl; } -void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance) +void DotNode::write(QTextStream &t, + GraphOutputFormat format, + bool topDown, + bool toChildren, + int distance + ) { //printf("DotNode::write(%d) name=%s\n",distance,m_label.data()); if (m_written) return; // node already written to the output @@ -347,7 +381,7 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance) if (cn->m_distance>distance) hasNonReachableChildren=TRUE; } } - writeBox(t,hasNonReachableChildren); + writeBox(t,format,hasNonReachableChildren); m_written=TRUE; if (nl) { @@ -360,9 +394,9 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance) { if (cn->m_distance<=distance) { - writeArrow(t,cn,dnli2.current(),topDown); + writeArrow(t,format,cn,dnli2.current(),topDown); } - cn->write(t,topDown,toChildren,distance); + cn->write(t,format,topDown,toChildren,distance); } } else // render parents @@ -374,12 +408,13 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance) if (pn->m_distance<=distance) { writeArrow(t, + format, pn, pn->m_edgeInfo->at(pn->m_children->findRef(this)), FALSE ); } - pn->write(t,TRUE,FALSE,distance); + pn->write(t,format,TRUE,FALSE,distance); } } } @@ -535,13 +570,13 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) DotNode *node; for (;(node=dnli2.current());++dnli2) { - if (node->m_subgraphId==n->m_subgraphId) node->write(t,FALSE,TRUE); + if (node->m_subgraphId==n->m_subgraphId) node->write(t,GIF,FALSE,TRUE); } t << "}" << endl; f.close(); QCString dotCmd; - dotCmd.sprintf("dot -Tgif %s -o %s",dotName.data(),gifName.data()); + dotCmd.sprintf("dot -Tgif \"%s\" -o \"%s\"",dotName.data(),gifName.data()); //printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data()); if (system(dotCmd)!=0) { @@ -549,7 +584,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) out << "" << endl; return; } - dotCmd.sprintf("dot -Timap %s -o %s",dotName.data(),mapName.data()); + dotCmd.sprintf("dot -Timap \"%s\" -o \"%s\"",dotName.data(),mapName.data()); //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data()); if (system(dotCmd)!=0) { @@ -871,8 +906,13 @@ DotClassGraph::~DotClassGraph() delete m_usedNodes; } -void writeDotGraph(DotNode *root,const QCString &baseName, - bool lrRank,bool renderParents,int distance) +void writeDotGraph(DotNode *root, + GraphOutputFormat format, + const QCString &baseName, + bool lrRank, + bool renderParents, + int distance + ) { // generate the graph description for dot //printf("writeDotGraph(%s,%d)\n",baseName.data(),renderParents); @@ -888,7 +928,7 @@ void writeDotGraph(DotNode *root,const QCString &baseName, t << " rankdir=LR;" << endl; } root->clearWriteFlag(); - root->write(t,TRUE,TRUE,distance); + root->write(t,format,TRUE,TRUE,distance); if (renderParents && root->m_parents) { //printf("rendering parents!\n"); @@ -899,12 +939,13 @@ void writeDotGraph(DotNode *root,const QCString &baseName, if (pn->m_distance<=distance) { root->writeArrow(t, + format, pn, pn->m_edgeInfo->at(pn->m_children->findRef(root)), FALSE ); } - pn->write(t,TRUE,FALSE,distance); + pn->write(t,format,TRUE,FALSE,distance); } } t << "}" << endl; @@ -912,9 +953,11 @@ void writeDotGraph(DotNode *root,const QCString &baseName, } } -static void findMaximalDotGraph(DotNode *root,int maxDist, +static void findMaximalDotGraph(DotNode *root, + int maxDist, const QCString &baseName, QDir &thisDir, + GraphOutputFormat format, bool lrRank=FALSE, bool renderParents=FALSE ) @@ -930,11 +973,11 @@ static void findMaximalDotGraph(DotNode *root,int maxDist, // sized image (dimensions: maxImageWidth, maxImageHeight) do { - writeDotGraph(root,baseName,lrRank,renderParents,curDistance); + writeDotGraph(root,format,baseName,lrRank,renderParents,curDistance); QCString dotCmd; // create annotated dot file - dotCmd.sprintf("dot -Tdot %s.dot -o %s_tmp.dot",baseName.data(),baseName.data()); + dotCmd.sprintf("dot -Tdot \"%s.dot\" -o \"%s_tmp.dot\"",baseName.data(),baseName.data()); if (system(dotCmd)!=0) { err("Problems running dot. Check your installation!\n"); @@ -942,7 +985,9 @@ static void findMaximalDotGraph(DotNode *root,int maxDist, } // extract bounding box from the result - readBoundingBox(baseName+"_tmp.dot",&width,&height); + readBoundingBoxDot(baseName+"_tmp.dot",&width,&height); + width = width *96/72; // 96 pixels/inch, 72 points/inch + height = height*96/72; // 96 pixels/inch, 72 points/inch //printf("Found bounding box (%d,%d)\n",width,height); lastFit=(widthmaxImageWidth), renderParents, @@ -982,8 +1028,9 @@ QCString DotClassGraph::diskName() const } void DotClassGraph::writeGraph(QTextStream &out, - const char *path, - bool isTBRank) + GraphOutputFormat format, + const char *path, + bool isTBRank) { QDir d(path); // store the original directory @@ -1014,38 +1061,58 @@ void DotClassGraph::writeGraph(QTextStream &out, break; } - // TODO: make sure curDistance>0 - findMaximalDotGraph(m_startNode,m_maxDistance,baseName, - thisDir,!isTBRank,m_graphType==Inheritance); + thisDir,format,!isTBRank,m_graphType==Inheritance); - // run dot to create a .gif image - QCString dotCmd; - dotCmd.sprintf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data()); - if (system(dotCmd)!=0) + if (format==GIF) // run dot to create a .gif image { - err("Problems running dot. Check your installation!\n"); - return; + QCString dotCmd; + dotCmd.sprintf("dot -Tgif \"%s.dot\" -o \"%s.gif\"",baseName.data(),baseName.data()); + if (system(dotCmd)!=0) + { + err("Error: Problems running dot. Check your installation!\n"); + return; + } + // run dot again to create an image map + dotCmd.sprintf("dot -Timap \"%s.dot\" -o \"%s.map\"",baseName.data(),baseName.data()); + if (system(dotCmd)!=0) + { + err("Error: Problems running dot. Check your installation!\n"); + return; + } + out << "

    m_label << "_" << mapName << "\">
    " << endl; + out << "m_label << "_" << mapName << "\">" << endl; + convertMapFile(out,baseName+".map"); + out << "

    " << endl; + thisDir.remove(baseName+".map"); } - //printf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data()); - - // run dot again to create an image map - dotCmd.sprintf("dot -Timap %s.dot -o %s.map",baseName.data(),baseName.data()); - if (system(dotCmd)!=0) + else if (format==EPS) // run dot to create a .eps image { - err("Problems running dot. Check your installation!\n"); - return; + QCString dotCmd; + dotCmd.sprintf("dot -Tps \"%s.dot\" -o \"%s.eps\"",baseName.data(),baseName.data()); + if (system(dotCmd)!=0) + { + err("Error: Problems running dot. Check your installation!\n"); + return; + } + int width,height; + if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + { + err("Error: Could not extract bounding box from .eps!\n"); + return; + } + int maxWidth = 420; /* approx. page width in points */ + + out << "\\begin{figure}[H]\n" + "\\begin{center}\n" + "\\leavevmode\n" + "\\setlength{\\epsfxsize}{" << QMIN(width/2,maxWidth) << "pt}\n" + "\\epsfbox{" << baseName << ".eps}\n" + "\\end{center}\n" + "\\end{figure}\n"; } - //printf("dot -Timap %s.dot -o %s.map\n",baseName.data(),baseName.data()); - - out << "

    m_label << "_" << mapName << "\">
    " << endl; - out << "m_label << "_" << mapName << "\">" << endl; - convertMapFile(out,baseName+".map"); - out << "

    " << endl; - - //thisDir.remove(baseName+".dot"); - thisDir.remove(baseName+".map"); + thisDir.remove(baseName+".dot"); QDir::setCurrent(oldDir); } @@ -1130,7 +1197,10 @@ QCString DotInclDepGraph::diskName() const return m_diskName + "_incldep"; } -void DotInclDepGraph::writeGraph(QTextStream &out,const char *path) +void DotInclDepGraph::writeGraph(QTextStream &out, + GraphOutputFormat format, + const char *path + ) { QDir d(path); // store the original directory @@ -1144,35 +1214,65 @@ void DotInclDepGraph::writeGraph(QTextStream &out,const char *path) QDir thisDir; QCString baseName=m_diskName+"_incldep"; - - findMaximalDotGraph(m_startNode,m_maxDistance,baseName,thisDir); - // run dot to create a .gif image - QCString dotCmd; - dotCmd.sprintf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data()); - if (system(dotCmd)!=0) - { - err("Problems running dot. Check your installation!\n"); - return; - } - //printf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data()); + findMaximalDotGraph(m_startNode,m_maxDistance,baseName,thisDir,format); - // run dot again to create an image map - dotCmd.sprintf("dot -Timap %s.dot -o %s.map",baseName.data(),baseName.data()); - if (system(dotCmd)!=0) + if (format==GIF) { - err("Problems running dot. Check your installation!\n"); - return; - } + // run dot to create a .gif image + QCString dotCmd; + dotCmd.sprintf("dot -Tgif \"%s.dot\" -o \"%s.gif\"",baseName.data(),baseName.data()); + if (system(dotCmd)!=0) + { + err("Problems running dot. Check your installation!\n"); + return; + } + //printf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data()); - out << "

    m_label << "_map\">
    " << endl; - out << "m_label << "_map\">" << endl; - convertMapFile(out,baseName+".map"); - out << "

    " << endl; + out << "m_label << "_map\">" << endl; + convertMapFile(out,baseName+".map"); + out << "

    " << endl; + thisDir.remove(baseName+".map"); + } + else if (format==EPS) + { + // run dot to create a .eps image + QCString dotCmd; + + dotCmd.sprintf("dot -Tps \"%s.dot\" -o \"%s.eps\"",baseName.data(),baseName.data()); + if (system(dotCmd)!=0) + { + err("Problems running dot. Check your installation!\n"); + return; + } + int width,height; + if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + { + err("Error: Could not extract bounding box from .eps!\n"); + return; + } + int maxWidth = 420; /* approx. page width in points */ + + out << "\\begin{figure}[H]\n" + "\\begin{center}\n" + "\\leavevmode\n" + "\\setlength{\\epsfxsize}{" << QMIN(width/2,maxWidth) << "pt}\n" + "\\epsfbox{" << baseName << ".eps}\n" + "\\end{center}\n" + "\\end{figure}\n"; + } thisDir.remove(baseName+".dot"); - thisDir.remove(baseName+".map"); QDir::setCurrent(oldDir); } diff --git a/src/dot.h b/src/dot.h index b51b415..94b5162 100644 --- a/src/dot.h +++ b/src/dot.h @@ -25,6 +25,8 @@ class FileDef; class QTextStream; class DotNodeList; +enum GraphOutputFormat { GIF , EPS }; + struct EdgeInfo { enum Colors { Blue=0, Green=1, Red=2, Black=3, Grey=4 }; @@ -44,8 +46,13 @@ class DotNode friend class DotClassGraph; friend class DotInclDepGraph; friend class DotNodeList; - friend void writeDotGraph(DotNode *root,const QCString &baseName, - bool lrRank,bool renderParents,int distance); + friend void writeDotGraph( + DotNode *root, + GraphOutputFormat f, + const QCString &baseName, + bool lrRank, + bool renderParents, + int distance); public: DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE); ~DotNode(); @@ -62,15 +69,17 @@ class DotNode void removeChild(DotNode *n); void removeParent(DotNode *n); int number() const { return m_number; } - void write(QTextStream &t,bool topDown,bool toChildren,int maxDistance=1000); + void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren, + int maxDistance=1000); int m_subgraphId; void clearWriteFlag(); private: void colorConnectedNodes(int curColor); - void writeBox(QTextStream &t,bool hasNonReachableChildren); - void writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown, - bool pointBack=TRUE); + void writeBox(QTextStream &t,GraphOutputFormat f, + bool hasNonReachableChildren); + void writeArrow(QTextStream &t,GraphOutputFormat f,DotNode *cn, + EdgeInfo *ei,bool topDown, bool pointBack=TRUE); const DotNode *findDocNode() const; // only works for acyclic graphs! int m_number; QCString m_label; //!< label text @@ -108,7 +117,8 @@ class DotClassGraph DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth=1000); ~DotClassGraph(); bool isTrivial() const; - void writeGraph(QTextStream &t,const char *path,bool TBRank=TRUE); + void writeGraph(QTextStream &t,GraphOutputFormat f,const char *path, + bool TBRank=TRUE); QCString diskName() const; private: @@ -129,7 +139,7 @@ class DotInclDepGraph public: DotInclDepGraph(FileDef *fd); ~DotInclDepGraph(); - void writeGraph(QTextStream &t, const char *path); + void writeGraph(QTextStream &t, GraphOutputFormat f,const char *path); bool isTrivial() const; QCString diskName() const; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 13fdbbe..482e4bd 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -696,6 +696,8 @@ void buildNamespaceList(Entry *root) } } +//---------------------------------------------------------------------- + void findUsingDirectives(Entry *root) { if (root->section==Entry::USINGDIR_SEC) @@ -804,6 +806,83 @@ void findUsingDirectives(Entry *root) //---------------------------------------------------------------------- +void findUsingDeclarations(Entry *root) +{ + if (root->section==Entry::USINGDECL_SEC) + { + //printf("Found using declaration %s at line %d of %s\n", + // root->name.data(),root->startLine,root->fileName.data()); + bool ambig; + if (!root->name.isEmpty()) + { + ClassDef *usingCd = 0; + NamespaceDef *nd = 0; + FileDef *fd = findFileDef(&inputNameDict,root->fileName,ambig); + QCString scName; + + // see if the using statement was found inside a namespace or inside + // the global file scope. + if (root->parent->section == Entry::NAMESPACE_SEC) + { + scName=root->parent->name.copy(); + if (!scName.isEmpty()) + { + nd = namespaceDict[scName]; + } + } + + // Assume the using statement was used to import a class. + // Find the scope in which the `using' namespace is defined by prepending + // the possible scopes in which the using statement was found, starting + // with the most inner scope and going to the most outer scope (i.e. + // file scope). + int scopeOffset = scName.length(); + do + { + QCString scope=scopeOffset>0 ? + scName.left(scopeOffset)+"::" : QCString(); + //printf("Trying with scope=`%s'\n",scope.data()); + usingCd = getClass(scope+root->name); + if (scopeOffset==0) + { + scopeOffset=-1; + } + else if ((scopeOffset=scName.findRev("::",scopeOffset-1))==-1) + { + scopeOffset=0; + } + } while (scopeOffset>=0 && usingCd==0); + + //printf("%s -> %p\n",root->name.data(),usingCd); + + // add the namespace the correct scope + if (usingCd) + { + if (nd) + { + //printf("Inside namespace %s\n",nd->name().data()); + nd->addUsingDeclaration(usingCd); + } + else if (fd) + { + //printf("Inside file %s\n",fd->name().data()); + fd->addUsingDeclaration(usingCd); + } + } + } + } + EntryListIterator eli(*root->sublist); + Entry *e; + for (;(e=eli.current());++eli) + { + findUsingDeclarations(e); + } +} + + + +//---------------------------------------------------------------------- + static MemberDef *addVariableToClass( Entry *root, ClassDef *cd, @@ -2131,7 +2210,7 @@ void addMemberDocs(Entry *root, // find a class definition given the scope name and (optionally) a // template list specifier -static ClassDef *findClassDefinition(const char *scopeName,const char *classTempList) +static ClassDef *findSimpleClassDefinition(const char *scopeName,const char *classTempList) { ClassDef *tcd=0; if (classTempList) // try to find the correct specialization @@ -2150,6 +2229,68 @@ static ClassDef *findClassDefinition(const char *scopeName,const char *classTemp return tcd; } +static ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd, + const char *scopeName,const char *classTempList) +{ + ClassDef *tcd = findSimpleClassDefinition(scopeName,classTempList); + if (tcd==0) // try using declaration + { + ClassList *cl = 0; + if (nd) + { + cl=nd->getUsedClasses(); + } + else + { + cl=fd->getUsedClasses(); + } + if (cl) + { + ClassListIterator cli(*cl); + ClassDef *cd; + for (;(cd=cli.current()) && tcd==0;++cli) + { + QCString scName = scopeName; + int scopeOffset = scName.length(); + do + { + QCString scope=scName.left(scopeOffset); + //printf("`%s'<->`%s' `%s'\n",cd->name().data(),scope.data(),scopeName); + if (rightScopeMatch(cd->name(),scope)) + { + //printf("Trying to find `%s'\n",(cd->name()+scName.right(scName.length()-scopeOffset)).data()); + tcd = findSimpleClassDefinition(cd->name()+scName.right(scName.length()-scopeOffset),classTempList); + } + scopeOffset=scName.findRev("::",scopeOffset-1); + } while (scopeOffset>=0 && tcd==0); + } + } + } + if (tcd==0) // try using directive + { + NamespaceList *nl = 0; + if (nd) + { + nl=nd->getUsedNamespaces(); + } + else if (fd) + { + nl=fd->getUsedNamespaces(); + } + if (nl) + { + NamespaceListIterator nli(*nl); + NamespaceDef *nd; + for (;(nd=nli.current()) && tcd==0;++nli) + { + //printf("Trying with scope=%s\n",nd->name().data()); + tcd = findSimpleClassDefinition(nd->name()+"::"+scopeName,classTempList); + } + } + } + return tcd; +} + //---------------------------------------------------------------------- // Adds the documentation contained in `root' to a global function @@ -2659,33 +2800,11 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data()); ClassDef *tcd=0; - tcd = findClassDefinition(scopeName,classTempList); - - if (tcd==0) - { - bool ambig; - NamespaceDef *nd = 0; - FileDef *fd = 0; - NamespaceList *nl = 0; - if (!namespaceName.isEmpty() && (nd=namespaceDict[namespaceName])) - { - nl=nd->getUsedNamespaces(); - } - else if ((fd=findFileDef(&inputNameDict,root->fileName,ambig))) - { - nl=fd->getUsedNamespaces(); - } - if (nl) - { - NamespaceListIterator nli(*nl); - NamespaceDef *nd; - for (;(nd=nli.current()) && tcd==0;++nli) - { - //printf("Trying with scope=%s\n",nd->name().data()); - tcd = findClassDefinition(nd->name()+"::"+scopeName,classTempList); - } - } - } + bool ambig; + FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig); + NamespaceDef *nd=0; + if (!namespaceName.isEmpty()) nd=namespaceDict[namespaceName]; + tcd = findClassDefinition(fd,nd,scopeName,classTempList); if (cd && tcd==cd) // member's classes match { @@ -4969,7 +5088,10 @@ int main(int argc,char **argv) * Initialize some global constants **************************************************************************/ - spaces.fill(' ',Config::tabSize); + spaces.resize(Config::tabSize+1); + int sp;for (sp=0;sptrInclDepGraph(name())); @@ -287,7 +289,7 @@ void FileDef::writeDocumentation(OutputList &ol) //if (latexOn) ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); - ol.writeAnchor("_details"); + ol.writeAnchor(0,"_details"); //if (latexOn) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); ol.startGroupHeader(); @@ -533,11 +535,20 @@ QCString FileDef::getSourceAnchor(int lineNr) void FileDef::addUsingDirective(NamespaceDef *nd) { - if (usingList==0) + if (usingDirList==0) + { + usingDirList = new NamespaceList; + } + usingDirList->append(nd); +} + +void FileDef::addUsingDeclaration(ClassDef *cd) +{ + if (usingDeclList==0) { - usingList = new NamespaceList; + usingDeclList = new ClassList; } - usingList->append(nd); + usingDeclList->append(cd); } void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local) diff --git a/src/filedef.h b/src/filedef.h index 3791473..01e59d6 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -117,7 +117,9 @@ class FileDef : public Definition void computeAnchors(); void addUsingDirective(NamespaceDef *nd); - NamespaceList *getUsedNamespaces() const { return usingList; } + NamespaceList *getUsedNamespaces() const { return usingDirList; } + void addUsingDeclaration(ClassDef *cd); + ClassList *getUsedClasses() const { return usingDeclList; } void setGenerateSource(bool b) { isSource=b; } bool generateSource() const { return isSource; } @@ -142,7 +144,8 @@ class FileDef : public Definition QList *includeList; NamespaceDict *namespaceDict; NamespaceList *namespaceList; - NamespaceList *usingList; + NamespaceList *usingDirList; + ClassList *usingDeclList; //DefineList *defineList; QCString path; QCString filepath; diff --git a/src/filename.cpp b/src/filename.cpp index 6e1fa0a..86db34f 100644 --- a/src/filename.cpp +++ b/src/filename.cpp @@ -38,7 +38,7 @@ FileName::~FileName() void FileName::generateDiskNames() { - QCString commonPrefix; + //QCString commonPrefix; FileDef *fd=first(); int count=0; while (fd) { if (!fd->isReference()) count++; fd=next(); } diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 0bbe773..66e7c53 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -280,7 +280,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); - ol.writeAnchor("_details"); + ol.writeAnchor(0,"_details"); ol.popGeneratorState(); ol.startGroupHeader(); parseText(ol,theTranslator->trDetailedDescription()); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 1c76c27..f4d6799 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -173,7 +173,7 @@ void HtmlGenerator::endFile() void HtmlGenerator::startProjectNumber() { - t << "

    "; + t << "

    "; } void HtmlGenerator::endProjectNumber() @@ -230,12 +230,11 @@ void HtmlGenerator::writeStyleInfo(int part) void HtmlGenerator::startDoxyAnchor(const char *,const char *, const char *anchor, const char *name) { - t << ""; + t << ""; } void HtmlGenerator::endDoxyAnchor() { - t << "" << endl; } void HtmlGenerator::newParagraph() @@ -752,10 +751,10 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const { DBG_HTML(t << "" << endl;) t << "

    " << endl; - t << "" << endl; + t << "
    " << endl; t << " " << endl; t << "
    " << endl; - t << " " << endl; + t << "
    " << endl; } void HtmlGenerator::startMemberDocPrefixItem() @@ -837,7 +836,7 @@ void HtmlGenerator::startDotGraph() void HtmlGenerator::endDotGraph(DotClassGraph &g) { - g.writeGraph(t,Config::htmlOutputDir); + g.writeGraph(t,GIF,Config::htmlOutputDir); } void HtmlGenerator::startInclDepGraph() @@ -846,7 +845,7 @@ void HtmlGenerator::startInclDepGraph() void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) { - g.writeGraph(t,Config::htmlOutputDir); + g.writeGraph(t,GIF,Config::htmlOutputDir); } void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g) @@ -865,7 +864,7 @@ void HtmlGenerator::startMemberGroupHeader() //t << " " << endl; //t << " " << endl; - t << "
      "; - t << "
    "; + t << "
    "; } void HtmlGenerator::endMemberGroupHeader() @@ -885,7 +884,7 @@ void HtmlGenerator::endMemberGroupHeader() void HtmlGenerator::startMemberGroupDocs() { //t << "
    "; + t << "
    "; } void HtmlGenerator::endMemberGroupDocs() diff --git a/src/htmlgen.h b/src/htmlgen.h index 7dc63e0..e9f6cf5 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -111,7 +111,7 @@ class HtmlGenerator : public OutputGenerator void endMemberDescription(); void writeRuler() { t << "
    "; } - void writeAnchor(const char *name) + void writeAnchor(const char *,const char *name) { t << ""; } void startCodeFragment() { t << "
    "; }
         void endCodeFragment()   { t << "
    "; } // <- I know this is @@ -142,8 +142,8 @@ class HtmlGenerator : public OutputGenerator void startDoxyAnchor(const char *fName,const char *clName, const char *anchor,const char *name); void endDoxyAnchor(); - void startCodeAnchor(const char *label) { t << ""; } - void endCodeAnchor() { t << ""; } + void startCodeAnchor(const char *label) { t << ""; } + void endCodeAnchor() { } void writeLatexSpacing() {} //void writeLatexLabel(const char *,const char *) {} void writeStartAnnoItem(const char *type,const char *file, diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 671d377..fecebd8 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -27,6 +27,7 @@ #include "diagram.h" #include "language.h" #include "version.h" +#include "dot.h" static QCString filterTitle(const char *s) { @@ -549,7 +550,7 @@ void LatexGenerator::writeStyleInfo(int part) { case 0: { - QCString pname=Config::projectName.stripWhiteSpace(); + //QCString pname=Config::projectName.stripWhiteSpace(); startPlainFile("doxygen.sty"); t << "\\NeedsTeXFormat{LaTeX2e}\n"; t << "\\ProvidesPackage{doxygen}\n"; @@ -765,7 +766,8 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f, { t << "\\hyperlink{"; if (f) t << f; - if (anchor) t << "_" << anchor; + if (f && anchor) t << "_"; + if (anchor) t << anchor; t << "}{"; docify(text); t << "}"; @@ -910,6 +912,15 @@ void LatexGenerator::endDoxyAnchor() } } +void LatexGenerator::writeAnchor(const char *fName,const char *name) +{ + t << "\\label{" << name << "}" << endl; + if (fName && Config::pdfHyperFlag) + { + t << "\\hypertarget{" << fName << "_" << name << "}{}" << endl; + } +} + //void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor) //{ @@ -939,6 +950,10 @@ void LatexGenerator::writeSection(const char *lab,const char *title,bool sub) if (sub) t << "subsection{"; else t << "section{"; docify(title); t << "}\\label{" << lab << "}" << endl; + if (Config::pdfHyperFlag) + { + t << "\\hypertarget{" << lab << "}{}"; + } } void LatexGenerator::writeSectionRef(const char *,const char *lab, @@ -955,6 +970,7 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab, t << "}{\\ref{" << lab << "}}{}" << endl; } +// TODO: remove this function void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, const char *title) { @@ -1277,3 +1293,23 @@ void LatexGenerator::endMemberGroup(bool) { t << "\\end{Indent}" << endl; } + +void LatexGenerator::startDotGraph() +{ +} + +void LatexGenerator::endDotGraph(DotClassGraph &g) +{ + g.writeGraph(t,EPS,Config::latexOutputDir); +} + +void LatexGenerator::startInclDepGraph() +{ +} + +void LatexGenerator::endInclDepGraph(DotInclDepGraph &g) +{ + g.writeGraph(t,EPS,Config::latexOutputDir); +} + + diff --git a/src/latexgen.h b/src/latexgen.h index a3e10c3..933cb43 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -105,7 +105,7 @@ class LatexGenerator : public OutputGenerator void insertMemberAlign() {} void writeRuler() { t << endl << endl; /*t << "\\vspace{0.4cm}\\hrule\\vspace{0.2cm}" << endl; */ } - void writeAnchor(const char *name) { t << "\\label{" << name << "}" << endl; } + void writeAnchor(const char *fileName,const char *name); void startCodeFragment() { t << "\\small\\begin{verbatim}"; } void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; } void startCodeLine() { col=0; } @@ -211,10 +211,10 @@ class LatexGenerator : public OutputGenerator //static void docifyStatic(QTextStream &t,const char *str); - void startDotGraph() {} - void endDotGraph(DotClassGraph &) {} - void startInclDepGraph() {} - void endInclDepGraph(DotInclDepGraph &) {} + void startDotGraph(); + void endDotGraph(DotClassGraph &); + void startInclDepGraph(); + void endInclDepGraph(DotInclDepGraph &); void writeGraphicalHierarchy(DotGfxHierarchyTable &) {} void startTextBlock(bool) {} diff --git a/src/mangen.h b/src/mangen.h index cb3b0a4..fc435a4 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -103,7 +103,7 @@ class ManGenerator : public OutputGenerator void endMemberGroup(bool); void writeRuler() {} - void writeAnchor(const char *) {} + void writeAnchor(const char *,const char *) {} void startCodeFragment(); void endCodeFragment(); void startCodeLine() {} diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 30f371f..cde0c2a 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -250,7 +250,7 @@ MemberDef::MemberDef(const char *df,int dl, membTAL=0; type=substituteClassNames(t); args=substituteClassNames(a); - if (type.isNull()) decl=name()+args; else decl=type+" "+name()+args; + if (type.isEmpty()) decl=name()+args; else decl=type+" "+name()+args; declLine=0; memberGroup=0; virt=v; diff --git a/src/message.cpp b/src/message.cpp index 678a80a..9554c02 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -18,7 +18,7 @@ #include #include #include "config.h" -#include +#include "util.h" static QCString outputFormat; static int warnFormatOrder; // 1 = $file,$line,$text @@ -62,11 +62,22 @@ void initWarningFormat() { warnFormatOrder = 6; } - outputFormat = Config::warnFormat. - replace(QRegExp("\\$file"),"%s"). - replace(QRegExp("\\$text"),"%s"). - replace(QRegExp("\\$line"),"%d")+ - '\n'; + outputFormat = + substitute( + substitute( + substitute( + Config::warnFormat, + "$file","%s" + ), + "$text","%s" + ), + "$line","%d" + )+'\n'; + + // replace(QRegExp("\\$file"),"%s"). + // replace(QRegExp("\\$text"),"%s"). + // replace(QRegExp("\\$line"),"%d")+ + // '\n'; } diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 7c145ec..a3cbaa2 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -35,7 +35,8 @@ NamespaceDef::NamespaceDef(const char *df,int dl, classList = new ClassList; classDict = new ClassDict(1009); //memList = new MemberList; - usingList = 0; + usingDirList = 0; + usingDeclList = 0; setReference(ref); memberGroupList = new MemberGroupList; memberGroupList->setAutoDelete(TRUE); @@ -48,7 +49,8 @@ NamespaceDef::~NamespaceDef() { delete classList; delete classDict; - delete usingList; + delete usingDirList; + delete usingDeclList; delete memberGroupList; delete memberGroupDict; } @@ -182,7 +184,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ol.disableAllBut(OutputGenerator::Html); //bool latexOn = ol.isEnabled(OutputGenerator::Latex); //if (latexOn) ol.disable(OutputGenerator::Latex); - ol.writeAnchor("_details"); + ol.writeAnchor(0,"_details"); //if (latexOn) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); ol.startGroupHeader(); @@ -293,9 +295,18 @@ int NamespaceDef::countMembers() void NamespaceDef::addUsingDirective(NamespaceDef *nd) { - if (usingList==0) + if (usingDirList==0) { - usingList = new NamespaceList; + usingDirList = new NamespaceList; } - usingList->append(nd); + usingDirList->append(nd); +} + +void NamespaceDef::addUsingDeclaration(ClassDef *cd) +{ + if (usingDeclList==0) + { + usingDeclList = new ClassList; + } + usingDeclList->append(cd); } diff --git a/src/namespacedef.h b/src/namespacedef.h index d6f4b59..ffcc8d2 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -49,7 +49,11 @@ class NamespaceDef : public Definition void computeAnchors(); int countMembers(); void addUsingDirective(NamespaceDef *nd); - NamespaceList *getUsedNamespaces() const { return usingList; } + NamespaceList *getUsedNamespaces() const { return usingDirList; } + void addUsingDeclaration(ClassDef *cd); + ClassList *getUsedClasses() const { return usingDeclList; } + + //const char *getReference() { return reference; } //bool isVisible() //{ @@ -81,7 +85,8 @@ class NamespaceDef : public Definition QStrList files; ClassList *classList; ClassDict *classDict; - NamespaceList *usingList; + NamespaceList *usingDirList; + ClassList *usingDeclList; MemberList allMemberList; MemberList defineMembers; diff --git a/src/outputgen.h b/src/outputgen.h index d7d30a1..bde5dcc 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -112,7 +112,7 @@ class OutputGenerator virtual void insertMemberAlign() = 0; virtual void writeRuler() = 0; - virtual void writeAnchor(const char *name) = 0; + virtual void writeAnchor(const char *fileName,const char *name) = 0; virtual void startCodeFragment() = 0; virtual void endCodeFragment() = 0; virtual void startCodeLine() = 0; diff --git a/src/outputlist.h b/src/outputlist.h index d59320c..435a2a2 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -180,8 +180,8 @@ class OutputList { forall(&OutputGenerator::insertMemberAlign); } void writeRuler() { forall(&OutputGenerator::writeRuler); } - void writeAnchor(const char *name) - { forall(&OutputGenerator::writeAnchor,name); } + void writeAnchor(const char *fileName,const char *name) + { forall(&OutputGenerator::writeAnchor,fileName,name); } void startCodeFragment() { forall(&OutputGenerator::startCodeFragment); } void endCodeFragment() diff --git a/src/pre.l b/src/pre.l index 34f187f..324fad5 100644 --- a/src/pre.l +++ b/src/pre.l @@ -35,6 +35,7 @@ #include #include +#include "pre.h" #include "constexp.h" #include "define.h" #include "doxygen.h" @@ -1459,7 +1460,7 @@ BN [ \t\r\n] if (!g_quoteArg) g_defText+=' '; g_defText+='@'; QCString numStr; - numStr.setNum(*n); + numStr.sprintf("%d",*n); g_defText+=numStr; if (!g_quoteArg) g_defText+=' '; } diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 55a3a11..86ff8c2 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -358,7 +358,7 @@ void RTFGenerator::endProjectNumber() void RTFGenerator::startIndexSection(IndexSections is) { - QCString paperName; + //QCString paperName; m_listLevel = 0; @@ -1148,14 +1148,16 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name) // make an index entry addToIndex(name,NULL); - // make a bookmark for referencing - writeAnchor(name); if (fileName) { // doxygen expects different anchors for pdf and if "FULL PATHS" - if (strcmp(name,fileName) != 0) - writeAnchor(fileName); + writeAnchor(fileName,0); + } + else + { + // make a bookmark for referencing + writeAnchor(0,name); } } } @@ -1408,7 +1410,7 @@ void RTFGenerator::writeSection(const char *lab,const char *title,bool sub) newParagraph(); // make bookmark - writeAnchor(lab); + writeAnchor(0,lab); t << "}"; } @@ -1547,9 +1549,13 @@ void RTFGenerator::endMemberItem(bool) newParagraph(); } -void RTFGenerator::writeAnchor(const char *name) +void RTFGenerator::writeAnchor(const char *fileName,const char *name) { - t << "{\\bkmkstart " << formatBmkStr(name) << "}" << endl; + t << "{\\bkmkstart "; + if (fileName) t << formatBmkStr(fileName); + if (fileName && name) t << "_"; + if (name) t << formatBmkStr(name); + t << "}" << endl; t << "{\\bkmkend " << formatBmkStr(name) << "}" << endl; } @@ -1936,7 +1942,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) newParagraph(); t <<"{\\comment This would be an image map..." << endl; - g.writeGraph(t,Config::rtfOutputDir); + g.writeGraph(t,GIF,Config::rtfOutputDir); t << "}" << endl; @@ -1958,11 +1964,11 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) newParagraph(); t <<"{\\comment This would be an image map..." << endl; - g.writeGraph(t,Config::rtfOutputDir); + g.writeGraph(t,GIF,Config::rtfOutputDir); t << "}" << endl; - QCString diskName = g.diskName(); + //QCString diskName = g.diskName(); // display the file t << "{" << endl; diff --git a/src/rtfgen.h b/src/rtfgen.h index 634cfd3..cc7f54a 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -101,7 +101,7 @@ class RTFGenerator : public OutputGenerator void writeRuler(){RtfwriteRuler_thin();}; - void writeAnchor(const char *name); + void writeAnchor(const char *fileName,const char *name); void startCodeFragment(); void endCodeFragment(); void startCodeLine() { col=0; } diff --git a/src/scanner.l b/src/scanner.l index a976a68..056caef 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -92,6 +92,9 @@ static int roundCount = 0 ; static int curlyCount = 0 ; static int squareCount = 0 ; static int ifCount = 0 ; +static int todoAnchor = 0 ; +static int todoStartContext = 0; +static QCString todoString = 0; static Entry* current_root = 0 ; static Entry* global_root = 0 ; static Entry* current = 0 ; @@ -889,7 +892,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ -URLMASK [a-z_A-Z0-9\~\:\?\@\#\.\-\+\/]+ +URLMASK [a-z_A-Z0-9\~\:\?\@\#\.\-\+\/\=]+ NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9] WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"") ATTR ({B}+[^>\n]*)? @@ -933,7 +936,7 @@ TR [tT][rR] TT [tT][tT] UL [uU][lL] VAR [vV][aA][rR] -DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") +DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") %option noyywrap @@ -1067,6 +1070,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") %x DocHtmlImageName %x DocLatexImageName %x DocLatexImageWidth +%x TodoParam %x SectionLabel %x SectionTitle %x SkipTemplate @@ -1583,7 +1587,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM} { outDoc->startDescTableTitle(); outDoc->startEmphasis(); - outDoc->docify(yytext); + outDoc->docify(substitute(yytext,"\"","")); outDoc->endEmphasis(); outDoc->endDescTableTitle(); outDoc->startDescTableData(); @@ -1616,7 +1620,8 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") SectionInfo *sec; if ((sec=sectionDict[secName])) { - outDoc->writeAnchor(sec->label); + //printf("writeAnchor %s_%s\n",sec->fileName.data(),sec->label.data()); + outDoc->writeAnchor(sec->fileName,sec->label); } } {CMD}"ref" { @@ -1662,7 +1667,10 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") text=sec->title; if (sec->type==SectionInfo::Anchor) { - outDoc->writeSectionRefAnchor(sec->fileName,sec->label,text); + //outDoc->writeSectionRefAnchor(sec->fileName,sec->label,text); + outDoc->writeObjectLink(0,sec->fileName,sec->label,text); + //printf("Writing page ref `%s'\n",sec->label.data()); + writePageRef(*outDoc,sec->label,0); } else { @@ -1693,7 +1701,10 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") { if (sec->type==SectionInfo::Anchor) { - outDoc->writeSectionRefAnchor(sec->fileName,sec->label,text); + //outDoc->writeSectionRefAnchor(sec->fileName,sec->label,text); + outDoc->writeObjectLink(0,sec->fileName,sec->label,text); + //printf("Writing page ref `%s'\n",sec->label.data()); + writePageRef(*outDoc,sec->label,0); } else { @@ -2028,7 +2039,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") "<"{H3}{ATTR}">" { outDoc->startSubsubsection(); } "" { outDoc->endSubsubsection(); } {NAME}{BN}*"="{BN}*("\""?) { BEGIN(DocHtmlAnchor); } -[a-z_A-Z0-9.\-\+\/]+ { outDoc->writeAnchor(yytext); } +[a-z_A-Z0-9.\-\+\/]+ { outDoc->writeAnchor(0,yytext); } {HREF}{BN}*"="{BN}*("\""?) { htmlUrl.resize(0); htmlText.resize(0); @@ -2434,7 +2445,21 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") BEGIN(Using); } "namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); } -";" { BEGIN(FindMembers); } +{ID}{BN}*"::"{BN}*{ID}({BN}*"::"{BN}*{ID})* { + current->name=yytext; + current->fileName = yyFileName; + current->section=Entry::USINGDECL_SEC; + //printf("Found using declaration %s\n",yytext); + current_root->addSubEntry(current); + current = new Entry ; + current->protection = protection ; + current->sig = sig; + current->virt = virt; + current->stat = gstat; + current->slot = slot; + current->mGrpId = memberGroupId; + BEGIN(Using); + } {SCOPENAME} { current->name=yytext; current->fileName = yyFileName; current->section=Entry::USINGDIR_SEC; @@ -2449,6 +2474,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") current->mGrpId = memberGroupId; BEGIN(Using); } +";" { BEGIN(FindMembers); } {SCOPENAME}{BN}*"<>" { // guided template decl QCString n=yytext; addType( current ); @@ -3775,7 +3801,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") { if (isTypedef) { - QCString dest = extractName(current->name); + //QCString dest = extractName(current->name); typedefDict.insert(yytext,new QCString(current->name)); //current->extends->append( // new BaseInfo(yytext,Public,Normal) @@ -4171,6 +4197,50 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") memberGroupDocs.resize(0); BEGIN(GroupHeader); } +{CMD}"todo"{B}+ { + todoStartContext = YY_START; + todoString.resize(0); + BEGIN(TodoParam); + } +[^*/\n]+ { + todoString+=yytext; + } +. { + todoString+=*yytext; + } +"\n"|"*/" { + char anchorLabel[12]; + sprintf(anchorLabel,"_todo%06d",todoAnchor++); + QCString todoItemNum; + todoItemNum.sprintf("%d",todoAnchor); + sectionType=SectionInfo::Anchor; + sectionLabel=anchorLabel; + addSection(); + current->doc += "\\anchor "+sectionLabel+"\n"; + current->doc += "

    \\link todo "; + current->doc += theTranslator->trTodo(); + current->doc += ":\\endlink "; + current->doc += todoString + "

    "; + Entry *page = new Entry; + page->section = Entry::PAGEDOC_SEC; + page->fileName = yyFileName; + page->startLine = yyLineNr; + page->name = "todo"; + page->args = theTranslator->trTodoList(); + page->doc += "\\ref "; + page->doc += anchorLabel; + page->doc += " \""+todoItemNum+"\"\n"+todoString+"

    "; + global_root->addSubEntry(page); + if (*yytext=='*') + { + unput('/');unput('*'); + } + else + { + unput('\n'); + } + BEGIN(todoStartContext); + } {FILE} { current->name = stripQuotes(yytext); BEGIN( ExampleDoc ); diff --git a/src/translator.h b/src/translator.h index 89ef47b..9598da3 100644 --- a/src/translator.h +++ b/src/translator.h @@ -863,9 +863,19 @@ class Translator } ////////////////////////////////////////////////////////////////////////// -// new since 1.1.1 +// new since 1.1.3 ////////////////////////////////////////////////////////////////////////// + /*! Used as a marker that is put before a todo item */ + virtual QCString trTodo() + { + return "Todo"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Todo List"; + } }; #endif diff --git a/src/util.cpp b/src/util.cpp index 275b754..bc5067f 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1070,8 +1070,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, // (assuming a using statement was used) trimNamespaceScope(srcAType,dstAType); - QCString srcScope; - QCString dstScope; + //QCString srcScope; + //QCString dstScope; // strip redundant scope specifiers if (!className.isEmpty()) @@ -1400,7 +1400,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, QCString className = scopeName.left(scopeOffset); if (!className.isEmpty() && !mScope.isEmpty()) { - className.append("::"+mScope); + className+="::"+mScope; } else if (!mScope.isEmpty()) { @@ -1507,7 +1507,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, QCString namespaceName = scopeName.left(scopeOffset); if (!namespaceName.isEmpty() && !mScope.isEmpty()) { - namespaceName.append("::"+mScope); + namespaceName+="::"+mScope; } else if (!mScope.isEmpty()) { @@ -2247,7 +2247,7 @@ void extractNamespaceName(const QCString &scopeName, QCString &className,QCString &namespaceName) { QCString clName=scopeName.copy(); - QCString nsName; + //QCString nsName; if (!clName.isEmpty() && namespaceDict[clName] && getClass(clName)==0) { // the whole name is a namespace (and not a class) namespaceName=clName.copy(); -- cgit v0.12