Commit 3e33c509 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.1.3-20000528

parent 745526b6
DOXYGEN Version 1.1.3-20000522 DOXYGEN Version 1.1.3-20000528
CONTENTS CONTENTS
-------- --------
...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: ...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.3-20000522.src.tar.gz # uncompress the archive gunzip doxygen-1.1.3-20000528.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.3-20000522.src.tar # unpack it tar xf doxygen-1.1.3-20000528.src.tar # unpack it
2. Run the configure script: 2. Run the configure script:
...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at ...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (22 May 2000) Dimitri van Heesch (28 May 2000)
DOXYGEN Version 1.1.3-20000522 DOXYGEN Version 1.1.3-20000528
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (22 May 2000) Dimitri van Heesch (28 May 2000)
1.1.3-20000522 1.1.3-20000528
...@@ -317,7 +317,7 @@ void configStrToVal() ...@@ -317,7 +317,7 @@ void configStrToVal()
static void substEnvVarsInString(QCString &s) static void substEnvVarsInString(QCString &s)
{ {
QRegExp re("\\$([a-z_A-Z0-9]+)"); static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)");
int p=0; int p=0;
int i,l; int i,l;
//printf("substEnvVarInString(%s) start\n",s.data()); //printf("substEnvVarInString(%s) start\n",s.data());
...@@ -644,19 +644,19 @@ void checkConfig() ...@@ -644,19 +644,19 @@ void checkConfig()
} }
// add default pattern if needed // add default pattern if needed
if (Config::filePatternList.count()==0) if (Config::filePatternList.isEmpty())
{ {
Config::filePatternList.append("*"); Config::filePatternList="*";
} }
// add default pattern if needed // add default pattern if needed
if (Config::examplePatternList.count()==0) if (Config::examplePatternList.isEmpty())
{ {
Config::examplePatternList.append("*"); Config::examplePatternList="*";
} }
// add default pattern if needed // add default pattern if needed
//if (Config::imagePatternList.count()==0) //if (Config::imagePatternList.isEmpty())
//{ //{
// Config::imagePatternList.append("*"); // Config::imagePatternList.append("*");
//} //}
...@@ -685,7 +685,7 @@ void checkConfig() ...@@ -685,7 +685,7 @@ void checkConfig()
// check documentation URL // check documentation URL
if (Config::docURL.isEmpty()) 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://") else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
{ {
......
...@@ -148,9 +148,9 @@ followed by the descriptions of the tags grouped by category. ...@@ -148,9 +148,9 @@ followed by the descriptions of the tags grouped by category.
\endlatexonly \endlatexonly
\subsection config_general General options \subsection config_general General options
\anchor cfg_project_name
<dl> <dl>
\anchor cfg_project_name
<dt>\c PROJECT_NAME <dd> <dt>\c PROJECT_NAME <dd>
\addindex PROJECT_NAME \addindex PROJECT_NAME
The \c PROJECT_NAME tag is a single word (or a sequence of words 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. ...@@ -269,9 +269,9 @@ followed by the descriptions of the tags grouped by category.
\anchor cfg_always_detailed_sec \anchor cfg_always_detailed_sec
<dt>\c ALWAYS_DETAILED_SEC <dd> <dt>\c ALWAYS_DETAILED_SEC <dd>
If the \c ALWAYS_DETAILED_SEC and \c REPEAT_BRIEF tags are both set to \c YES then 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 Doxygen will generate a detailed section even if there is only a brief
description. description.
\anchor cfg_full_path_names \anchor cfg_full_path_names
<dt>\c FULL_PATH_NAMES <dd> <dt>\c FULL_PATH_NAMES <dd>
...@@ -369,23 +369,23 @@ description. ...@@ -369,23 +369,23 @@ description.
\anchor cfg_tab_size \anchor cfg_tab_size
<dt>\c TAB_SIZE <dd> <dt>\c TAB_SIZE <dd>
\addindex TAB_SIZE \addindex TAB_SIZE
the \c TAB_SIZE tag can be used to set the number of spaces in a tab. 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. Doxygen uses this value to replace tabs by spaces in code fragments.
\anchor cfg_enabled_sections \anchor cfg_enabled_sections
<dt>\c ENABLED_SECTIONS <dd> <dt>\c ENABLED_SECTIONS <dd>
\addindex ENABLED_SECTIONS \addindex ENABLED_SECTIONS
The \c ENABLE_SECTIONS tag can be used to enable conditional The \c ENABLE_SECTIONS tag can be used to enable conditional
documentation sections, marked by \ref cmdif "\\if" \<section-label\> ... documentation sections, marked by \ref cmdif "\\if" \<section-label\> ...
\ref cmdendif "\\endif" blocks. \ref cmdendif "\\endif" blocks.
</dl> </dl>
\subsection config_input Input related options \subsection config_input Input related options
\anchor cfg_input
<dl> <dl>
\anchor cfg_input
<dt>\c INPUT <dd> <dt>\c INPUT <dd>
\addindex INPUT \addindex INPUT
The \c INPUT tag is used to specify the files and/or directories that contain The \c INPUT tag is used to specify the files and/or directories that contain
...@@ -465,9 +465,9 @@ description. ...@@ -465,9 +465,9 @@ description.
</dl> </dl>
\subsection html_output HTML related options \subsection html_output HTML related options
\anchor cfg_generate_html
<dl> <dl>
\anchor cfg_generate_html
<dt>\c GENERATE_HTML <dd> <dt>\c GENERATE_HTML <dd>
\addindex GENERATE_HTML \addindex GENERATE_HTML
If the \c GENERATE_HTML tag is set to \c YES (the default) Doxygen will If the \c GENERATE_HTML tag is set to \c YES (the default) Doxygen will
...@@ -553,7 +553,7 @@ TD.md { background-color: #f2f2ff } ...@@ -553,7 +553,7 @@ TD.md { background-color: #f2f2ff }
DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight
DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }
FONT.keyword { color: #008000 } FONT.keyword { color: #008000 }
FONT.keywordtype { color: #008060 } FONT.keywordtype { color: #604020 }
FONT.keywordflow { color: #e08000 } FONT.keywordflow { color: #e08000 }
FONT.comment { color: #800000 } FONT.comment { color: #800000 }
FONT.preprocessor { color: #806020 } FONT.preprocessor { color: #806020 }
...@@ -563,66 +563,70 @@ FONT.charliteral { color: #008080 } ...@@ -563,66 +563,70 @@ FONT.charliteral { color: #008080 }
\anchor cfg_html_align_members \anchor cfg_html_align_members
<dt>\c HTML_ALIGN_MEMBERS <dd> <dt>\c HTML_ALIGN_MEMBERS <dd>
If the \c HTML_ALIGN_MEMBERS tag is set to \c YES, the members of classes, \addindex HTML_ALIGN_MEMBERS
files or namespaces will be aligned in HTML using tables. If set to If the \c HTML_ALIGN_MEMBERS tag is set to \c YES, the members of classes,
NO a bullet list will be used. files or namespaces will be aligned in HTML using tables. If set to
NO a bullet list will be used.
<b>Note:</b> <b>Note:</b>
Setting this tag to NO will become obsolete in the future, since I only Setting this tag to NO will become obsolete in the future, since I only
intent to support and test the aligned representation. intent to support and test the aligned representation.
\anchor cfg_generate_htmlhelp \anchor cfg_generate_htmlhelp
<dt>\c GENERATE_HTMLHELP <dd> <dt>\c GENERATE_HTMLHELP <dd>
If the \c GENERATE_HTMLHELP tag is set to \c YES then \addindex GENERATE_HTMLHELP
doxygen generates three additional HTML index files: If the \c GENERATE_HTMLHELP tag is set to \c YES then
\c index.hhp, \c index.hhc, and \c index.hhk. The \c index.hhp is a doxygen generates three additional HTML index files:
project file that can be read by \c index.hhp, \c index.hhc, and \c index.hhk. The \c index.hhp is a
<a href="http://msdn.microsoft.com/workshop/author/htmlhelp"> project file that can be read by
Microsoft HTML help workshop</a> <a href="http://msdn.microsoft.com/workshop/author/htmlhelp">
\latexonly Microsoft HTML help workshop</a>
(see http://msdn.microsoft.com/workshop/author/htmlhelp) \latexonly
\endlatexonly (see http://msdn.microsoft.com/workshop/author/htmlhelp)
on Windows. \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 The HTML workshop contains a compiler that can convert all HTML output
HTML files are now used as the Windows 98 help format, and will replace generated by doxygen into a single compressed HTML file (.chm). Compressed
the old windows help format (.hlp) on all Windows platforms in the future. HTML files are now used as the Windows 98 help format, and will replace
Compressed HTML files also contain an index, a table of contents, the old windows help format (.hlp) on all Windows platforms in the future.
and you can search for words in the documentation Compressed HTML files also contain an index, a table of contents,
(which basically renders \c doxysearch obsolete on Windows). and you can search for words in the documentation
The HTML workshop also contains a viewer for compressed HTML files. (which basically renders \c doxysearch obsolete on Windows).
The HTML workshop also contains a viewer for compressed HTML files.
</dl> </dl>
\subsection alphabetical_index Alphabetical index options \subsection alphabetical_index Alphabetical index options
\anchor cfg_alphabetical_index
<dl> <dl>
\anchor cfg_alphabetical_index
<dt>\c ALPHABETICAL_INDEX <dd> <dt>\c ALPHABETICAL_INDEX <dd>
If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index \addindex ALPHABETICAL_INDEX
of all compounds will be generated. Enable this if the project contains If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index
a lot of classes, structs, unions or interfaces. 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 \anchor cfg_cols_in_alpha_index
<dt>\c COLS_IN_ALPHA_INDEX <dd> <dt>\c COLS_IN_ALPHA_INDEX <dd>
If the alphabetical index is enabled \addindex COLS_IN_ALPHA_INDEX
(see \c ALPHABETICAL_INDEX) then the \c COLS_IN_ALPHA_INDEX tag can be If the alphabetical index is enabled
used to specify the number of columns in which this list will be split (can be a number in the range [1..20]) (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 \anchor cfg_ignore_prefix
<dt>\c IGNORE_PREFIX <dd> <dt>\c IGNORE_PREFIX <dd>
In case all classes in a project start with a common prefix, all classes will \addindex IGNORE_PREFIX
be put under the same header in the alphabetical index. In case all classes in a project start with a common prefix, all classes will
The \c IGNORE_PREFIX tag can be used to specify a prefix be put under the same header in the alphabetical index.
(or a list of prefixes) that should be ignored while generating the index The \c IGNORE_PREFIX tag can be used to specify a prefix
headers. (or a list of prefixes) that should be ignored while generating the index
headers.
</dl> </dl>
\subsection latex_output LaTeX related options \subsection latex_output LaTeX related options
\anchor cfg_generate_latex
<dl> <dl>
\anchor cfg_generate_latex
<dt>\c GENERATE_LATEX <dd> <dt>\c GENERATE_LATEX <dd>
\addindex GENERATE_LATEX \addindex GENERATE_LATEX
If the \c GENERATE_LATEX tag is set to \c YES (the default) Doxygen will If the \c GENERATE_LATEX tag is set to \c YES (the default) Doxygen will
...@@ -716,32 +720,32 @@ EXTRA_PACKAGES = times ...@@ -716,32 +720,32 @@ EXTRA_PACKAGES = times
<dt>\c PDF_HYPERLINKS <dd> <dt>\c PDF_HYPERLINKS <dd>
\addindex PDF_HYPERLINKS \addindex PDF_HYPERLINKS
If the \c PDF_HYPERLINKS tag is set to \c YES, the LaTeX that is generated 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 is prepared for conversion to pdf (using ps2pdf). The pdf file will
contain links (just like the HTML output) instead of page references contain links (just like the HTML output) instead of page references
This makes the output suitable for online browsing using a pdf viewer. This makes the output suitable for online browsing using a pdf viewer.
\anchor cfg_latex_batchmode \anchor cfg_latex_batchmode
<dt>\c LATEX_BATCHMODE <dd> <dt>\c LATEX_BATCHMODE <dd>
\addindex LATEX_BATCHMODE \addindex LATEX_BATCHMODE
If the \c LATEX_BATCHMODE tag is set to \c YES, doxygen will add the \\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 command to the generated \f$\mbox{\LaTeX}\f$ files. This will
instruct \f$\mbox{\LaTeX}\f$ to keep running if errors occur, instead of 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 asking the user for help. This option is also used when generating formulas
in HTML. in HTML.
</dl> </dl>
\subsection rtf_output RTF related options \subsection rtf_output RTF related options
<dl>
\anchor cfg_generate_rtf \anchor cfg_generate_rtf
<dl>
<dt>\c GENERATE_RTF <dd> <dt>\c GENERATE_RTF <dd>
\addindex GENERATE_RTF \addindex GENERATE_RTF
If the \c GENERATE_RTF tag is set to \c YES Doxygen will generate RTF output. 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 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 output is optimised for Word 97 and may not look too pretty with
other readers/editors. other readers/editors.
\anchor cfg_rtf_output \anchor cfg_rtf_output
<dt>\c RTF_OUTPUT <dd> <dt>\c RTF_OUTPUT <dd>
...@@ -772,9 +776,9 @@ in HTML. ...@@ -772,9 +776,9 @@ in HTML.
</dl> </dl>
\subsection man_output Man page related options \subsection man_output Man page related options
\anchor cfg_generate_man
<dl> <dl>
\anchor cfg_generate_man
<dt>\c GENERATE_MAN <dd> <dt>\c GENERATE_MAN <dd>
\addindex GENERATE_MAN \addindex GENERATE_MAN
If the \c GENERATE_MAN tag is set to \c YES (the default) Doxygen will If the \c GENERATE_MAN tag is set to \c YES (the default) Doxygen will
...@@ -797,9 +801,9 @@ in HTML. ...@@ -797,9 +801,9 @@ in HTML.
</dl> </dl>
\subsection config_prepro Preprocessor related options \subsection config_prepro Preprocessor related options
\anchor cfg_enable_preprocessing
<dl> <dl>
\anchor cfg_enable_preprocessing
<dt>\c ENABLE_PREPROCESSING <dd> <dt>\c ENABLE_PREPROCESSING <dd>
\addindex ENABLE_PREPROCESSING \addindex ENABLE_PREPROCESSING
If the \c ENABLE_PREPROCESSING tag is set to \c YES (the default) Doxygen will If the \c ENABLE_PREPROCESSING tag is set to \c YES (the default) Doxygen will
...@@ -843,11 +847,10 @@ in HTML. ...@@ -843,11 +847,10 @@ in HTML.
\c PREDEFINED tag. \c PREDEFINED tag.
</dl> </dl>
\subsection config_extref External reference options \subsection config_extref External reference options
\anchor cfg_tagfiles
<dl> <dl>
\anchor cfg_tagfiles
<dt>\c TAGFILES <dd> <dt>\c TAGFILES <dd>
\addindex TAGFILES \addindex TAGFILES
The \c TAGFILES tag can be used to specify one or more tagfiles. The \c TAGFILES tag can be used to specify one or more tagfiles.
...@@ -896,9 +899,9 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -896,9 +899,9 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
</dl> </dl>
\subsection config_dot Dot options \subsection config_dot Dot options
\anchor cfg_have_dot
<dl> <dl>
\anchor cfg_have_dot
<dt>\c HAVE_DOT <dd> <dt>\c HAVE_DOT <dd>
\addindex HAVE_DOT \addindex HAVE_DOT
If you set the \c HAVE_DOT tag to \c YES then doxygen will assume the dot tool is 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" ... </pre> ...@@ -910,10 +913,10 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\anchor cfg_class_graph \anchor cfg_class_graph
<dt>\c CLASS_GRAPH <dd> <dt>\c CLASS_GRAPH <dd>
\addindex CLASS_GRAPH \addindex CLASS_GRAPH
If the \c CLASS_GRAPH and \c HAVE_DOT tags are set to \c YES then doxygen 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 will generate a graph for each documented class showing the direct and
indirect inheritance relations. Setting this tag to \c YES will force the indirect inheritance relations. Setting this tag to \c YES will force the
the \c CLASS_DIAGRAMS tag to NO. the \c CLASS_DIAGRAMS tag to NO.
\anchor cfg_collaboration_graph \anchor cfg_collaboration_graph
<dt>\c COLLABORATION_GRAPH <dd> <dt>\c COLLABORATION_GRAPH <dd>
...@@ -939,9 +942,9 @@ the \c CLASS_DIAGRAMS tag to NO. ...@@ -939,9 +942,9 @@ the \c CLASS_DIAGRAMS tag to NO.
</dl> </dl>
\subsection config_search Search engine options \subsection config_search Search engine options
\anchor cfg_searchengine
<dl> <dl>
\anchor cfg_searchengine
<dt>\c SEARCHENGINE <dd> <dt>\c SEARCHENGINE <dd>
\addindex SEARCHENGINE \addindex SEARCHENGINE
The \c SEARCHENGINE tag specifies whether or not a The \c SEARCHENGINE tag specifies whether or not a
......
...@@ -149,7 +149,7 @@ QDict, QString, QArray, QTextStream, QRegExp etc. ...@@ -149,7 +149,7 @@ QDict, QString, QArray, QTextStream, QRegExp etc.
The GUI front-end doxywizard uses Qt for... well... the GUI! The GUI front-end doxywizard uses Qt for... well... the GUI!
<li><b>Can use doxygen on my Java code?</b> <li><b>Can I use doxygen on my Java code?</b>
No, at the moment there is no support for Java. I suggest to No, at the moment there is no support for Java. I suggest to
use Sun's JavaDoc instead. use Sun's JavaDoc instead.
......
...@@ -163,6 +163,7 @@ Thanks go to: ...@@ -163,6 +163,7 @@ Thanks go to:
PDF links, and the configuration generator. PDF links, and the configuration generator.
<li>Matthias Andree for providing a .spec script for building rpms from the <li>Matthias Andree for providing a .spec script for building rpms from the
sources. sources.
<li>Tim Mensch for adding the todo command.
<li>Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon, <li>Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon,
Vlastimil Havran, Ahmed Also Faisal, Alessandro Falappa, Kenji Nagamatsu, Vlastimil Havran, Ahmed Also Faisal, Alessandro Falappa, Kenji Nagamatsu,
Francisco Oltra Thennet, Olli Korhonen for providing translations into Francisco Oltra Thennet, Olli Korhonen for providing translations into
...@@ -236,6 +237,7 @@ Peter Garner, ...@@ -236,6 +237,7 @@ Peter Garner,
Fred Labrosse, Fred Labrosse,
Frank Schimmel, Frank Schimmel,
Reinhard Nissl, Reinhard Nissl,
Alexander Gidon,
and many others for suggestions, patches and bug reports. and many others for suggestions, patches and bug reports.
</ul> </ul>
*/ */
......
Name: doxygen Name: doxygen
Version: 1.1.3-20000522 Version: 1.1.3-20000528
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -710,7 +710,6 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -710,7 +710,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!inheritanceGraph.isTrivial()) if (!inheritanceGraph.isTrivial())
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.startDotGraph(); ol.startDotGraph();
parseText(ol,theTranslator->trClassDiagram(name())); parseText(ol,theTranslator->trClassDiagram(name()));
...@@ -735,7 +734,6 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -735,7 +734,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!usageImplGraph.isTrivial()) if (!usageImplGraph.isTrivial())
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.startDotGraph(); ol.startDotGraph();
parseText(ol,theTranslator->trCollaborationDiagram(name())); parseText(ol,theTranslator->trCollaborationDiagram(name()));
...@@ -822,7 +820,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -822,7 +820,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.writeAnchor("_details"); ol.writeAnchor(0,"_details");
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); parseText(ol,theTranslator->trDetailedDescription());
......
...@@ -304,7 +304,7 @@ static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0) ...@@ -304,7 +304,7 @@ static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0)
//if (latexOn) ol.disable(OutputGenerator::Latex); //if (latexOn) ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.writeAnchor(anchor); ol.writeAnchor(0,anchor);
//if (latexOn) ol.enable(OutputGenerator::Latex); //if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
g_anchorCount++; g_anchorCount++;
...@@ -347,7 +347,7 @@ static bool getLink(const char *className, ...@@ -347,7 +347,7 @@ static bool getLink(const char *className,
result.pushGeneratorState(); result.pushGeneratorState();
//if (latexEnabled) result.disable(OutputGenerator::Latex); //if (latexEnabled) result.disable(OutputGenerator::Latex);
result.disable(OutputGenerator::Latex); result.disable(OutputGenerator::Latex);
result.writeAnchor(anchor); result.writeAnchor(0,anchor);
result.popGeneratorState(); result.popGeneratorState();
//if (latexEnabled) result.enable(OutputGenerator::Latex); //if (latexEnabled) result.enable(OutputGenerator::Latex);
g_anchorCount++; g_anchorCount++;
......
...@@ -47,6 +47,9 @@ void warn_cont(const char *fmt, ...) ...@@ -47,6 +47,9 @@ void warn_cont(const char *fmt, ...)
vfprintf(stderr, fmt, args); vfprintf(stderr, fmt, args);
va_end(args); va_end(args);
} }
void initWarningFormat()
{
}
#else #else
#include "doxygen.h" #include "doxygen.h"
#include "message.h" #include "message.h"
...@@ -1842,7 +1845,7 @@ void configStrToVal() ...@@ -1842,7 +1845,7 @@ void configStrToVal()
static void substEnvVarsInString(QCString &s) static void substEnvVarsInString(QCString &s)
{ {
QRegExp re("\\$([a-z_A-Z0-9]+)"); static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)");
int p=0; int p=0;
int i,l; int i,l;
//printf("substEnvVarInString(%s) start\n",s.data()); //printf("substEnvVarInString(%s) start\n",s.data());
...@@ -2206,19 +2209,19 @@ void checkConfig() ...@@ -2206,19 +2209,19 @@ void checkConfig()
} }
// add default pattern if needed // add default pattern if needed
if (Config::filePatternList.count()==0) if (Config::filePatternList.isEmpty())
{ {
Config::filePatternList.append("*"); Config::filePatternList="*";
} }
// add default pattern if needed // add default pattern if needed
if (Config::examplePatternList.count()==0) if (Config::examplePatternList.isEmpty())
{ {
Config::examplePatternList.append("*"); Config::examplePatternList="*";
} }
// add default pattern if needed // add default pattern if needed
//if (Config::imagePatternList.count()==0) //if (Config::imagePatternList.isEmpty())
//{ //{
// Config::imagePatternList.append("*"); // Config::imagePatternList.append("*");
//} //}
...@@ -2247,7 +2250,7 @@ void checkConfig() ...@@ -2247,7 +2250,7 @@ void checkConfig()
// check documentation URL // check documentation URL
if (Config::docURL.isEmpty()) 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://") else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
{ {
......
...@@ -101,7 +101,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName) ...@@ -101,7 +101,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
return TRUE; 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); QFile f(fileName);
if (!f.open(IO_ReadOnly)) return FALSE; if (!f.open(IO_ReadOnly)) return FALSE;
...@@ -113,13 +113,34 @@ static bool readBoundingBox(const char *fileName,int *width,int *height) ...@@ -113,13 +113,34 @@ static bool readBoundingBox(const char *fileName,int *width,int *height)
buf[numBytes-1]='\0'; buf[numBytes-1]='\0';
if (strncmp(buf,"\tgraph [bb",10)==0) if (strncmp(buf,"\tgraph [bb",10)==0)
{ {
int x,y,w,h; int x,y;
if (sscanf(buf,"\tgraph [bb= \"%d,%d,%d,%d\"];",&x,&y,&w,&h)!=4) 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; return FALSE;
} }
*width = w*96/72; // 96 pixels/inch, 72 points/inch
*height = h*96/72; // 96 pixels/inch, 72 points/inch
return TRUE; return TRUE;
} }
} }
...@@ -290,7 +311,9 @@ static QCString convertLabel(const QCString &l) ...@@ -290,7 +311,9 @@ static QCString convertLabel(const QCString &l)
return result; return result;
} }
void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren) void DotNode::writeBox(QTextStream &t,
GraphOutputFormat format,
bool hasNonReachableChildren)
{ {
const char *labCol = const char *labCol =
m_url.isEmpty() ? "grey" : // non link m_url.isEmpty() ? "grey" : // non link
...@@ -299,7 +322,8 @@ void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren) ...@@ -299,7 +322,8 @@ void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren)
); );
t << " Node" << m_number << " [shape=\"box\",label=\"" t << " Node" << m_number << " [shape=\"box\",label=\""
<< convertLabel(m_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 << "\""; t << ",color=\"" << labCol << "\"";
if (m_isRoot) if (m_isRoot)
{ {
...@@ -312,8 +336,13 @@ void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren) ...@@ -312,8 +336,13 @@ void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren)
t << "];" << endl; t << "];" << endl;
} }
void DotNode::writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown, void DotNode::writeArrow(QTextStream &t,
bool pointBack) GraphOutputFormat format,
DotNode *cn,
EdgeInfo *ei,
bool topDown,
bool pointBack
)
{ {
t << " Node"; t << " Node";
if (topDown) t << cn->number(); else t << m_number; if (topDown) t << cn->number(); else t << m_number;
...@@ -327,11 +356,16 @@ void DotNode::writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown, ...@@ -327,11 +356,16 @@ void DotNode::writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown,
{ {
t << ",label=\"" << ei->m_label << "\""; t << ",label=\"" << ei->m_label << "\"";
} }
t << ",fontname=\"doxfont\""; if (format==GIF) t << ",fontname=\"doxfont\"";
t << "];" << endl; 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()); //printf("DotNode::write(%d) name=%s\n",distance,m_label.data());
if (m_written) return; // node already written to the output 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) ...@@ -347,7 +381,7 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance)
if (cn->m_distance>distance) hasNonReachableChildren=TRUE; if (cn->m_distance>distance) hasNonReachableChildren=TRUE;
} }
} }
writeBox(t,hasNonReachableChildren); writeBox(t,format,hasNonReachableChildren);
m_written=TRUE; m_written=TRUE;
if (nl) if (nl)
{ {
...@@ -360,9 +394,9 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance) ...@@ -360,9 +394,9 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance)
{ {
if (cn->m_distance<=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 else // render parents
...@@ -374,12 +408,13 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance) ...@@ -374,12 +408,13 @@ void DotNode::write(QTextStream &t,bool topDown,bool toChildren,int distance)
if (pn->m_distance<=distance) if (pn->m_distance<=distance)
{ {
writeArrow(t, writeArrow(t,
format,
pn, pn,
pn->m_edgeInfo->at(pn->m_children->findRef(this)), pn->m_edgeInfo->at(pn->m_children->findRef(this)),
FALSE 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) ...@@ -535,13 +570,13 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
DotNode *node; DotNode *node;
for (;(node=dnli2.current());++dnli2) 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; t << "}" << endl;
f.close(); f.close();
QCString dotCmd; 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()); //printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if (system(dotCmd)!=0) if (system(dotCmd)!=0)
{ {
...@@ -549,7 +584,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -549,7 +584,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
out << "</table>" << endl; out << "</table>" << endl;
return; 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()); //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data());
if (system(dotCmd)!=0) if (system(dotCmd)!=0)
{ {
...@@ -871,8 +906,13 @@ DotClassGraph::~DotClassGraph() ...@@ -871,8 +906,13 @@ DotClassGraph::~DotClassGraph()
delete m_usedNodes; delete m_usedNodes;
} }
void writeDotGraph(DotNode *root,const QCString &baseName, void writeDotGraph(DotNode *root,
bool lrRank,bool renderParents,int distance) GraphOutputFormat format,
const QCString &baseName,
bool lrRank,
bool renderParents,
int distance
)
{ {
// generate the graph description for dot // generate the graph description for dot
//printf("writeDotGraph(%s,%d)\n",baseName.data(),renderParents); //printf("writeDotGraph(%s,%d)\n",baseName.data(),renderParents);
...@@ -888,7 +928,7 @@ void writeDotGraph(DotNode *root,const QCString &baseName, ...@@ -888,7 +928,7 @@ void writeDotGraph(DotNode *root,const QCString &baseName,
t << " rankdir=LR;" << endl; t << " rankdir=LR;" << endl;
} }
root->clearWriteFlag(); root->clearWriteFlag();
root->write(t,TRUE,TRUE,distance); root->write(t,format,TRUE,TRUE,distance);
if (renderParents && root->m_parents) if (renderParents && root->m_parents)
{ {
//printf("rendering parents!\n"); //printf("rendering parents!\n");
...@@ -899,12 +939,13 @@ void writeDotGraph(DotNode *root,const QCString &baseName, ...@@ -899,12 +939,13 @@ void writeDotGraph(DotNode *root,const QCString &baseName,
if (pn->m_distance<=distance) if (pn->m_distance<=distance)
{ {
root->writeArrow(t, root->writeArrow(t,
format,
pn, pn,
pn->m_edgeInfo->at(pn->m_children->findRef(root)), pn->m_edgeInfo->at(pn->m_children->findRef(root)),
FALSE FALSE
); );
} }
pn->write(t,TRUE,FALSE,distance); pn->write(t,format,TRUE,FALSE,distance);
} }
} }
t << "}" << endl; t << "}" << endl;
...@@ -912,9 +953,11 @@ void writeDotGraph(DotNode *root,const QCString &baseName, ...@@ -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, const QCString &baseName,
QDir &thisDir, QDir &thisDir,
GraphOutputFormat format,
bool lrRank=FALSE, bool lrRank=FALSE,
bool renderParents=FALSE bool renderParents=FALSE
) )
...@@ -930,11 +973,11 @@ static void findMaximalDotGraph(DotNode *root,int maxDist, ...@@ -930,11 +973,11 @@ static void findMaximalDotGraph(DotNode *root,int maxDist,
// sized image (dimensions: maxImageWidth, maxImageHeight) // sized image (dimensions: maxImageWidth, maxImageHeight)
do do
{ {
writeDotGraph(root,baseName,lrRank,renderParents,curDistance); writeDotGraph(root,format,baseName,lrRank,renderParents,curDistance);
QCString dotCmd; QCString dotCmd;
// create annotated dot file // 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) if (system(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
...@@ -942,7 +985,9 @@ static void findMaximalDotGraph(DotNode *root,int maxDist, ...@@ -942,7 +985,9 @@ static void findMaximalDotGraph(DotNode *root,int maxDist,
} }
// extract bounding box from the result // 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); //printf("Found bounding box (%d,%d)\n",width,height);
lastFit=(width<maxImageWidth && height<maxImageHeight); lastFit=(width<maxImageWidth && height<maxImageHeight);
...@@ -968,6 +1013,7 @@ static void findMaximalDotGraph(DotNode *root,int maxDist, ...@@ -968,6 +1013,7 @@ static void findMaximalDotGraph(DotNode *root,int maxDist,
{ {
//printf("Using last fit %d\n",minDistance); //printf("Using last fit %d\n",minDistance);
writeDotGraph(root, writeDotGraph(root,
format,
baseName, baseName,
lrRank || (curDistance==1 && width>maxImageWidth), lrRank || (curDistance==1 && width>maxImageWidth),
renderParents, renderParents,
...@@ -982,8 +1028,9 @@ QCString DotClassGraph::diskName() const ...@@ -982,8 +1028,9 @@ QCString DotClassGraph::diskName() const
} }
void DotClassGraph::writeGraph(QTextStream &out, void DotClassGraph::writeGraph(QTextStream &out,
const char *path, GraphOutputFormat format,
bool isTBRank) const char *path,
bool isTBRank)
{ {
QDir d(path); QDir d(path);
// store the original directory // store the original directory
...@@ -1014,38 +1061,58 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1014,38 +1061,58 @@ void DotClassGraph::writeGraph(QTextStream &out,
break; break;
} }
// TODO: make sure curDistance>0
findMaximalDotGraph(m_startNode,m_maxDistance,baseName, findMaximalDotGraph(m_startNode,m_maxDistance,baseName,
thisDir,!isTBRank,m_graphType==Inheritance); thisDir,format,!isTBRank,m_graphType==Inheritance);
// run dot to create a .gif image if (format==GIF) // 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"); QCString dotCmd;
return; 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 << "<p><center><img src=\"" << baseName << ".gif\" border=\"0\" usemap=\"#"
<< m_startNode->m_label << "_" << mapName << "\"></center>" << endl;
out << "<map name=\"" << m_startNode->m_label << "_" << mapName << "\">" << endl;
convertMapFile(out,baseName+".map");
out << "</map><p>" << endl;
thisDir.remove(baseName+".map");
} }
//printf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data()); else if (format==EPS) // run dot to create a .eps image
// 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("Problems running dot. Check your installation!\n"); QCString dotCmd;
return; 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()); thisDir.remove(baseName+".dot");
out << "<p><center><img src=\"" << baseName << ".gif\" border=\"0\" usemap=\"#"
<< m_startNode->m_label << "_" << mapName << "\"></center>" << endl;
out << "<map name=\"" << m_startNode->m_label << "_" << mapName << "\">" << endl;
convertMapFile(out,baseName+".map");
out << "</map><p>" << endl;
//thisDir.remove(baseName+".dot");
thisDir.remove(baseName+".map");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
} }
...@@ -1130,7 +1197,10 @@ QCString DotInclDepGraph::diskName() const ...@@ -1130,7 +1197,10 @@ QCString DotInclDepGraph::diskName() const
return m_diskName + "_incldep"; 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); QDir d(path);
// store the original directory // store the original directory
...@@ -1144,35 +1214,65 @@ void DotInclDepGraph::writeGraph(QTextStream &out,const char *path) ...@@ -1144,35 +1214,65 @@ void DotInclDepGraph::writeGraph(QTextStream &out,const char *path)
QDir thisDir; QDir thisDir;
QCString baseName=m_diskName+"_incldep"; QCString baseName=m_diskName+"_incldep";
findMaximalDotGraph(m_startNode,m_maxDistance,baseName,thisDir);
// run dot to create a .gif image findMaximalDotGraph(m_startNode,m_maxDistance,baseName,thisDir,format);
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());
// run dot again to create an image map if (format==GIF)
dotCmd.sprintf("dot -Timap %s.dot -o %s.map",baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); // run dot to create a .gif image
return; 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 << "<p><center><img src=\"" << baseName << ".gif\" border=\"0\" usemap=\"#" // 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("Problems running dot. Check your installation!\n");
return;
}
out << "<p><center><img src=\"" << baseName << ".gif\" border=\"0\" usemap=\"#"
<< m_startNode->m_label << "_map\"></center>" << endl; << m_startNode->m_label << "_map\"></center>" << endl;
out << "<map name=\"" << m_startNode->m_label << "_map\">" << endl; out << "<map name=\"" << m_startNode->m_label << "_map\">" << endl;
convertMapFile(out,baseName+".map"); convertMapFile(out,baseName+".map");
out << "</map><p>" << endl; out << "</map><p>" << 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+".dot");
thisDir.remove(baseName+".map");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
} }
......
...@@ -25,6 +25,8 @@ class FileDef; ...@@ -25,6 +25,8 @@ class FileDef;
class QTextStream; class QTextStream;
class DotNodeList; class DotNodeList;
enum GraphOutputFormat { GIF , EPS };
struct EdgeInfo struct EdgeInfo
{ {
enum Colors { Blue=0, Green=1, Red=2, Black=3, Grey=4 }; enum Colors { Blue=0, Green=1, Red=2, Black=3, Grey=4 };
...@@ -44,8 +46,13 @@ class DotNode ...@@ -44,8 +46,13 @@ class DotNode
friend class DotClassGraph; friend class DotClassGraph;
friend class DotInclDepGraph; friend class DotInclDepGraph;
friend class DotNodeList; friend class DotNodeList;
friend void writeDotGraph(DotNode *root,const QCString &baseName, friend void writeDotGraph(
bool lrRank,bool renderParents,int distance); DotNode *root,
GraphOutputFormat f,
const QCString &baseName,
bool lrRank,
bool renderParents,
int distance);
public: public:
DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE); DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE);
~DotNode(); ~DotNode();
...@@ -62,15 +69,17 @@ class DotNode ...@@ -62,15 +69,17 @@ class DotNode
void removeChild(DotNode *n); void removeChild(DotNode *n);
void removeParent(DotNode *n); void removeParent(DotNode *n);
int number() const { return m_number; } 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; int m_subgraphId;
void clearWriteFlag(); void clearWriteFlag();
private: private:
void colorConnectedNodes(int curColor); void colorConnectedNodes(int curColor);
void writeBox(QTextStream &t,bool hasNonReachableChildren); void writeBox(QTextStream &t,GraphOutputFormat f,
void writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown, bool hasNonReachableChildren);
bool pointBack=TRUE); void writeArrow(QTextStream &t,GraphOutputFormat f,DotNode *cn,
EdgeInfo *ei,bool topDown, bool pointBack=TRUE);
const DotNode *findDocNode() const; // only works for acyclic graphs! const DotNode *findDocNode() const; // only works for acyclic graphs!
int m_number; int m_number;
QCString m_label; //!< label text QCString m_label; //!< label text
...@@ -108,7 +117,8 @@ class DotClassGraph ...@@ -108,7 +117,8 @@ class DotClassGraph
DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth=1000); DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth=1000);
~DotClassGraph(); ~DotClassGraph();
bool isTrivial() const; 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; QCString diskName() const;
private: private:
...@@ -129,7 +139,7 @@ class DotInclDepGraph ...@@ -129,7 +139,7 @@ class DotInclDepGraph
public: public:
DotInclDepGraph(FileDef *fd); DotInclDepGraph(FileDef *fd);
~DotInclDepGraph(); ~DotInclDepGraph();
void writeGraph(QTextStream &t, const char *path); void writeGraph(QTextStream &t, GraphOutputFormat f,const char *path);
bool isTrivial() const; bool isTrivial() const;
QCString diskName() const; QCString diskName() const;
......
...@@ -696,6 +696,8 @@ void buildNamespaceList(Entry *root) ...@@ -696,6 +696,8 @@ void buildNamespaceList(Entry *root)
} }
} }
//----------------------------------------------------------------------
void findUsingDirectives(Entry *root) void findUsingDirectives(Entry *root)
{ {
if (root->section==Entry::USINGDIR_SEC) if (root->section==Entry::USINGDIR_SEC)
...@@ -802,6 +804,83 @@ void findUsingDirectives(Entry *root) ...@@ -802,6 +804,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( static MemberDef *addVariableToClass(
...@@ -2131,7 +2210,7 @@ void addMemberDocs(Entry *root, ...@@ -2131,7 +2210,7 @@ void addMemberDocs(Entry *root,
// find a class definition given the scope name and (optionally) a // find a class definition given the scope name and (optionally) a
// template list specifier // template list specifier
static ClassDef *findClassDefinition(const char *scopeName,const char *classTempList) static ClassDef *findSimpleClassDefinition(const char *scopeName,const char *classTempList)
{ {
ClassDef *tcd=0; ClassDef *tcd=0;
if (classTempList) // try to find the correct specialization if (classTempList) // try to find the correct specialization
...@@ -2150,6 +2229,68 @@ static ClassDef *findClassDefinition(const char *scopeName,const char *classTemp ...@@ -2150,6 +2229,68 @@ static ClassDef *findClassDefinition(const char *scopeName,const char *classTemp
return tcd; 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 // Adds the documentation contained in `root' to a global function
...@@ -2659,33 +2800,11 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, ...@@ -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()); //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; ClassDef *tcd=0;
tcd = findClassDefinition(scopeName,classTempList); bool ambig;
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
if (tcd==0) NamespaceDef *nd=0;
{ if (!namespaceName.isEmpty()) nd=namespaceDict[namespaceName];
bool ambig; tcd = findClassDefinition(fd,nd,scopeName,classTempList);
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);
}
}
}
if (cd && tcd==cd) // member's classes match if (cd && tcd==cd) // member's classes match
{ {
...@@ -4969,7 +5088,10 @@ int main(int argc,char **argv) ...@@ -4969,7 +5088,10 @@ int main(int argc,char **argv)
* Initialize some global constants * Initialize some global constants
**************************************************************************/ **************************************************************************/
spaces.fill(' ',Config::tabSize); spaces.resize(Config::tabSize+1);
int sp;for (sp=0;sp<Config::tabSize;sp++) spaces.at(sp)=' ';
spaces.at(Config::tabSize)='\0';
compoundKeywordDict.insert("class",(void *)8); compoundKeywordDict.insert("class",(void *)8);
compoundKeywordDict.insert("struct",(void *)8); compoundKeywordDict.insert("struct",(void *)8);
compoundKeywordDict.insert("union",(void *)8); compoundKeywordDict.insert("union",(void *)8);
...@@ -5134,6 +5256,7 @@ int main(int argc,char **argv) ...@@ -5134,6 +5256,7 @@ int main(int argc,char **argv)
msg("Building class list...\n"); msg("Building class list...\n");
buildClassList(root); buildClassList(root);
findUsingDeclarations(root);
msg("Building example list...\n"); msg("Building example list...\n");
buildExampleList(root); buildExampleList(root);
......
...@@ -141,7 +141,8 @@ class Entry ...@@ -141,7 +141,8 @@ class Entry
GROUPDOC_SEC = 0x01000000, GROUPDOC_SEC = 0x01000000,
USINGDIR_SEC = 0x01100000, USINGDIR_SEC = 0x01100000,
MAINPAGEDOC_SEC = 0x01200000, MAINPAGEDOC_SEC = 0x01200000,
MEMBERGRP_SEC = 0x01300000 MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000
}; };
Entry(); Entry();
......
...@@ -50,7 +50,8 @@ FileDef::FileDef(const char *p,const char *nm,const char *ref) ...@@ -50,7 +50,8 @@ FileDef::FileDef(const char *p,const char *nm,const char *ref)
namespaceDict = new NamespaceDict(7); namespaceDict = new NamespaceDict(7);
srcDefDict = 0; srcDefDict = 0;
srcAnchorDict = 0; srcAnchorDict = 0;
usingList = 0; usingDirList = 0;
usingDeclList = 0;
isSource = FALSE; isSource = FALSE;
docname = nm; docname = nm;
if (Config::fullPathNameFlag) if (Config::fullPathNameFlag)
...@@ -72,7 +73,8 @@ FileDef::~FileDef() ...@@ -72,7 +73,8 @@ FileDef::~FileDef()
delete namespaceDict; delete namespaceDict;
delete srcDefDict; delete srcDefDict;
delete srcAnchorDict; delete srcAnchorDict;
delete usingList; delete usingDirList;
delete usingDeclList;
delete memberGroupList; delete memberGroupList;
delete memberGroupDict; delete memberGroupDict;
} }
...@@ -189,7 +191,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -189,7 +191,7 @@ void FileDef::writeDocumentation(OutputList &ol)
DotInclDepGraph incDepGraph(this); DotInclDepGraph incDepGraph(this);
if (!incDepGraph.isTrivial()) if (!incDepGraph.isTrivial())
{ {
ol.disableAllBut(OutputGenerator::Html); ol.disable(OutputGenerator::Man);
ol.newParagraph(); ol.newParagraph();
ol.startInclDepGraph(); ol.startInclDepGraph();
parseText(ol,theTranslator->trInclDepGraph(name())); parseText(ol,theTranslator->trInclDepGraph(name()));
...@@ -287,7 +289,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -287,7 +289,7 @@ void FileDef::writeDocumentation(OutputList &ol)
//if (latexOn) ol.disable(OutputGenerator::Latex); //if (latexOn) ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.writeAnchor("_details"); ol.writeAnchor(0,"_details");
//if (latexOn) ol.enable(OutputGenerator::Latex); //if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
...@@ -533,11 +535,20 @@ QCString FileDef::getSourceAnchor(int lineNr) ...@@ -533,11 +535,20 @@ QCString FileDef::getSourceAnchor(int lineNr)
void FileDef::addUsingDirective(NamespaceDef *nd) 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) void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local)
......
...@@ -117,7 +117,9 @@ class FileDef : public Definition ...@@ -117,7 +117,9 @@ class FileDef : public Definition
void computeAnchors(); void computeAnchors();
void addUsingDirective(NamespaceDef *nd); 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; } void setGenerateSource(bool b) { isSource=b; }
bool generateSource() const { return isSource; } bool generateSource() const { return isSource; }
...@@ -142,7 +144,8 @@ class FileDef : public Definition ...@@ -142,7 +144,8 @@ class FileDef : public Definition
QList<IncludeInfo> *includeList; QList<IncludeInfo> *includeList;
NamespaceDict *namespaceDict; NamespaceDict *namespaceDict;
NamespaceList *namespaceList; NamespaceList *namespaceList;
NamespaceList *usingList; NamespaceList *usingDirList;
ClassList *usingDeclList;
//DefineList *defineList; //DefineList *defineList;
QCString path; QCString path;
QCString filepath; QCString filepath;
......
...@@ -38,7 +38,7 @@ FileName::~FileName() ...@@ -38,7 +38,7 @@ FileName::~FileName()
void FileName::generateDiskNames() void FileName::generateDiskNames()
{ {
QCString commonPrefix; //QCString commonPrefix;
FileDef *fd=first(); FileDef *fd=first();
int count=0; int count=0;
while (fd) { if (!fd->isReference()) count++; fd=next(); } while (fd) { if (!fd->isReference()) count++; fd=next(); }
......
...@@ -280,7 +280,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -280,7 +280,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.writeAnchor("_details"); ol.writeAnchor(0,"_details");
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); parseText(ol,theTranslator->trDetailedDescription());
......
...@@ -173,7 +173,7 @@ void HtmlGenerator::endFile() ...@@ -173,7 +173,7 @@ void HtmlGenerator::endFile()
void HtmlGenerator::startProjectNumber() void HtmlGenerator::startProjectNumber()
{ {
t << "<h3 align=center>"; t << "<h3 align=\"center\">";
} }
void HtmlGenerator::endProjectNumber() void HtmlGenerator::endProjectNumber()
...@@ -230,12 +230,11 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -230,12 +230,11 @@ void HtmlGenerator::writeStyleInfo(int part)
void HtmlGenerator::startDoxyAnchor(const char *,const char *, void HtmlGenerator::startDoxyAnchor(const char *,const char *,
const char *anchor, const char *name) const char *anchor, const char *name)
{ {
t << "<a name=\"" << anchor << "\" doxytag=\"" << name << "\">"; t << "<a name=\"" << anchor << "\" doxytag=\"" << name << "\"></a>";
} }
void HtmlGenerator::endDoxyAnchor() void HtmlGenerator::endDoxyAnchor()
{ {
t << "</a>" << endl;
} }
void HtmlGenerator::newParagraph() void HtmlGenerator::newParagraph()
...@@ -752,10 +751,10 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const ...@@ -752,10 +751,10 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const
{ {
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;) DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
t << "<p>" << endl; t << "<p>" << endl;
t << "<table width=100% cellpadding=2 cellspacing=0 border=0>" << endl; t << "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">" << endl;
t << " <tr>" << endl; t << " <tr>" << endl;
t << " <td class=\"md\"><b>" << endl; t << " <td class=\"md\"><b>" << endl;
t << " <table cellspadding=0 cellspacing=0 border=0>" << endl; t << " <table cellspadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl;
} }
void HtmlGenerator::startMemberDocPrefixItem() void HtmlGenerator::startMemberDocPrefixItem()
...@@ -837,7 +836,7 @@ void HtmlGenerator::startDotGraph() ...@@ -837,7 +836,7 @@ void HtmlGenerator::startDotGraph()
void HtmlGenerator::endDotGraph(DotClassGraph &g) void HtmlGenerator::endDotGraph(DotClassGraph &g)
{ {
g.writeGraph(t,Config::htmlOutputDir); g.writeGraph(t,GIF,Config::htmlOutputDir);
} }
void HtmlGenerator::startInclDepGraph() void HtmlGenerator::startInclDepGraph()
...@@ -846,7 +845,7 @@ void HtmlGenerator::startInclDepGraph() ...@@ -846,7 +845,7 @@ void HtmlGenerator::startInclDepGraph()
void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g)
{ {
g.writeGraph(t,Config::htmlOutputDir); g.writeGraph(t,GIF,Config::htmlOutputDir);
} }
void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g) void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g)
...@@ -865,7 +864,7 @@ void HtmlGenerator::startMemberGroupHeader() ...@@ -865,7 +864,7 @@ void HtmlGenerator::startMemberGroupHeader()
//t << " <td class=\"groupLine\"><img src=\"null.gif\" width=1></td>" << endl; //t << " <td class=\"groupLine\"><img src=\"null.gif\" width=1></td>" << endl;
//t << " <td><div class=\"groupHeader\">&nbsp;&nbsp;"; //t << " <td><div class=\"groupHeader\">&nbsp;&nbsp;";
t << "<tr><td colspan=2><div class=\"groupHeader\">"; t << "<tr><td colspan=\"2\"><div class=\"groupHeader\">";
} }
void HtmlGenerator::endMemberGroupHeader() void HtmlGenerator::endMemberGroupHeader()
...@@ -885,7 +884,7 @@ void HtmlGenerator::endMemberGroupHeader() ...@@ -885,7 +884,7 @@ void HtmlGenerator::endMemberGroupHeader()
void HtmlGenerator::startMemberGroupDocs() void HtmlGenerator::startMemberGroupDocs()
{ {
//t << "<tr><td colspan=2><img src=\"null.gif\" height=4></td></tr>" << endl; //t << "<tr><td colspan=2><img src=\"null.gif\" height=4></td></tr>" << endl;
t << "<tr><td colspan=2><div class=\"groupText\">"; t << "<tr><td colspan=\"2\"><div class=\"groupText\">";
} }
void HtmlGenerator::endMemberGroupDocs() void HtmlGenerator::endMemberGroupDocs()
......
...@@ -111,7 +111,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -111,7 +111,7 @@ class HtmlGenerator : public OutputGenerator
void endMemberDescription(); void endMemberDescription();
void writeRuler() { t << "<hr>"; } void writeRuler() { t << "<hr>"; }
void writeAnchor(const char *name) void writeAnchor(const char *,const char *name)
{ t << "<a name=\"" << name <<"\"></a>"; } { t << "<a name=\"" << name <<"\"></a>"; }
void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; } void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; }
void endCodeFragment() { t << "</div></pre>"; } // <- I know this is void endCodeFragment() { t << "</div></pre>"; } // <- I know this is
...@@ -142,8 +142,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -142,8 +142,8 @@ class HtmlGenerator : public OutputGenerator
void startDoxyAnchor(const char *fName,const char *clName, void startDoxyAnchor(const char *fName,const char *clName,
const char *anchor,const char *name); const char *anchor,const char *name);
void endDoxyAnchor(); void endDoxyAnchor();
void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\">"; } void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; }
void endCodeAnchor() { t << "</a>"; } void endCodeAnchor() { }
void writeLatexSpacing() {} void writeLatexSpacing() {}
//void writeLatexLabel(const char *,const char *) {} //void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file, void writeStartAnnoItem(const char *type,const char *file,
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "diagram.h" #include "diagram.h"
#include "language.h" #include "language.h"
#include "version.h" #include "version.h"
#include "dot.h"
static QCString filterTitle(const char *s) static QCString filterTitle(const char *s)
{ {
...@@ -549,7 +550,7 @@ void LatexGenerator::writeStyleInfo(int part) ...@@ -549,7 +550,7 @@ void LatexGenerator::writeStyleInfo(int part)
{ {
case 0: case 0:
{ {
QCString pname=Config::projectName.stripWhiteSpace(); //QCString pname=Config::projectName.stripWhiteSpace();
startPlainFile("doxygen.sty"); startPlainFile("doxygen.sty");
t << "\\NeedsTeXFormat{LaTeX2e}\n"; t << "\\NeedsTeXFormat{LaTeX2e}\n";
t << "\\ProvidesPackage{doxygen}\n"; t << "\\ProvidesPackage{doxygen}\n";
...@@ -765,7 +766,8 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f, ...@@ -765,7 +766,8 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f,
{ {
t << "\\hyperlink{"; t << "\\hyperlink{";
if (f) t << f; if (f) t << f;
if (anchor) t << "_" << anchor; if (f && anchor) t << "_";
if (anchor) t << anchor;
t << "}{"; t << "}{";
docify(text); docify(text);
t << "}"; t << "}";
...@@ -910,6 +912,15 @@ void LatexGenerator::endDoxyAnchor() ...@@ -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) //void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor)
//{ //{
...@@ -939,6 +950,10 @@ void LatexGenerator::writeSection(const char *lab,const char *title,bool sub) ...@@ -939,6 +950,10 @@ void LatexGenerator::writeSection(const char *lab,const char *title,bool sub)
if (sub) t << "subsection{"; else t << "section{"; if (sub) t << "subsection{"; else t << "section{";
docify(title); docify(title);
t << "}\\label{" << lab << "}" << endl; t << "}\\label{" << lab << "}" << endl;
if (Config::pdfHyperFlag)
{
t << "\\hypertarget{" << lab << "}{}";
}
} }
void LatexGenerator::writeSectionRef(const char *,const char *lab, void LatexGenerator::writeSectionRef(const char *,const char *lab,
...@@ -955,6 +970,7 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab, ...@@ -955,6 +970,7 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
t << "}{\\ref{" << lab << "}}{}" << endl; t << "}{\\ref{" << lab << "}}{}" << endl;
} }
// TODO: remove this function
void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
const char *title) const char *title)
{ {
...@@ -1277,3 +1293,23 @@ void LatexGenerator::endMemberGroup(bool) ...@@ -1277,3 +1293,23 @@ void LatexGenerator::endMemberGroup(bool)
{ {
t << "\\end{Indent}" << endl; 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);
}
...@@ -105,7 +105,7 @@ class LatexGenerator : public OutputGenerator ...@@ -105,7 +105,7 @@ class LatexGenerator : public OutputGenerator
void insertMemberAlign() {} void insertMemberAlign() {}
void writeRuler() { t << endl << endl; /*t << "\\vspace{0.4cm}\\hrule\\vspace{0.2cm}" << endl; */ } 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 startCodeFragment() { t << "\\small\\begin{verbatim}"; }
void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; } void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
...@@ -211,10 +211,10 @@ class LatexGenerator : public OutputGenerator ...@@ -211,10 +211,10 @@ class LatexGenerator : public OutputGenerator
//static void docifyStatic(QTextStream &t,const char *str); //static void docifyStatic(QTextStream &t,const char *str);
void startDotGraph() {} void startDotGraph();
void endDotGraph(DotClassGraph &) {} void endDotGraph(DotClassGraph &);
void startInclDepGraph() {} void startInclDepGraph();
void endInclDepGraph(DotInclDepGraph &) {} void endInclDepGraph(DotInclDepGraph &);
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {} void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startTextBlock(bool) {} void startTextBlock(bool) {}
......
...@@ -103,7 +103,7 @@ class ManGenerator : public OutputGenerator ...@@ -103,7 +103,7 @@ class ManGenerator : public OutputGenerator
void endMemberGroup(bool); void endMemberGroup(bool);
void writeRuler() {} void writeRuler() {}
void writeAnchor(const char *) {} void writeAnchor(const char *,const char *) {}
void startCodeFragment(); void startCodeFragment();
void endCodeFragment(); void endCodeFragment();
void startCodeLine() {} void startCodeLine() {}
......
...@@ -250,7 +250,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -250,7 +250,7 @@ MemberDef::MemberDef(const char *df,int dl,
membTAL=0; membTAL=0;
type=substituteClassNames(t); type=substituteClassNames(t);
args=substituteClassNames(a); 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; declLine=0;
memberGroup=0; memberGroup=0;
virt=v; virt=v;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include "config.h" #include "config.h"
#include <qregexp.h> #include "util.h"
static QCString outputFormat; static QCString outputFormat;
static int warnFormatOrder; // 1 = $file,$line,$text static int warnFormatOrder; // 1 = $file,$line,$text
...@@ -62,11 +62,22 @@ void initWarningFormat() ...@@ -62,11 +62,22 @@ void initWarningFormat()
{ {
warnFormatOrder = 6; warnFormatOrder = 6;
} }
outputFormat = Config::warnFormat. outputFormat =
replace(QRegExp("\\$file"),"%s"). substitute(
replace(QRegExp("\\$text"),"%s"). substitute(
replace(QRegExp("\\$line"),"%d")+ substitute(
'\n'; Config::warnFormat,
"$file","%s"
),
"$text","%s"
),
"$line","%d"
)+'\n';
// replace(QRegExp("\\$file"),"%s").
// replace(QRegExp("\\$text"),"%s").
// replace(QRegExp("\\$line"),"%d")+
// '\n';
} }
......
...@@ -35,7 +35,8 @@ NamespaceDef::NamespaceDef(const char *df,int dl, ...@@ -35,7 +35,8 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
classList = new ClassList; classList = new ClassList;
classDict = new ClassDict(1009); classDict = new ClassDict(1009);
//memList = new MemberList; //memList = new MemberList;
usingList = 0; usingDirList = 0;
usingDeclList = 0;
setReference(ref); setReference(ref);
memberGroupList = new MemberGroupList; memberGroupList = new MemberGroupList;
memberGroupList->setAutoDelete(TRUE); memberGroupList->setAutoDelete(TRUE);
...@@ -48,7 +49,8 @@ NamespaceDef::~NamespaceDef() ...@@ -48,7 +49,8 @@ NamespaceDef::~NamespaceDef()
{ {
delete classList; delete classList;
delete classDict; delete classDict;
delete usingList; delete usingDirList;
delete usingDeclList;
delete memberGroupList; delete memberGroupList;
delete memberGroupDict; delete memberGroupDict;
} }
...@@ -182,7 +184,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -182,7 +184,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
//bool latexOn = ol.isEnabled(OutputGenerator::Latex); //bool latexOn = ol.isEnabled(OutputGenerator::Latex);
//if (latexOn) ol.disable(OutputGenerator::Latex); //if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor("_details"); ol.writeAnchor(0,"_details");
//if (latexOn) ol.enable(OutputGenerator::Latex); //if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
...@@ -293,9 +295,18 @@ int NamespaceDef::countMembers() ...@@ -293,9 +295,18 @@ int NamespaceDef::countMembers()
void NamespaceDef::addUsingDirective(NamespaceDef *nd) 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);
} }
...@@ -49,7 +49,11 @@ class NamespaceDef : public Definition ...@@ -49,7 +49,11 @@ class NamespaceDef : public Definition
void computeAnchors(); void computeAnchors();
int countMembers(); int countMembers();
void addUsingDirective(NamespaceDef *nd); 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; } //const char *getReference() { return reference; }
//bool isVisible() //bool isVisible()
//{ //{
...@@ -81,7 +85,8 @@ class NamespaceDef : public Definition ...@@ -81,7 +85,8 @@ class NamespaceDef : public Definition
QStrList files; QStrList files;
ClassList *classList; ClassList *classList;
ClassDict *classDict; ClassDict *classDict;
NamespaceList *usingList; NamespaceList *usingDirList;
ClassList *usingDeclList;
MemberList allMemberList; MemberList allMemberList;
MemberList defineMembers; MemberList defineMembers;
......
...@@ -112,7 +112,7 @@ class OutputGenerator ...@@ -112,7 +112,7 @@ class OutputGenerator
virtual void insertMemberAlign() = 0; virtual void insertMemberAlign() = 0;
virtual void writeRuler() = 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 startCodeFragment() = 0;
virtual void endCodeFragment() = 0; virtual void endCodeFragment() = 0;
virtual void startCodeLine() = 0; virtual void startCodeLine() = 0;
......
...@@ -180,8 +180,8 @@ class OutputList ...@@ -180,8 +180,8 @@ class OutputList
{ forall(&OutputGenerator::insertMemberAlign); } { forall(&OutputGenerator::insertMemberAlign); }
void writeRuler() void writeRuler()
{ forall(&OutputGenerator::writeRuler); } { forall(&OutputGenerator::writeRuler); }
void writeAnchor(const char *name) void writeAnchor(const char *fileName,const char *name)
{ forall(&OutputGenerator::writeAnchor,name); } { forall(&OutputGenerator::writeAnchor,fileName,name); }
void startCodeFragment() void startCodeFragment()
{ forall(&OutputGenerator::startCodeFragment); } { forall(&OutputGenerator::startCodeFragment); }
void endCodeFragment() void endCodeFragment()
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <qregexp.h> #include <qregexp.h>
#include <qfileinfo.h> #include <qfileinfo.h>
#include "pre.h"
#include "constexp.h" #include "constexp.h"
#include "define.h" #include "define.h"
#include "doxygen.h" #include "doxygen.h"
...@@ -1459,7 +1460,7 @@ BN [ \t\r\n] ...@@ -1459,7 +1460,7 @@ BN [ \t\r\n]
if (!g_quoteArg) g_defText+=' '; if (!g_quoteArg) g_defText+=' ';
g_defText+='@'; g_defText+='@';
QCString numStr; QCString numStr;
numStr.setNum(*n); numStr.sprintf("%d",*n);
g_defText+=numStr; g_defText+=numStr;
if (!g_quoteArg) g_defText+=' '; if (!g_quoteArg) g_defText+=' ';
} }
......
...@@ -358,7 +358,7 @@ void RTFGenerator::endProjectNumber() ...@@ -358,7 +358,7 @@ void RTFGenerator::endProjectNumber()
void RTFGenerator::startIndexSection(IndexSections is) void RTFGenerator::startIndexSection(IndexSections is)
{ {
QCString paperName; //QCString paperName;
m_listLevel = 0; m_listLevel = 0;
...@@ -1148,14 +1148,16 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name) ...@@ -1148,14 +1148,16 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
// make an index entry // make an index entry
addToIndex(name,NULL); addToIndex(name,NULL);
// make a bookmark for referencing
writeAnchor(name);
if (fileName) if (fileName)
{ {
// doxygen expects different anchors for pdf and if "FULL PATHS" // doxygen expects different anchors for pdf and if "FULL PATHS"
if (strcmp(name,fileName) != 0) writeAnchor(fileName,0);
writeAnchor(fileName); }
else
{
// make a bookmark for referencing
writeAnchor(0,name);
} }
} }
} }
...@@ -1408,7 +1410,7 @@ void RTFGenerator::writeSection(const char *lab,const char *title,bool sub) ...@@ -1408,7 +1410,7 @@ void RTFGenerator::writeSection(const char *lab,const char *title,bool sub)
newParagraph(); newParagraph();
// make bookmark // make bookmark
writeAnchor(lab); writeAnchor(0,lab);
t << "}"; t << "}";
} }
...@@ -1547,9 +1549,13 @@ void RTFGenerator::endMemberItem(bool) ...@@ -1547,9 +1549,13 @@ void RTFGenerator::endMemberItem(bool)
newParagraph(); 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; t << "{\\bkmkend " << formatBmkStr(name) << "}" << endl;
} }
...@@ -1936,7 +1942,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) ...@@ -1936,7 +1942,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
newParagraph(); newParagraph();
t <<"{\\comment This would be an image map..." << endl; t <<"{\\comment This would be an image map..." << endl;
g.writeGraph(t,Config::rtfOutputDir); g.writeGraph(t,GIF,Config::rtfOutputDir);
t << "}" << endl; t << "}" << endl;
...@@ -1958,11 +1964,11 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -1958,11 +1964,11 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
newParagraph(); newParagraph();
t <<"{\\comment This would be an image map..." << endl; t <<"{\\comment This would be an image map..." << endl;
g.writeGraph(t,Config::rtfOutputDir); g.writeGraph(t,GIF,Config::rtfOutputDir);
t << "}" << endl; t << "}" << endl;
QCString diskName = g.diskName(); //QCString diskName = g.diskName();
// display the file // display the file
t << "{" << endl; t << "{" << endl;
......
...@@ -101,7 +101,7 @@ class RTFGenerator : public OutputGenerator ...@@ -101,7 +101,7 @@ class RTFGenerator : public OutputGenerator
void writeRuler(){RtfwriteRuler_thin();}; void writeRuler(){RtfwriteRuler_thin();};
void writeAnchor(const char *name); void writeAnchor(const char *fileName,const char *name);
void startCodeFragment(); void startCodeFragment();
void endCodeFragment(); void endCodeFragment();
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
......
...@@ -92,6 +92,9 @@ static int roundCount = 0 ; ...@@ -92,6 +92,9 @@ static int roundCount = 0 ;
static int curlyCount = 0 ; static int curlyCount = 0 ;
static int squareCount = 0 ; static int squareCount = 0 ;
static int ifCount = 0 ; static int ifCount = 0 ;
static int todoAnchor = 0 ;
static int todoStartContext = 0;
static QCString todoString = 0;
static Entry* current_root = 0 ; static Entry* current_root = 0 ;
static Entry* global_root = 0 ; static Entry* global_root = 0 ;
static Entry* current = 0 ; static Entry* current = 0 ;
...@@ -889,7 +892,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -889,7 +892,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+
URLMASK [a-z_A-Z0-9\~\:\?\@\#\.\-\+\/]+ URLMASK [a-z_A-Z0-9\~\:\?\@\#\.\-\+\/\=]+
NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9] NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9]
WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"") WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"")
ATTR ({B}+[^>\n]*)? ATTR ({B}+[^>\n]*)?
...@@ -933,7 +936,7 @@ TR [tT][rR] ...@@ -933,7 +936,7 @@ TR [tT][rR]
TT [tT][tT] TT [tT][tT]
UL [uU][lL] UL [uU][lL]
VAR [vV][aA][rR] VAR [vV][aA][rR]
DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
%option noyywrap %option noyywrap
...@@ -1067,6 +1070,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1067,6 +1070,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
%x DocHtmlImageName %x DocHtmlImageName
%x DocLatexImageName %x DocLatexImageName
%x DocLatexImageWidth %x DocLatexImageWidth
%x TodoParam
%x SectionLabel %x SectionLabel
%x SectionTitle %x SectionTitle
%x SkipTemplate %x SkipTemplate
...@@ -1583,7 +1587,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1583,7 +1587,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<DocParam>({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM} { <DocParam>({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM} {
outDoc->startDescTableTitle(); outDoc->startDescTableTitle();
outDoc->startEmphasis(); outDoc->startEmphasis();
outDoc->docify(yytext); outDoc->docify(substitute(yytext,"\"",""));
outDoc->endEmphasis(); outDoc->endEmphasis();
outDoc->endDescTableTitle(); outDoc->endDescTableTitle();
outDoc->startDescTableData(); outDoc->startDescTableData();
...@@ -1616,7 +1620,8 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1616,7 +1620,8 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[secName])) 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);
} }
} }
<DocScan>{CMD}"ref" { <DocScan>{CMD}"ref" {
...@@ -1662,7 +1667,10 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1662,7 +1667,10 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
text=sec->title; text=sec->title;
if (sec->type==SectionInfo::Anchor) 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 else
{ {
...@@ -1693,7 +1701,10 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1693,7 +1701,10 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
{ {
if (sec->type==SectionInfo::Anchor) 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 else
{ {
...@@ -2028,7 +2039,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -2028,7 +2039,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<DocScan>"<"{H3}{ATTR}">" { outDoc->startSubsubsection(); } <DocScan>"<"{H3}{ATTR}">" { outDoc->startSubsubsection(); }
<DocScan>"</"{H3}{ATTR}">" { outDoc->endSubsubsection(); } <DocScan>"</"{H3}{ATTR}">" { outDoc->endSubsubsection(); }
<DocHtmlLink>{NAME}{BN}*"="{BN}*("\""?) { BEGIN(DocHtmlAnchor); } <DocHtmlLink>{NAME}{BN}*"="{BN}*("\""?) { BEGIN(DocHtmlAnchor); }
<DocHtmlAnchor>[a-z_A-Z0-9.\-\+\/]+ { outDoc->writeAnchor(yytext); } <DocHtmlAnchor>[a-z_A-Z0-9.\-\+\/]+ { outDoc->writeAnchor(0,yytext); }
<DocHtmlLink>{HREF}{BN}*"="{BN}*("\""?) { <DocHtmlLink>{HREF}{BN}*"="{BN}*("\""?) {
htmlUrl.resize(0); htmlUrl.resize(0);
htmlText.resize(0); htmlText.resize(0);
...@@ -2434,7 +2445,21 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -2434,7 +2445,21 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
BEGIN(Using); BEGIN(Using);
} }
<Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); } <Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); }
<Using>";" { BEGIN(FindMembers); } <Using>{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);
}
<UsingDirective>{SCOPENAME} { current->name=yytext; <UsingDirective>{SCOPENAME} { current->name=yytext;
current->fileName = yyFileName; current->fileName = yyFileName;
current->section=Entry::USINGDIR_SEC; current->section=Entry::USINGDIR_SEC;
...@@ -2449,6 +2474,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -2449,6 +2474,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
current->mGrpId = memberGroupId; current->mGrpId = memberGroupId;
BEGIN(Using); BEGIN(Using);
} }
<Using>";" { BEGIN(FindMembers); }
<FindMembers>{SCOPENAME}{BN}*"<>" { // guided template decl <FindMembers>{SCOPENAME}{BN}*"<>" { // guided template decl
QCString n=yytext; QCString n=yytext;
addType( current ); addType( current );
...@@ -3775,7 +3801,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -3775,7 +3801,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
{ {
if (isTypedef) if (isTypedef)
{ {
QCString dest = extractName(current->name); //QCString dest = extractName(current->name);
typedefDict.insert(yytext,new QCString(current->name)); typedefDict.insert(yytext,new QCString(current->name));
//current->extends->append( //current->extends->append(
// new BaseInfo(yytext,Public,Normal) // new BaseInfo(yytext,Public,Normal)
...@@ -4171,6 +4197,50 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -4171,6 +4197,50 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
memberGroupDocs.resize(0); memberGroupDocs.resize(0);
BEGIN(GroupHeader); BEGIN(GroupHeader);
} }
<LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"todo"{B}+ {
todoStartContext = YY_START;
todoString.resize(0);
BEGIN(TodoParam);
}
<TodoParam>[^*/\n]+ {
todoString+=yytext;
}
<TodoParam>. {
todoString+=*yytext;
}
<TodoParam>"\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 += "<p><b>\\link todo ";
current->doc += theTranslator->trTodo();
current->doc += ":\\endlink </b>";
current->doc += todoString + "<p>";
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+"<p>";
global_root->addSubEntry(page);
if (*yytext=='*')
{
unput('/');unput('*');
}
else
{
unput('\n');
}
BEGIN(todoStartContext);
}
<ExampleDocArg1>{FILE} { <ExampleDocArg1>{FILE} {
current->name = stripQuotes(yytext); current->name = stripQuotes(yytext);
BEGIN( ExampleDoc ); BEGIN( ExampleDoc );
......
...@@ -863,9 +863,19 @@ class Translator ...@@ -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 #endif
...@@ -1070,8 +1070,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ...@@ -1070,8 +1070,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
// (assuming a using statement was used) // (assuming a using statement was used)
trimNamespaceScope(srcAType,dstAType); trimNamespaceScope(srcAType,dstAType);
QCString srcScope; //QCString srcScope;
QCString dstScope; //QCString dstScope;
// strip redundant scope specifiers // strip redundant scope specifiers
if (!className.isEmpty()) if (!className.isEmpty())
...@@ -1400,7 +1400,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -1400,7 +1400,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
QCString className = scopeName.left(scopeOffset); QCString className = scopeName.left(scopeOffset);
if (!className.isEmpty() && !mScope.isEmpty()) if (!className.isEmpty() && !mScope.isEmpty())
{ {
className.append("::"+mScope); className+="::"+mScope;
} }
else if (!mScope.isEmpty()) else if (!mScope.isEmpty())
{ {
...@@ -1507,7 +1507,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -1507,7 +1507,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
QCString namespaceName = scopeName.left(scopeOffset); QCString namespaceName = scopeName.left(scopeOffset);
if (!namespaceName.isEmpty() && !mScope.isEmpty()) if (!namespaceName.isEmpty() && !mScope.isEmpty())
{ {
namespaceName.append("::"+mScope); namespaceName+="::"+mScope;
} }
else if (!mScope.isEmpty()) else if (!mScope.isEmpty())
{ {
...@@ -2247,7 +2247,7 @@ void extractNamespaceName(const QCString &scopeName, ...@@ -2247,7 +2247,7 @@ void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName) QCString &className,QCString &namespaceName)
{ {
QCString clName=scopeName.copy(); QCString clName=scopeName.copy();
QCString nsName; //QCString nsName;
if (!clName.isEmpty() && namespaceDict[clName] && getClass(clName)==0) if (!clName.isEmpty() && namespaceDict[clName] && getClass(clName)==0)
{ // the whole name is a namespace (and not a class) { // the whole name is a namespace (and not a class)
namespaceName=clName.copy(); namespaceName=clName.copy();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment