Commit 0c394c58 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.3.1-20030607

parent 70b82ece
DOXYGEN Version 1.3.1 DOXYGEN Version 1.3.1-20030607
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (28 May 2003) Dimitri van Heesch (07 June 2003)
DOXYGEN Version 1.3.1 DOXYGEN Version 1.3.1_20030607
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (28 May 2003) Dimitri van Heesch (dimitri@stack.nl) (07 June 2003)
1.3.1 1.3.1-20030607
...@@ -47,6 +47,7 @@ documentation: ...@@ -47,6 +47,7 @@ documentation:
\refitem cmdbrief \\brief \refitem cmdbrief \\brief
\refitem cmdbug \\bug \refitem cmdbug \\bug
\refitem cmdc \\c \refitem cmdc \\c
\refitem cmdcallgraph \\callgraph
\refitem cmdclass \\class \refitem cmdclass \\class
\refitem cmdcode \\code \refitem cmdcode \\code
\refitem cmdcopydoc \\copydoc \refitem cmdcopydoc \\copydoc
...@@ -66,6 +67,7 @@ documentation: ...@@ -66,6 +67,7 @@ documentation:
\refitem cmdendlatexonly \\endlatexonly \refitem cmdendlatexonly \\endlatexonly
\refitem cmdendlink \\endlink \refitem cmdendlink \\endlink
\refitem cmdendverbatim \\endverbatim \refitem cmdendverbatim \\endverbatim
\refitem cmdendxmlonly \\endxmlonly
\refitem cmdenum \\enum \refitem cmdenum \\enum
\refitem cmdexample \\example \refitem cmdexample \\example
\refitem cmdexception \\exception \refitem cmdexception \\exception
...@@ -129,6 +131,7 @@ documentation: ...@@ -129,6 +131,7 @@ documentation:
\refitem cmdversion \\version \refitem cmdversion \\version
\refitem cmdwarning \\warning \refitem cmdwarning \\warning
\refitem cmdweakgroup \\weakgroup \refitem cmdweakgroup \\weakgroup
\refitem cmdxmlonly \\xmlonly
\refitem cmdxrefitem \\xrefitem \refitem cmdxrefitem \\xrefitem
\refitem cmddollar \\\$ \refitem cmddollar \\\$
\refitem cmdat \\\@ \refitem cmdat \\\@
...@@ -181,6 +184,17 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -181,6 +184,17 @@ doxygen. Unrecognized commands are treated as normal text.
\sa page \ref grouping "Grouping", sections \ref cmddefgroup "\\defgroup", \ref cmdingroup "\\ingroup" and \sa page \ref grouping "Grouping", sections \ref cmddefgroup "\\defgroup", \ref cmdingroup "\\ingroup" and
\ref cmdweakgroup "\\weakgroup". \ref cmdweakgroup "\\weakgroup".
\section cmdcallgraph \callgraph
\addindex \\callgraph
When this command is put in a comment block of a function or method
and \ref cfg_have_dot "HAVE_DOT" is set to YES, then doxygen will
generate a call graph for that function (provided the implementation of the
function or method calls other documented functions). The call graph will
generated regardless of the value of \ref cfg_call_graph "CALL_GRAPH".
\note The completeness (and correctness) of the call graph depends on the
doxygen code parser which is not perfect.
\section cmdclass \class <name> [<header-file>] [<header-name>] \section cmdclass \class <name> [<header-file>] [<header-name>]
\addindex \\class \addindex \\class
...@@ -1551,6 +1565,14 @@ ALIASES = "english=\if english" \ ...@@ -1551,6 +1565,14 @@ ALIASES = "english=\if english" \
\sa section \ref cmdverbatim "\\verbatim". \sa section \ref cmdverbatim "\\verbatim".
<hr>
\section cmdendxmlonly \endxmlonly
\addindex \\endxmlonly
Ends a block of text that was started with a \\xmlonly command.
\sa section \ref cmdxmlonly "\\xmlonly".
<hr> <hr>
\section cmdfdollar \f$ \section cmdfdollar \f$
...@@ -1740,6 +1762,19 @@ ALIASES = "english=\if english" \ ...@@ -1740,6 +1762,19 @@ ALIASES = "english=\if english" \
\warning Make sure you include a \\endverbatim command for each \warning Make sure you include a \\endverbatim command for each
\\verbatim command or the parser will get confused! \\verbatim command or the parser will get confused!
<hr>
\section cmdxmlonly \xmlonly
\addindex \\xmlonly
Starts a block of text that will be verbatim included in the
generated XML output only. The block ends with a
endxmlonly command.
This command can be used to include custom XML tags.
\sa section \ref cmdhtmlonly "\\htmlonly" and section
\ref cmdlatexonly "\\latexonly".
<hr> <hr>
\section cmdbackslash \\ \section cmdbackslash \\
......
...@@ -62,6 +62,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -62,6 +62,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_bin_abspath BIN_ABSPATH \refitem cfg_bin_abspath BIN_ABSPATH
\refitem cfg_binary_toc BINARY_TOC \refitem cfg_binary_toc BINARY_TOC
\refitem cfg_brief_member_desc BRIEF_MEMBER_DESC \refitem cfg_brief_member_desc BRIEF_MEMBER_DESC
\refitem cfg_call_graph CALL_GRAPH
\refitem cfg_case_sense_names CASE_SENSE_NAMES \refitem cfg_case_sense_names CASE_SENSE_NAMES
\refitem cfg_cgi_name CGI_NAME \refitem cfg_cgi_name CGI_NAME
\refitem cfg_cgi_url CGI_URL \refitem cfg_cgi_url CGI_URL
...@@ -242,7 +243,8 @@ followed by the descriptions of the tags grouped by category. ...@@ -242,7 +243,8 @@ followed by the descriptions of the tags grouped by category.
The default language is English, other supported languages are: The default language is English, other supported languages are:
Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish and Swedish. Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
and Ukrainian.
\anchor cfg_use_windows_encoding \anchor cfg_use_windows_encoding
<dt>\c USE_WINDOWS_ENCODING <dd> <dt>\c USE_WINDOWS_ENCODING <dd>
...@@ -251,8 +253,8 @@ followed by the descriptions of the tags grouped by category. ...@@ -251,8 +253,8 @@ followed by the descriptions of the tags grouped by category.
The encoding is not always determined by the language that is chosen, The encoding is not always determined by the language that is chosen,
but also whether or not the output is meant for Windows or non-Windows users. but also whether or not the output is meant for Windows or non-Windows users.
In case there is a difference, setting the \c USE_WINDOWS_ENCODING tag to \c YES In case there is a difference, setting the \c USE_WINDOWS_ENCODING tag to \c YES
forces the Windows enconding, (this is the default for the Windows binary), forces the Windows encoding, (this is the default for the Windows binary),
whereas setting the tag to \c NO uses a Unix-style encoding (the default for the whereas setting the tag to \c NO uses a Unix-style encoding (the default for
all platforms other than Windows). all platforms other than Windows).
\anchor cfg_extract_all \anchor cfg_extract_all
...@@ -366,7 +368,7 @@ function's detailed documentation block. ...@@ -366,7 +368,7 @@ function's detailed documentation block.
<dt>\c STRIP_FROM_PATH <dd> <dt>\c STRIP_FROM_PATH <dd>
\addindex STRIP_FROM_PATH \addindex STRIP_FROM_PATH
If the \c FULL_PATH_NAMES tag is set to \c YES then the \c STRIP_FROM_PATH tag If the \c FULL_PATH_NAMES tag is set to \c YES then the \c STRIP_FROM_PATH tag
can be used to strip a user defined part of the path. Stripping is can be used to strip a user-defined part of the path. Stripping is
only done if one of the specified strings matches the left-hand part of the only done if one of the specified strings matches the left-hand part of the
path. path.
...@@ -382,8 +384,8 @@ function's detailed documentation block. ...@@ -382,8 +384,8 @@ function's detailed documentation block.
<dt>\c CASE_SENSE_NAMES <dd> <dt>\c CASE_SENSE_NAMES <dd>
\addindex CASE_SENSE_NAMES \addindex CASE_SENSE_NAMES
If the \c CASE_SENSE_NAMES tag is set to \c NO (the default) then doxygen If the \c CASE_SENSE_NAMES tag is set to \c NO (the default) then doxygen
will only generate file names in lower case letters. If set to will only generate file names in lower-case letters. If set to
\c YES upper case letters are also allowed. This is useful if you have \c YES upper-case letters are also allowed. This is useful if you have
classes or files whose names only differ in case and if your file system classes or files whose names only differ in case and if your file system
supports case sensitive file names. supports case sensitive file names.
...@@ -413,7 +415,7 @@ function's detailed documentation block. ...@@ -413,7 +415,7 @@ function's detailed documentation block.
<dt>\c SHOW_INCLUDE_FILES <dd> <dt>\c SHOW_INCLUDE_FILES <dd>
\addindex SHOW_INCLUDE_FILES \addindex SHOW_INCLUDE_FILES
If the SHOW_INCLUDE_FILES tag is set to YES (the default) then doxygen If the SHOW_INCLUDE_FILES tag is set to YES (the default) then doxygen
will put list of the files that are included by a file in the documentation will put a list of the files that are included by a file in the documentation
of that file. of that file.
\anchor cfg_javadoc_autobrief \anchor cfg_javadoc_autobrief
...@@ -529,7 +531,7 @@ function's detailed documentation block. ...@@ -529,7 +531,7 @@ function's detailed documentation block.
\endverbatim \endverbatim
will allow you to will allow you to
put the command \\sideeffect (or \@sideeffect) in the documentation, which put the command \\sideeffect (or \@sideeffect) in the documentation, which
will result in a user defined paragraph with heading "Side Effects:". will result in a user-defined paragraph with heading "Side Effects:".
You can put \\n's in the value part of an alias to insert newlines. You can put \\n's in the value part of an alias to insert newlines.
\anchor cfg_max_initializer_lines \anchor cfg_max_initializer_lines
...@@ -547,7 +549,7 @@ function's detailed documentation block. ...@@ -547,7 +549,7 @@ function's detailed documentation block.
\addindex OPTIMIZE_OUTPUT_FOR_C \addindex OPTIMIZE_OUTPUT_FOR_C
Set the \c OPTIMIZE_OUTPUT_FOR_C tag to \c YES if your project consists Set the \c OPTIMIZE_OUTPUT_FOR_C tag to \c YES if your project consists
of C sources only. Doxygen will then generate output that is more tailored of C sources only. Doxygen will then generate output that is more tailored
for C. For instance some of the names that are used will be different. for C. For instance, some of the names that are used will be different.
The list of all members will be omitted, etc. The list of all members will be omitted, etc.
\anchor cfg_optimize_output_java \anchor cfg_optimize_output_java
...@@ -555,7 +557,7 @@ function's detailed documentation block. ...@@ -555,7 +557,7 @@ function's detailed documentation block.
\addindex OPTIMIZE_OUTPUT_JAVA \addindex OPTIMIZE_OUTPUT_JAVA
Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
only. Doxygen will then generate output that is more tailored for Java. only. Doxygen will then generate output that is more tailored for Java.
For instance namespaces will be presented as packages, qualified scopes For instance, namespaces will be presented as packages, qualified scopes
will look different, etc. will look different, etc.
\anchor cfg_show_used_files \anchor cfg_show_used_files
...@@ -816,7 +818,7 @@ function's detailed documentation block. ...@@ -816,7 +818,7 @@ function's detailed documentation block.
\anchor cfg_html_header \anchor cfg_html_header
<dt>\c HTML_HEADER <dd> <dt>\c HTML_HEADER <dd>
\addindex HTML_HEADER \addindex HTML_HEADER
The \c HTML_HEADER tag can be used to specify a user defined HTML The \c HTML_HEADER tag can be used to specify a user-defined HTML
header file for each generated HTML page. To get valid HTML the header file header file for each generated HTML page. To get valid HTML the header file
should contain at least a \c \<HTML\> and a \c \<BODY\> tag, but it is should contain at least a \c \<HTML\> and a \c \<BODY\> tag, but it is
good idea to include the style sheet that is generated by doxygen as well. good idea to include the style sheet that is generated by doxygen as well.
...@@ -847,7 +849,7 @@ function's detailed documentation block. ...@@ -847,7 +849,7 @@ function's detailed documentation block.
\anchor cfg_html_footer \anchor cfg_html_footer
<dt>\c HTML_FOOTER <dd> <dt>\c HTML_FOOTER <dd>
\addindex HTML_FOOTER \addindex HTML_FOOTER
The \c HTML_FOOTER tag can be used to specify a user defined HTML footer for The \c HTML_FOOTER tag can be used to specify a user-defined HTML footer for
each generated HTML page. To get valid HTML the header file should contain each generated HTML page. To get valid HTML the header file should contain
at least a \c \</BODY\> and a \c \</HTML\> tag. A minimal example: at least a \c \</BODY\> and a \c \</HTML\> tag. A minimal example:
\verbatim \verbatim
...@@ -871,7 +873,7 @@ function's detailed documentation block. ...@@ -871,7 +873,7 @@ function's detailed documentation block.
\anchor cfg_html_stylesheet \anchor cfg_html_stylesheet
<dt>\c HTML_STYLESHEET <dd> <dt>\c HTML_STYLESHEET <dd>
\addindex HTML_STYLESHEET \addindex HTML_STYLESHEET
The \c HTML_STYLESHEET tag can be used to specify a user defined cascading The \c HTML_STYLESHEET tag can be used to specify a user-defined cascading
style sheet that is used by each HTML page. It can be used to style sheet that is used by each HTML page. It can be used to
fine-tune the look of the HTML output. If the tag is left blank doxygen fine-tune the look of the HTML output. If the tag is left blank doxygen
will generate a default style sheet. will generate a default style sheet.
...@@ -924,7 +926,7 @@ function's detailed documentation block. ...@@ -924,7 +926,7 @@ function's detailed documentation block.
If the \c GENERATE_HTMLHELP tag is set to \c YES, the \c HHC_LOCATION tag can If the \c GENERATE_HTMLHELP tag is set to \c YES, the \c HHC_LOCATION tag can
be used to specify the location (absolute path including file name) of be used to specify the location (absolute path including file name) of
the HTML help compiler (hhc.exe). If non empty doxygen will try to run the HTML help compiler (hhc.exe). If non empty doxygen will try to run
the html help compiler on the generated index.hhp. the HTML help compiler on the generated index.hhp.
\anchor cfg_generate_chi \anchor cfg_generate_chi
<dt>\c GENERATE_CHI <dd> <dt>\c GENERATE_CHI <dd>
...@@ -1053,7 +1055,7 @@ EXTRA_PACKAGES = times ...@@ -1053,7 +1055,7 @@ EXTRA_PACKAGES = times
let doxygen write the default header to a separate file. let doxygen write the default header to a separate file.
\par Note: \par Note:
Only use a user defined header if you know what you are doing! Only use a user-defined header if you know what you are doing!
The following commands have a special meaning inside the header: The following commands have a special meaning inside the header:
<code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>, <code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>,
...@@ -1409,7 +1411,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1409,7 +1411,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
If the \c CLASS_DIAGRAMS tag is set to \c YES (the default) doxygen will If the \c CLASS_DIAGRAMS tag is set to \c YES (the default) doxygen will
generate a class diagram (in HTML and \f$\mbox{\LaTeX}\f$) for classes with base or generate a class diagram (in HTML and \f$\mbox{\LaTeX}\f$) for classes with base or
super classes. Setting the tag to \c NO turns the diagrams off. super classes. Setting the tag to \c NO turns the diagrams off.
Note that this option is superceded by the HAVE_DOT option below. Note that this option is superseded by the HAVE_DOT option below.
This is only a fallback. It is recommended to install and use dot, This is only a fallback. It is recommended to install and use dot,
since it yield more powerful graphs. since it yield more powerful graphs.
...@@ -1467,6 +1469,15 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1467,6 +1469,15 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
documented header file showing the documented files that directly or indirectly documented header file showing the documented files that directly or indirectly
include this file. include this file.
\anchor cfg_call_graph
<dt>\c CALL_GRAPH <dd>
\addindex CALL_GRAPH
If the \c CALL_GRAPH and \c HAVE_DOT tags are set to \c YES then doxygen will
generate a call dependency graph for every global function or class method.
Note that enabling this option will significantly increase the time of a run.
So in most cases it will be better to enable call graphs for selected
functions only using the \\callgraph command.
\anchor cfg_graphical_hierarchy \anchor cfg_graphical_hierarchy
<dt>\c GRAPHICAL_HIERARCHY <dd> <dt>\c GRAPHICAL_HIERARCHY <dd>
\addindex GRAPHICAL_HIERARCHY \addindex GRAPHICAL_HIERARCHY
...@@ -1515,7 +1526,7 @@ not sufficient to fit the graph (see ...@@ -1515,7 +1526,7 @@ not sufficient to fit the graph (see
\ref cfg_max_dot_graph_width "MAX_DOT_GRAPH_WIDTH" and \ref cfg_max_dot_graph_width "MAX_DOT_GRAPH_WIDTH" and
\ref cfg_max_dot_graph_height "MAX_DOT_GRAPH_HEIGHT"). \ref cfg_max_dot_graph_height "MAX_DOT_GRAPH_HEIGHT").
If 0 is used fot the depth value (the default), the graph is If 0 is used fot the depth value (the default), the graph is
not depth constraint. not depth-constraint.
\anchor cfg_max_dot_graph_width \anchor cfg_max_dot_graph_width
<dt>\c MAX_DOT_GRAPH_WIDTH <dd> <dt>\c MAX_DOT_GRAPH_WIDTH <dd>
...@@ -1537,7 +1548,7 @@ not depth constraint. ...@@ -1537,7 +1548,7 @@ not depth constraint.
<dt>\c DOT_CLEANUP <dd> <dt>\c DOT_CLEANUP <dd>
\addindex DOT_CLEANUP \addindex DOT_CLEANUP
If the \c DOT_CLEANUP tag is set to \c YES (the default) doxygen will If the \c DOT_CLEANUP tag is set to \c YES (the default) doxygen will
remove the intermedate dot files that are used to generate the various graphs. remove the intermediate dot files that are used to generate the various graphs.
</dl> </dl>
......
...@@ -222,6 +222,11 @@ should send me a code fragment that triggers the message. The workaround ...@@ -222,6 +222,11 @@ should send me a code fragment that triggers the message. The workaround
the problem put some line-breaks into your file, split it up into smaller the problem put some line-breaks into your file, split it up into smaller
parts, or exclude it from the input using EXCLUDE. parts, or exclude it from the input using EXCLUDE.
<li><b>When running make in the latex dir I get "TeX capacity exceeded". Now what?</b>
You can edit the texmf.cfg file to increase the default values of the
various buffers and then run "texconfig init".
<li><b>Why are dependencies via STL classes not shown in the dot graphs?</b> <li><b>Why are dependencies via STL classes not shown in the dot graphs?</b>
Doxygen is unware of the STL classes, so it does not know that class A relates Doxygen is unware of the STL classes, so it does not know that class A relates
......
...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means ...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time. languages other than English (the default) at configuration time.
Currently (version 1.3-20030430), 28 languages Currently (version 1.3.1), 28 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish, Czech, Danish, Dutch, English, Finnish,
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3.1 Version: 1.3.1_20030607
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -92,6 +92,7 @@ ClassDef::ClassDef( ...@@ -92,6 +92,7 @@ ClassDef::ClassDef(
m_membersMerged = FALSE; m_membersMerged = FALSE;
QCString ns; QCString ns;
extractNamespaceName(m_name,m_className,ns); extractNamespaceName(m_name,m_className,ns);
//printf("m_name=%s m_className=%s ns=%s\n",m_name.data(),m_className.data(),ns.data());
if (((QCString)defFileName).right(5)!=".java" && if (((QCString)defFileName).right(5)!=".java" &&
guessSection(defFileName)==Entry::SOURCE_SEC) guessSection(defFileName)==Entry::SOURCE_SEC)
......
...@@ -41,6 +41,7 @@ CommandMap cmdMap[] = ...@@ -41,6 +41,7 @@ CommandMap cmdMap[] =
{ "endlink", CMD_ENDLINK }, { "endlink", CMD_ENDLINK },
{ "endsecreflist", CMD_ENDSECREFLIST }, { "endsecreflist", CMD_ENDSECREFLIST },
{ "endverbatim", CMD_ENDVERBATIM }, { "endverbatim", CMD_ENDVERBATIM },
{ "endxmlonly", CMD_ENDXMLONLY },
{ "exception", CMD_EXCEPTION }, { "exception", CMD_EXCEPTION },
{ "form", CMD_FORMULA }, { "form", CMD_FORMULA },
{ "htmlinclude", CMD_HTMLINCLUDE }, { "htmlinclude", CMD_HTMLINCLUDE },
...@@ -79,6 +80,7 @@ CommandMap cmdMap[] = ...@@ -79,6 +80,7 @@ CommandMap cmdMap[] =
{ "since", CMD_SINCE }, { "since", CMD_SINCE },
{ "skip", CMD_SKIP }, { "skip", CMD_SKIP },
{ "skipline", CMD_SKIPLINE }, { "skipline", CMD_SKIPLINE },
{ "xmlonly", CMD_XMLONLY },
{ "xrefitem", CMD_XREFITEM }, { "xrefitem", CMD_XREFITEM },
{ "throw", CMD_EXCEPTION }, { "throw", CMD_EXCEPTION },
{ "until", CMD_UNTIL }, { "until", CMD_UNTIL },
......
...@@ -54,52 +54,54 @@ enum CommandType ...@@ -54,52 +54,54 @@ enum CommandType
CMD_ENDLINK = 20, CMD_ENDLINK = 20,
CMD_ENDSECREFLIST= 21, CMD_ENDSECREFLIST= 21,
CMD_ENDVERBATIM = 22, CMD_ENDVERBATIM = 22,
CMD_EXCEPTION = 23 | SIMPLESECT_BIT, CMD_ENDXMLONLY = 23,
CMD_FORMULA = 24, CMD_EXCEPTION = 24 | SIMPLESECT_BIT,
CMD_GREATER = 25, CMD_FORMULA = 25,
CMD_HASH = 26, CMD_GREATER = 26,
CMD_HTMLINCLUDE = 27, CMD_HASH = 27,
CMD_HTMLONLY = 28, CMD_HTMLINCLUDE = 28,
CMD_IMAGE = 29, CMD_HTMLONLY = 29,
CMD_INCLUDE = 30, CMD_IMAGE = 30,
CMD_INTERNAL = 31, CMD_INCLUDE = 31,
CMD_INTERNALREF = 32, CMD_INTERNAL = 32,
CMD_INVARIANT = 33 | SIMPLESECT_BIT , CMD_INTERNALREF = 33,
CMD_LANGSWITCH = 34, CMD_INVARIANT = 34 | SIMPLESECT_BIT ,
CMD_LATEXONLY = 35, CMD_LANGSWITCH = 35,
CMD_LESS = 36, CMD_LATEXONLY = 36,
CMD_LI = 37, CMD_LESS = 37,
CMD_LINE = 38, CMD_LI = 38,
CMD_LINEBREAK = 39, CMD_LINE = 39,
CMD_LINK = 40, CMD_LINEBREAK = 40,
CMD_NOTE = 41 | SIMPLESECT_BIT, CMD_LINK = 41,
CMD_PAR = 42 | SIMPLESECT_BIT, CMD_NOTE = 42 | SIMPLESECT_BIT,
CMD_PARAM = 43 | SIMPLESECT_BIT, CMD_PAR = 43 | SIMPLESECT_BIT,
CMD_PERCENT = 44, CMD_PARAM = 44 | SIMPLESECT_BIT,
CMD_POST = 45 | SIMPLESECT_BIT, CMD_PERCENT = 45,
CMD_PRE = 46 | SIMPLESECT_BIT , CMD_POST = 46 | SIMPLESECT_BIT,
CMD_REF = 47, CMD_PRE = 47 | SIMPLESECT_BIT ,
CMD_SECREFITEM = 48, CMD_REF = 48,
CMD_REMARK = 49 | SIMPLESECT_BIT , CMD_SECREFITEM = 49,
CMD_RETURN = 50 | SIMPLESECT_BIT , CMD_REMARK = 50 | SIMPLESECT_BIT ,
CMD_RETVAL = 51 | SIMPLESECT_BIT, CMD_RETURN = 51 | SIMPLESECT_BIT ,
CMD_SA = 52 | SIMPLESECT_BIT , CMD_RETVAL = 52 | SIMPLESECT_BIT,
CMD_SECREFLIST = 53, CMD_SA = 53 | SIMPLESECT_BIT ,
CMD_SECTION = 54, CMD_SECREFLIST = 54,
CMD_SUBSECTION = 55, CMD_SECTION = 55,
CMD_SUBSUBSECTION= 56, CMD_SUBSECTION = 56,
CMD_PARAGRAPH = 57, CMD_SUBSUBSECTION= 57,
CMD_SINCE = 58 | SIMPLESECT_BIT, CMD_PARAGRAPH = 58,
CMD_SKIP = 59, CMD_SINCE = 59 | SIMPLESECT_BIT,
CMD_SKIPLINE = 60, CMD_SKIP = 60,
CMD_STARTCODE = 61, CMD_SKIPLINE = 61,
CMD_JAVALINK = 62, CMD_STARTCODE = 62,
CMD_UNTIL = 63, CMD_JAVALINK = 63,
CMD_VERBATIM = 64, CMD_UNTIL = 64,
CMD_VERBINCLUDE = 65, CMD_VERBATIM = 65,
CMD_VERSION = 66 | SIMPLESECT_BIT, CMD_VERBINCLUDE = 66,
CMD_WARNING = 67 | SIMPLESECT_BIT, CMD_VERSION = 67 | SIMPLESECT_BIT,
CMD_XREFITEM = 68 | SIMPLESECT_BIT CMD_WARNING = 68 | SIMPLESECT_BIT,
CMD_XREFITEM = 69 | SIMPLESECT_BIT,
CMD_XMLONLY = 70
}; };
enum HtmlTagType enum HtmlTagType
......
...@@ -1224,8 +1224,6 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1224,8 +1224,6 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_scopeStack.push(SCOPEBLOCK); g_scopeStack.push(SCOPEBLOCK);
pushScope(g_curClassName); pushScope(g_curClassName);
//printf("***** g_curClassName=%s\n",g_curClassName.data()); //printf("***** g_curClassName=%s\n",g_curClassName.data());
//CodeClassDef *cd=new CodeClassDef(g_ccd);
//g_codeClassDict.insert(cd->name,cd);
if (getResolvedClass(g_currentDefinition,g_curClassName)==0) if (getResolvedClass(g_currentDefinition,g_curClassName)==0)
{ {
g_curClassDef=new ClassDef("<code>",1, g_curClassDef=new ClassDef("<code>",1,
...@@ -1611,9 +1609,6 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1611,9 +1609,6 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
BEGIN( SkipInits ); BEGIN( SkipInits );
} }
} }
/*
<MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" {
*/
<CallEnd>({BN}"const"|"volatile")*{BN}*"{" { <CallEnd>({BN}"const"|"volatile")*{BN}*"{" {
if (g_insideBody) if (g_insideBody)
{ {
...@@ -1622,10 +1617,19 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1622,10 +1617,19 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_theVarContext.addVariable(g_parmType,g_parmName); g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope(); g_theCallContext.popScope();
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
if (g_name.find("::")!=-1) int index = g_name.findRev("::");
if (index!=-1)
{ {
ClassDef *cd=getResolvedClass(Doxygen::globalScope,g_name.left(index));
if (cd)
{
setClassScope(cd->name());
}
else
{
setClassScope(g_realScope);
}
g_scopeStack.push(SCOPEBLOCK); g_scopeStack.push(SCOPEBLOCK);
setClassScope(g_realScope);
} }
else else
{ {
......
This diff is collapsed.
...@@ -826,6 +826,15 @@ reparsetoken: ...@@ -826,6 +826,15 @@ reparsetoken:
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
break; break;
case CMD_XMLONLY:
{
doctokenizerYYsetStateXmlOnly();
tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::XmlOnly,g_isExample,g_exampleName));
if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: xmlonly section ended without end marker",doctokenizerYYlineno);
doctokenizerYYsetStatePara();
}
break;
case CMD_FORMULA: case CMD_FORMULA:
{ {
DocFormula *form=new DocFormula(parent,g_token->id); DocFormula *form=new DocFormula(parent,g_token->id);
...@@ -3043,7 +3052,8 @@ int DocParamList::parse(const QString &cmdName) ...@@ -3043,7 +3052,8 @@ int DocParamList::parse(const QString &cmdName)
{ {
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s",cmdName.data()); "argument of command %s",cmdName.data());
return 0; retval=0;
goto endparamlist;
} }
ASSERT(tok==TK_WHITESPACE); ASSERT(tok==TK_WHITESPACE);
...@@ -3051,6 +3061,7 @@ int DocParamList::parse(const QString &cmdName) ...@@ -3051,6 +3061,7 @@ int DocParamList::parse(const QString &cmdName)
m_paragraph->markFirst(); m_paragraph->markFirst();
m_paragraph->markLast(); m_paragraph->markLast();
endparamlist:
DBG(("DocParamList::parse() end retval=%d\n",retval)); DBG(("DocParamList::parse() end retval=%d\n",retval));
DocNode *n=g_nodeStack.pop(); DocNode *n=g_nodeStack.pop();
ASSERT(n==this); ASSERT(n==this);
...@@ -3588,6 +3599,15 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3588,6 +3599,15 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
break; break;
case CMD_XMLONLY:
{
doctokenizerYYsetStateXmlOnly();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::XmlOnly,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: xmlonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
case CMD_VERBATIM: case CMD_VERBATIM:
{ {
doctokenizerYYsetStateVerbatim(); doctokenizerYYsetStateVerbatim();
...@@ -3600,6 +3620,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3600,6 +3620,7 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_ENDCODE: case CMD_ENDCODE:
case CMD_ENDHTMLONLY: case CMD_ENDHTMLONLY:
case CMD_ENDLATEXONLY: case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY:
case CMD_ENDLINK: case CMD_ENDLINK:
case CMD_ENDVERBATIM: case CMD_ENDVERBATIM:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
...@@ -4491,6 +4512,9 @@ int DocSection::parse() ...@@ -4491,6 +4512,9 @@ int DocSection::parse()
retval=0; // stop parsing retval=0; // stop parsing
} }
else
{
}
INTERNAL_ASSERT(retval==0 || INTERNAL_ASSERT(retval==0 ||
retval==RetVal_Section || retval==RetVal_Section ||
...@@ -4615,6 +4639,18 @@ void DocRoot::parse() ...@@ -4615,6 +4639,18 @@ void DocRoot::parse()
{ {
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found"); warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found");
} }
else if (retval==RetVal_Subsection)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found subsection command outside of section context!");
}
else if (retval==RetVal_Subsubsection)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found subsubsection command outside of subsection context!");
}
else if (retval==RetVal_Paragraph)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found paragraph command outside of subsubsection context!");
}
} while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal); } while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal);
if (lastPar) lastPar->markLast(); if (lastPar) lastPar->markLast();
...@@ -4642,6 +4678,7 @@ void DocRoot::parse() ...@@ -4642,6 +4678,7 @@ void DocRoot::parse()
retval = in->parse(); retval = in->parse();
} }
handleUnclosedStyleCommands(); handleUnclosedStyleCommands();
DocNode *n = g_nodeStack.pop(); DocNode *n = g_nodeStack.pop();
......
...@@ -351,7 +351,7 @@ class DocWhiteSpace : public DocNode ...@@ -351,7 +351,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode class DocVerbatim : public DocNode
{ {
public: public:
enum Type { Code, HtmlOnly, LatexOnly, Verbatim }; enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim };
DocVerbatim(DocNode *parent,const QString &context, DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample, const QString &text, Type t,bool isExample,
const QString &exampleFile) : const QString &exampleFile) :
......
...@@ -121,6 +121,7 @@ void doctokenizerYYsetStateTitle(); ...@@ -121,6 +121,7 @@ void doctokenizerYYsetStateTitle();
void doctokenizerYYsetStateCode(); void doctokenizerYYsetStateCode();
void doctokenizerYYsetStateHtmlOnly(); void doctokenizerYYsetStateHtmlOnly();
void doctokenizerYYsetStateLatexOnly(); void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly();
void doctokenizerYYsetStateVerbatim(); void doctokenizerYYsetStateVerbatim();
void doctokenizerYYsetStateParam(); void doctokenizerYYsetStateParam();
void doctokenizerYYsetStateXRefItem(); void doctokenizerYYsetStateXRefItem();
......
...@@ -306,6 +306,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -306,6 +306,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%x St_Code %x St_Code
%x St_HtmlOnly %x St_HtmlOnly
%x St_LatexOnly %x St_LatexOnly
%x St_XmlOnly
%x St_Verbatim %x St_Verbatim
%x St_Param %x St_Param
%x St_XRefItem %x St_XRefItem
...@@ -507,6 +508,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -507,6 +508,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_LatexOnly>. { <St_LatexOnly>. {
g_token->verb+=yytext; g_token->verb+=yytext;
} }
<St_XmlOnly>{CMD}"endxmlonly" {
return RetVal_OK;
}
<St_XmlOnly>[^\\@\n]+ |
<St_XmlOnly>\n |
<St_XmlOnly>. {
g_token->verb+=yytext;
}
<St_Verbatim>{CMD}"endverbatim" { <St_Verbatim>{CMD}"endverbatim" {
return RetVal_OK; return RetVal_OK;
} }
...@@ -742,6 +751,10 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -742,6 +751,10 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
g_endMarker="endlatexonly"; g_endMarker="endlatexonly";
BEGIN(St_SecSkip); BEGIN(St_SecSkip);
} }
<St_Sections>{CMD}"xmlonly" {
g_endMarker="endxmlonly";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"code" { <St_Sections>{CMD}"code" {
g_endMarker="endcode"; g_endMarker="endcode";
BEGIN(St_SecSkip); BEGIN(St_SecSkip);
...@@ -850,6 +863,12 @@ void doctokenizerYYsetStateHtmlOnly() ...@@ -850,6 +863,12 @@ void doctokenizerYYsetStateHtmlOnly()
BEGIN(St_HtmlOnly); BEGIN(St_HtmlOnly);
} }
void doctokenizerYYsetStateXmlOnly()
{
g_token->verb="";
BEGIN(St_XmlOnly);
}
void doctokenizerYYsetStateLatexOnly() void doctokenizerYYsetStateLatexOnly()
{ {
g_token->verb=""; g_token->verb="";
......
This diff is collapsed.
...@@ -29,6 +29,7 @@ class FileDef; ...@@ -29,6 +29,7 @@ class FileDef;
class QTextStream; class QTextStream;
class DotNodeList; class DotNodeList;
class ClassSDict; class ClassSDict;
class MemberDef;
enum GraphOutputFormat { BITMAP , EPS }; enum GraphOutputFormat { BITMAP , EPS };
...@@ -48,7 +49,7 @@ struct EdgeInfo ...@@ -48,7 +49,7 @@ struct EdgeInfo
class DotNode class DotNode
{ {
public: public:
enum GraphType { Dependency, Inheritance, Collaboration, Hierarchy }; enum GraphType { Dependency, Inheritance, Collaboration, Hierarchy, CallGraph };
DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE,ClassDef *cd=0); DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE,ClassDef *cd=0);
~DotNode(); ~DotNode();
void addChild(DotNode *n, void addChild(DotNode *n,
...@@ -96,6 +97,7 @@ class DotNode ...@@ -96,6 +97,7 @@ class DotNode
friend class DotClassGraph; friend class DotClassGraph;
friend class DotInclDepGraph; friend class DotInclDepGraph;
friend class DotNodeList; friend class DotNodeList;
friend class DotCallGraph;
friend void writeDotGraph( friend void writeDotGraph(
DotNode *root, DotNode *root,
GraphType gt, GraphType gt,
...@@ -175,6 +177,25 @@ class DotInclDepGraph ...@@ -175,6 +177,25 @@ class DotInclDepGraph
int m_recDepth; int m_recDepth;
}; };
class DotCallGraph
{
public:
DotCallGraph(MemberDef *md,int maxRecursionDepth);
~DotCallGraph();
QCString writeGraph(QTextStream &t, GraphOutputFormat f,
const char *path,bool writeImageMap=TRUE);
void buildGraph(DotNode *n,MemberDef *md,int distance);
bool isTrivial() const;
private:
DotNode *m_startNode;
static int m_curNodeNumber;
QDict<DotNode> *m_usedNodes;
int m_maxDistance;
int m_recDepth;
QCString m_diskName;
};
void generateGraphLegend(const char *path); void generateGraphLegend(const char *path);
void writeDotGraphFromFile(const char *inFile,const char *outDir, void writeDotGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,GraphOutputFormat format); const char *outFile,GraphOutputFormat format);
......
...@@ -110,6 +110,7 @@ NamespaceDef *Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globa ...@@ -110,6 +110,7 @@ NamespaceDef *Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globa
QDict<RefList> *Doxygen::xrefLists = new QDict<RefList>; // dictionary of cross-referenced item lists QDict<RefList> *Doxygen::xrefLists = new QDict<RefList>; // dictionary of cross-referenced item lists
bool Doxygen::parseSourcesNeeded = FALSE;
static StringList inputFiles; static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections static StringDict excludeNameDict(1009); // sections
...@@ -1262,6 +1263,7 @@ static void findUsingDeclImports(Entry *root) ...@@ -1262,6 +1263,7 @@ static void findUsingDeclImports(Entry *root)
newMd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine()); newMd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
} }
newMd->setDefinition(md->definition()); newMd->setDefinition(md->definition());
newMd->enableCallGraph(root->callGraph);
newMd->setBitfields(md->bitfieldString()); newMd->setBitfields(md->bitfieldString());
newMd->addSectionsToDefinition(root->anchors); newMd->addSectionsToDefinition(root->anchors);
newMd->setBodySegment(md->getStartBodyLine(),md->getEndBodyLine()); newMd->setBodySegment(md->getStartBodyLine(),md->getEndBodyLine());
...@@ -1420,6 +1422,7 @@ static MemberDef *addVariableToClass( ...@@ -1420,6 +1422,7 @@ static MemberDef *addVariableToClass(
md->setMaxInitLines(root->initLines); md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
md->setMemberSpecifiers(root->memSpec); md->setMemberSpecifiers(root->memSpec);
md->enableCallGraph(root->callGraph);
addMemberToGroups(root,md); addMemberToGroups(root,md);
//if (root->mGrpId!=-1) //if (root->mGrpId!=-1)
//{ //{
...@@ -1588,6 +1591,7 @@ static MemberDef *addVariableToFile( ...@@ -1588,6 +1591,7 @@ static MemberDef *addVariableToFile(
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
md->setBodyDef(fd); md->setBodyDef(fd);
md->setDefinition(def); md->setDefinition(def);
md->enableCallGraph(root->callGraph);
md->setExplicitExternal(root->explicitExternal); md->setExplicitExternal(root->explicitExternal);
addMemberToGroups(root,md); addMemberToGroups(root,md);
//if (root->mGrpId!=-1) //if (root->mGrpId!=-1)
...@@ -2061,6 +2065,7 @@ static void addMethodToClass(Entry *root,ClassDef *cd, ...@@ -2061,6 +2065,7 @@ static void addMethodToClass(Entry *root,ClassDef *cd,
} }
if (def.left(7)=="friend ") def=def.right(def.length()-7); if (def.left(7)=="friend ") def=def.right(def.length()-7);
md->setDefinition(def); md->setDefinition(def);
md->enableCallGraph(root->callGraph);
Debug::print(Debug::Functions,0, Debug::print(Debug::Functions,0,
" Func Member:\n" " Func Member:\n"
...@@ -2267,6 +2272,8 @@ static void buildFunctionList(Entry *root) ...@@ -2267,6 +2272,8 @@ static void buildFunctionList(Entry *root)
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->enableCallGraph(md->hasCallGraph() || root->callGraph);
// merge ingroup specifiers // merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first()) if (md->getGroupDef()==0 && root->groups->first())
{ {
...@@ -2350,6 +2357,7 @@ static void buildFunctionList(Entry *root) ...@@ -2350,6 +2357,7 @@ static void buildFunctionList(Entry *root)
def.data() def.data()
); );
md->setDefinition(def); md->setDefinition(def);
md->enableCallGraph(root->callGraph);
//if (root->mGrpId!=-1) //if (root->mGrpId!=-1)
//{ //{
// md->setMemberGroup(memberGroupDict[root->mGrpId]); // md->setMemberGroup(memberGroupDict[root->mGrpId]);
...@@ -2486,6 +2494,9 @@ static void findFriends() ...@@ -2486,6 +2494,9 @@ static void findFriends()
fmd->setBodyMember(mmd); fmd->setBodyMember(mmd);
} }
mmd->setDocsForDefinition(fmd->isDocsForDefinition()); mmd->setDocsForDefinition(fmd->isDocsForDefinition());
mmd->enableCallGraph(mmd->hasCallGraph() || fmd->hasCallGraph());
fmd->enableCallGraph(mmd->hasCallGraph() || fmd->hasCallGraph());
} }
} }
} }
...@@ -2643,6 +2654,9 @@ static void transferFunctionDocumentation() ...@@ -2643,6 +2654,9 @@ static void transferFunctionDocumentation()
mdef->setMemberDeclaration(mdec); mdef->setMemberDeclaration(mdec);
mdec->setMemberDefinition(mdef); mdec->setMemberDefinition(mdef);
mdef->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
mdec->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
} }
} }
} }
...@@ -3760,6 +3774,7 @@ static void addMemberDocs(Entry *root, ...@@ -3760,6 +3774,7 @@ static void addMemberDocs(Entry *root,
// strip extern specifier // strip extern specifier
if (fDecl.left(7)=="extern ") fDecl=fDecl.right(fDecl.length()-7); if (fDecl.left(7)=="extern ") fDecl=fDecl.right(fDecl.length()-7);
md->setDefinition(fDecl); md->setDefinition(fDecl);
md->enableCallGraph(root->callGraph);
ClassDef *cd=md->getClassDef(); ClassDef *cd=md->getClassDef();
NamespaceDef *nd=md->getNamespaceDef(); NamespaceDef *nd=md->getNamespaceDef();
QCString fullName; QCString fullName;
...@@ -3857,6 +3872,8 @@ static void addMemberDocs(Entry *root, ...@@ -3857,6 +3872,8 @@ static void addMemberDocs(Entry *root,
md->setRefItems(root->sli); md->setRefItems(root->sli);
} }
md->enableCallGraph(md->hasCallGraph() || root->callGraph);
//md->setDefFile(root->fileName); //md->setDefFile(root->fileName);
//md->setDefLine(root->startLine); //md->setDefLine(root->startLine);
md->mergeMemberSpecifiers(root->memSpec); md->mergeMemberSpecifiers(root->memSpec);
...@@ -4701,6 +4718,7 @@ static void findMember(Entry *root, ...@@ -4701,6 +4718,7 @@ static void findMember(Entry *root,
} }
md->setMemberClass(cd); md->setMemberClass(cd);
md->setDefinition(funcDecl); md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
QCString doc=getOverloadDocs(); QCString doc=getOverloadDocs();
doc+="<p>"; doc+="<p>";
doc+=root->doc; doc+=root->doc;
...@@ -4855,6 +4873,7 @@ static void findMember(Entry *root, ...@@ -4855,6 +4873,7 @@ static void findMember(Entry *root,
md->setMemberClass(cd); md->setMemberClass(cd);
md->setMemberSpecifiers(root->memSpec); md->setMemberSpecifiers(root->memSpec);
md->setDefinition(funcDecl); md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
md->setDocumentation(root->doc,root->docFile,root->docLine); md->setDocumentation(root->doc,root->docFile,root->docLine);
md->setDocsForDefinition(!root->proto); md->setDocsForDefinition(!root->proto);
md->setPrototype(root->proto); md->setPrototype(root->proto);
...@@ -5112,6 +5131,7 @@ static void findEnums(Entry *root) ...@@ -5112,6 +5131,7 @@ static void findEnums(Entry *root)
// root->name.data(),root->bodyLine,root->fileName.data(),root->protection); // root->name.data(),root->bodyLine,root->fileName.data(),root->protection);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
md->enableCallGraph(root->callGraph);
//if (root->mGrpId!=-1) //if (root->mGrpId!=-1)
//{ //{
// md->setMemberGroup(memberGroupDict[root->mGrpId]); // md->setMemberGroup(memberGroupDict[root->mGrpId]);
...@@ -5534,6 +5554,12 @@ static void generateFileSources() ...@@ -5534,6 +5554,12 @@ static void generateFileSources()
msg("Generating code for file %s...\n",fd->docName().data()); msg("Generating code for file %s...\n",fd->docName().data());
fd->writeSource(*outputList); fd->writeSource(*outputList);
} }
else if (!fd->isReference() &&
(Doxygen::parseSourcesNeeded || Config_getBool("CALL_GRAPH")))
{
msg("Parsing code for file %s...\n",fd->docName().data());
fd->parseSource();
}
} }
} }
} }
...@@ -6405,7 +6431,7 @@ static void generateSearchIndex() ...@@ -6405,7 +6431,7 @@ static void generateSearchIndex()
QTextStream t(&f); QTextStream t(&f);
t << "#!/bin/sh" << endl t << "#!/bin/sh" << endl
<< "DOXYSEARCH=" << Config_getString("BIN_ABSPATH") << "/doxysearch" << endl << "DOXYSEARCH=" << Config_getString("BIN_ABSPATH") << "/doxysearch" << endl
<< "DOXYPATH=" << Config_getString("DOC_ABSPATH") << " "; << "DOXYPATH=\"" << Config_getString("DOC_ABSPATH") << " ";
QStrList &extDocPaths=Config_getList("EXT_DOC_PATHS"); QStrList &extDocPaths=Config_getList("EXT_DOC_PATHS");
char *s= extDocPaths.first(); char *s= extDocPaths.first();
...@@ -6415,7 +6441,7 @@ static void generateSearchIndex() ...@@ -6415,7 +6441,7 @@ static void generateSearchIndex()
s=extDocPaths.next(); s=extDocPaths.next();
} }
t << endl t << "\"" << endl
<< "if [ -f $DOXYSEARCH ]" << endl << "if [ -f $DOXYSEARCH ]" << endl
<< "then" << endl << "then" << endl
<< " $DOXYSEARCH $DOXYPATH" << endl << " $DOXYSEARCH $DOXYPATH" << endl
......
...@@ -93,6 +93,7 @@ class Doxygen ...@@ -93,6 +93,7 @@ class Doxygen
static NamespaceDef *globalScope; static NamespaceDef *globalScope;
static QDict<RefList> *xrefLists; // array of xref lists: todo, test, bug, deprecated ... static QDict<RefList> *xrefLists; // array of xref lists: todo, test, bug, deprecated ...
static QCString htmlFileExtension; static QCString htmlFileExtension;
static bool parseSourcesNeeded;
}; };
void initDoxygen(); void initDoxygen();
......
...@@ -81,6 +81,7 @@ Entry::Entry(const Entry &e) ...@@ -81,6 +81,7 @@ Entry::Entry(const Entry &e)
memSpec = e.memSpec; memSpec = e.memSpec;
initializer = e.initializer; initializer = e.initializer;
initLines = e.initLines; initLines = e.initLines;
callGraph = e.callGraph;
//todoId = e.todoId; //todoId = e.todoId;
//testId = e.testId; //testId = e.testId;
//bugId = e.bugId; //bugId = e.bugId;
...@@ -240,6 +241,7 @@ void Entry::reset() ...@@ -240,6 +241,7 @@ void Entry::reset()
bodyLine = -1; bodyLine = -1;
endBodyLine = -1; endBodyLine = -1;
mGrpId = -1; mGrpId = -1;
callGraph = FALSE;
//todoId = 0; //todoId = 0;
//testId = 0; //testId = 0;
//bugId = 0; //bugId = 0;
......
...@@ -27,7 +27,7 @@ enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event }; ...@@ -27,7 +27,7 @@ enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event };
struct ListItemInfo struct ListItemInfo
{ {
const char *type; QCString type;
int itemId; int itemId;
}; };
...@@ -253,6 +253,7 @@ class Entry ...@@ -253,6 +253,7 @@ class Entry
int memSpec; //!< member specifiers int memSpec; //!< member specifiers
int initLines; //!< define/variable initializer lines to show int initLines; //!< define/variable initializer lines to show
bool subGrouping; //!< automatically group class members? bool subGrouping; //!< automatically group class members?
bool callGraph; //!< do we need to draw the call graph?
Specifier virt; //!< virtualness of the entry Specifier virt; //!< virtualness of the entry
Entry *parent; //!< parent node in the tree Entry *parent; //!< parent node in the tree
QCString type; //!< member type QCString type; //!< member type
......
...@@ -32,6 +32,25 @@ ...@@ -32,6 +32,25 @@
#include "docparser.h" #include "docparser.h"
//#include "xml.h" //#include "xml.h"
class DevNullCodeDocInterface : public BaseCodeDocInterface
{
public:
virtual void codify(const char *) {}
virtual void writeCodeLink(const char *,const char *,
const char *,const char *) {}
virtual void writeLineNumber(const char *,const char *,
const char *,int) {}
virtual void startCodeLine() {}
virtual void endCodeLine() {}
virtual void startCodeAnchor(const char *) {}
virtual void endCodeAnchor() {}
virtual void startFontClass(const char *) {}
virtual void endFontClass() {}
virtual void writeCodeAnchor(const char *) {}
};
/*! create a new file definition, where \a p is the file path, /*! create a new file definition, where \a p is the file path,
\a the file name, and \a ref is an HTML anchor name if the \a the file name, and \a ref is an HTML anchor name if the
file was read from a tag file or 0 otherwise file was read from a tag file or 0 otherwise
...@@ -487,6 +506,14 @@ void FileDef::writeSource(OutputList &ol) ...@@ -487,6 +506,14 @@ void FileDef::writeSource(OutputList &ol)
ol.enableAll(); ol.enableAll();
} }
void FileDef::parseSource()
{
DevNullCodeDocInterface devNullIntf;
parseCode(devNullIntf,0,
fileToString(absFilePath(),Config_getBool("FILTER_SOURCE_FILES")),
FALSE,0,this
);
}
void FileDef::addMembersToMemberGroup() void FileDef::addMembersToMemberGroup()
{ {
......
...@@ -122,6 +122,7 @@ class FileDef : public Definition ...@@ -122,6 +122,7 @@ class FileDef : public Definition
void writeDetailedDocumentation(OutputList &ol); void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeSource(OutputList &ol); void writeSource(OutputList &ol);
void parseSource();
friend void generatedFileNames(); friend void generatedFileNames();
void insertMember(MemberDef *md); void insertMember(MemberDef *md);
void insertClass(ClassDef *cd); void insertClass(ClassDef *cd);
......
...@@ -437,13 +437,17 @@ int FTVHelp::decContentsDepth() ...@@ -437,13 +437,17 @@ int FTVHelp::decContentsDepth()
{ {
//int i; for (i=0;i<m_dc;i++) m_cts << " "; //int i; for (i=0;i<m_dc;i++) m_cts << " ";
m_indent--; ASSERT(m_indent>0);
QList<FTVNode> *nl = &m_indentNodes[m_indent]; if (m_indent>0)
FTVNode *parent = nl->getLast();
QList<FTVNode> *children = &m_indentNodes[m_indent+1];
while (!children->isEmpty())
{ {
parent->children.append(children->take(0)); m_indent--;
QList<FTVNode> *nl = &m_indentNodes[m_indent];
FTVNode *parent = nl->getLast();
QList<FTVNode> *children = &m_indentNodes[m_indent+1];
while (!children->isEmpty())
{
parent->children.append(children->take(0));
}
} }
return m_indent; return m_indent;
} }
......
...@@ -198,6 +198,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s) ...@@ -198,6 +198,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
m_t << s->text(); m_t << s->text();
break; break;
case DocVerbatim::LatexOnly: case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
/* nothing */ /* nothing */
break; break;
} }
......
...@@ -1053,6 +1053,15 @@ void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -1053,6 +1053,15 @@ void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g)
g.writeGraph(t,BITMAP,Config_getString("HTML_OUTPUT")); g.writeGraph(t,BITMAP,Config_getString("HTML_OUTPUT"));
} }
void HtmlGenerator::startCallGraph()
{
}
void HtmlGenerator::endCallGraph(DotCallGraph &g)
{
g.writeGraph(t,BITMAP,Config_getString("HTML_OUTPUT"));
}
void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g) void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g)
{ {
g.writeGraph(t,Config_getString("HTML_OUTPUT")); g.writeGraph(t,Config_getString("HTML_OUTPUT"));
......
...@@ -185,6 +185,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -185,6 +185,8 @@ class HtmlGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &g); void endDotGraph(DotClassGraph &g);
void startInclDepGraph(); void startInclDepGraph();
void endInclDepGraph(DotInclDepGraph &g); void endInclDepGraph(DotInclDepGraph &g);
void startCallGraph();
void endCallGraph(DotCallGraph &g);
void writeGraphicalHierarchy(DotGfxHierarchyTable &g); void writeGraphicalHierarchy(DotGfxHierarchyTable &g);
void startTextBlock(bool) {} void startTextBlock(bool) {}
......
...@@ -1298,6 +1298,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1298,6 +1298,7 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd->isLinkableInProject() && cd->templateMaster()==0) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
int index = getPrefixIndex(cd->className()); int index = getPrefixIndex(cd->className());
//printf("name=%s index=%d\n",cd->className().data(),index);
if (toupper(cd->className().at(index))!=startLetter) // new begin letter => new header if (toupper(cd->className().at(index))!=startLetter) // new begin letter => new header
{ {
startLetter=toupper(cd->className().at(index)); startLetter=toupper(cd->className().at(index));
...@@ -2270,6 +2271,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) ...@@ -2270,6 +2271,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
{ {
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp = 0; FTVHelp *ftvHelp = 0;
if (level>20)
{
warn(gd->getDefFileName(),gd->getDefLine(),
"Warning: maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",gd->name().data()
);
return;
}
bool &generateHtml = Config_getBool("GENERATE_HTML") ; bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
...@@ -2433,8 +2441,8 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) ...@@ -2433,8 +2441,8 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
md=members->next(); md=members->next();
} }
if(htmlHelp) htmlHelp->decContentsDepth(); if(htmlHelp && !first) htmlHelp->decContentsDepth();
if(ftvHelp) ftvHelp->decContentsDepth(); if(ftvHelp && !first) ftvHelp->decContentsDepth();
} }
} }
......
...@@ -252,6 +252,7 @@ void LatexDocVisitor::visit(DocVerbatim *s) ...@@ -252,6 +252,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
m_t << "\\end{verbatim}\\normalsize" << endl; m_t << "\\end{verbatim}\\normalsize" << endl;
break; break;
case DocVerbatim::HtmlOnly: case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
/* nothing */ /* nothing */
break; break;
case DocVerbatim::LatexOnly: case DocVerbatim::LatexOnly:
...@@ -295,8 +296,8 @@ void LatexDocVisitor::visit(DocInclude *inc) ...@@ -295,8 +296,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
void LatexDocVisitor::visit(DocIncOperator *op) void LatexDocVisitor::visit(DocIncOperator *op)
{ {
printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n", //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
op->type(),op->isFirst(),op->isLast(),op->text().data()); // op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst()) if (op->isFirst())
{ {
if (!m_hide) m_t << "\n\n\\footnotesize\\begin{verbatim}"; if (!m_hide) m_t << "\n\n\\footnotesize\\begin{verbatim}";
......
...@@ -1388,6 +1388,15 @@ void LatexGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -1388,6 +1388,15 @@ void LatexGenerator::endInclDepGraph(DotInclDepGraph &g)
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT")); g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"));
} }
void LatexGenerator::startCallGraph()
{
}
void LatexGenerator::endCallGraph(DotCallGraph &g)
{
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"));
}
void LatexGenerator::startDescription() void LatexGenerator::startDescription()
{ {
t << "\\begin{description}" << endl; t << "\\begin{description}" << endl;
......
...@@ -261,6 +261,8 @@ class LatexGenerator : public OutputGenerator ...@@ -261,6 +261,8 @@ class LatexGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &); void endDotGraph(DotClassGraph &);
void startInclDepGraph(); void startInclDepGraph();
void endInclDepGraph(DotInclDepGraph &); void endInclDepGraph(DotInclDepGraph &);
void startCallGraph();
void endCallGraph(DotCallGraph &);
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {} void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startTextBlock(bool) {} void startTextBlock(bool) {}
......
...@@ -198,8 +198,7 @@ void ManDocVisitor::visit(DocVerbatim *s) ...@@ -198,8 +198,7 @@ void ManDocVisitor::visit(DocVerbatim *s)
m_firstCol=TRUE; m_firstCol=TRUE;
break; break;
case DocVerbatim::HtmlOnly: case DocVerbatim::HtmlOnly:
/* nothing */ case DocVerbatim::XmlOnly:
break;
case DocVerbatim::LatexOnly: case DocVerbatim::LatexOnly:
/* nothing */ /* nothing */
break; break;
......
...@@ -227,6 +227,8 @@ class ManGenerator : public OutputGenerator ...@@ -227,6 +227,8 @@ class ManGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &) {} void endDotGraph(DotClassGraph &) {}
void startInclDepGraph() {} void startInclDepGraph() {}
void endInclDepGraph(DotInclDepGraph &) {} void endInclDepGraph(DotInclDepGraph &) {}
void startCallGraph() {}
void endCallGraph(DotCallGraph &) {}
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {} void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startTextBlock(bool) {} void startTextBlock(bool) {}
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "groupdef.h" #include "groupdef.h"
#include "defargs.h" #include "defargs.h"
#include "docparser.h" #include "docparser.h"
#include "dot.h"
//#include "xml.h" //#include "xml.h"
...@@ -282,6 +283,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -282,6 +283,7 @@ MemberDef::MemberDef(const char *df,int dl,
//scopeTAL=0; //scopeTAL=0;
//membTAL=0; //membTAL=0;
m_defTmpArgLists=0; m_defTmpArgLists=0;
m_hasCallGraph = FALSE;
initLines=0; initLines=0;
type=t; type=t;
if (mt==Typedef && type.left(8)=="typedef ") type=type.mid(8); if (mt==Typedef && type.left(8)=="typedef ") type=type.mid(8);
...@@ -1568,7 +1570,24 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1568,7 +1570,24 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex); //if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
if ((m_hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT")
)
{
DotCallGraph callGraph(this,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!callGraph.isTrivial())
{
msg("Generating call graph for function %s\n",qualifiedName().data());
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.startCallGraph();
//ol.parseText(theTranslator->trCallGraph());
ol.endCallGraph(callGraph);
ol.enableAll();
}
}
} }
} }
void MemberDef::warnIfUndocumented() void MemberDef::warnIfUndocumented()
...@@ -1992,3 +2011,9 @@ void MemberDef::findSectionsInDocumentation() ...@@ -1992,3 +2011,9 @@ void MemberDef::findSectionsInDocumentation()
docFindSections(documentation(),this,0,docFile()); docFindSections(documentation(),this,0,docFile());
} }
void MemberDef::enableCallGraph(bool e)
{
m_hasCallGraph=e;
if (e) Doxygen::parseSourcesNeeded = TRUE;
}
...@@ -225,6 +225,10 @@ class MemberDef : public Definition ...@@ -225,6 +225,10 @@ class MemberDef : public Definition
//void setIndentDepth( int i) { indDepth=i; } //void setIndentDepth( int i) { indDepth=i; }
//int indentDepth() { return indDepth; } //int indentDepth() { return indDepth; }
// callgraph related members
bool hasCallGraph() const { return m_hasCallGraph; }
void enableCallGraph(bool e);
bool visibleMemberGroup(bool hideNoHeader); bool visibleMemberGroup(bool hideNoHeader);
MemberDef *templateMaster() const { return m_templateMaster; } MemberDef *templateMaster() const { return m_templateMaster; }
...@@ -292,6 +296,7 @@ class MemberDef : public Definition ...@@ -292,6 +296,7 @@ class MemberDef : public Definition
bool annScope; // member is part of an annoymous scope bool annScope; // member is part of an annoymous scope
bool annUsed; bool annUsed;
bool annShown; bool annShown;
bool m_hasCallGraph;
//int indDepth; // indentation depth for this member if inside an annonymous scope //int indDepth; // indentation depth for this member if inside an annonymous scope
int maxInitLines; // when the initializer will be displayed int maxInitLines; // when the initializer will be displayed
int userInitLines; // result of explicit \hideinitializer or \showinitializer int userInitLines; // result of explicit \hideinitializer or \showinitializer
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
class ClassDiagram; class ClassDiagram;
class DotClassGraph; class DotClassGraph;
class DotInclDepGraph; class DotInclDepGraph;
class DotCallGraph;
class DotGfxHierarchyTable; class DotGfxHierarchyTable;
class DocNode; class DocNode;
class MemberDef; class MemberDef;
...@@ -334,6 +335,8 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -334,6 +335,8 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endDotGraph(DotClassGraph &g) = 0; virtual void endDotGraph(DotClassGraph &g) = 0;
virtual void startInclDepGraph() = 0; virtual void startInclDepGraph() = 0;
virtual void endInclDepGraph(DotInclDepGraph &g) = 0; virtual void endInclDepGraph(DotInclDepGraph &g) = 0;
virtual void startCallGraph() = 0;
virtual void endCallGraph(DotCallGraph &g) = 0;
virtual void writeGraphicalHierarchy(DotGfxHierarchyTable &g) = 0; virtual void writeGraphicalHierarchy(DotGfxHierarchyTable &g) = 0;
virtual void startQuickIndexItem(const char *s,const char *l) = 0; virtual void startQuickIndexItem(const char *s,const char *l) = 0;
virtual void endQuickIndexItem() = 0; virtual void endQuickIndexItem() = 0;
......
...@@ -197,6 +197,7 @@ void OutputList::parseDoc(const char *fileName,int startLine, ...@@ -197,6 +197,7 @@ void OutputList::parseDoc(const char *fileName,int startLine,
const char *exampleName,SectionDict *sections) const char *exampleName,SectionDict *sections)
{ {
int count=0; int count=0;
OutputGenerator *og=outputs->first(); OutputGenerator *og=outputs->first();
while (og) while (og)
{ {
...@@ -205,9 +206,19 @@ void OutputList::parseDoc(const char *fileName,int startLine, ...@@ -205,9 +206,19 @@ void OutputList::parseDoc(const char *fileName,int startLine,
} }
if (count==0) return; // no output formats enabled. if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseDoc(fileName,startLine, DocNode *root=0;
clName,md,docStr,isExample,exampleName, if (docStr.length()==0 || docStr.at(docStr.length()-1)=='\n')
sections); {
root = validatingParseDoc(fileName,startLine,
clName,md,docStr,isExample,exampleName,
sections);
}
else
{
root = validatingParseDoc(fileName,startLine,
clName,md,docStr+"\n",isExample,exampleName,
sections);
}
og=outputs->first(); og=outputs->first();
while (og) while (og)
...@@ -314,6 +325,7 @@ FORALL1(char a1,a1) ...@@ -314,6 +325,7 @@ FORALL1(char a1,a1)
FORALL1(int a1,a1) FORALL1(int a1,a1)
FORALL1(DotClassGraph &a1,a1) FORALL1(DotClassGraph &a1,a1)
FORALL1(DotInclDepGraph &a1,a1) FORALL1(DotInclDepGraph &a1,a1)
FORALL1(DotCallGraph &a1,a1)
FORALL1(DotGfxHierarchyTable &a1,a1) FORALL1(DotGfxHierarchyTable &a1,a1)
FORALL1(SectionTypes a1,a1) FORALL1(SectionTypes a1,a1)
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE) #if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
......
...@@ -312,6 +312,10 @@ class OutputList : public OutputDocInterface ...@@ -312,6 +312,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startInclDepGraph); } { forall(&OutputGenerator::startInclDepGraph); }
void endInclDepGraph(DotInclDepGraph &g) void endInclDepGraph(DotInclDepGraph &g)
{ forall(&OutputGenerator::endInclDepGraph,g); } { forall(&OutputGenerator::endInclDepGraph,g); }
void startCallGraph()
{ forall(&OutputGenerator::startCallGraph); }
void endCallGraph(DotCallGraph &g)
{ forall(&OutputGenerator::endCallGraph,g); }
void writeGraphicalHierarchy(DotGfxHierarchyTable &g) void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
{ forall(&OutputGenerator::writeGraphicalHierarchy,g); } { forall(&OutputGenerator::writeGraphicalHierarchy,g); }
void startTextBlock(bool dense=FALSE) void startTextBlock(bool dense=FALSE)
...@@ -376,6 +380,7 @@ class OutputList : public OutputDocInterface ...@@ -376,6 +380,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO1(int); FORALLPROTO1(int);
FORALLPROTO1(DotClassGraph &); FORALLPROTO1(DotClassGraph &);
FORALLPROTO1(DotInclDepGraph &); FORALLPROTO1(DotInclDepGraph &);
FORALLPROTO1(DotCallGraph &);
FORALLPROTO1(DotGfxHierarchyTable &); FORALLPROTO1(DotGfxHierarchyTable &);
FORALLPROTO1(SectionTypes); FORALLPROTO1(SectionTypes);
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE) #if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
......
...@@ -619,6 +619,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s) ...@@ -619,6 +619,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::Verbatim: type = "preformatted"; break; case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break; case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break; case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break;
} }
openItem(type); openItem(type);
m_output.addFieldQuotedString("content", s->text()); m_output.addFieldQuotedString("content", s->text());
......
...@@ -1321,12 +1321,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1321,12 +1321,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_guardExpr="! "; g_guardExpr="! ";
BEGIN(DefinedExpr1); BEGIN(DefinedExpr1);
} }
<Command>"if"/[ \t(] { <Command>"if"/[ \t(!] {
incrLevel(); incrLevel();
g_guardExpr.resize(0); g_guardExpr.resize(0);
BEGIN(Guard); BEGIN(Guard);
} }
<Command>("elif"|"else"{B}*"if")/[ \t(] { <Command>("elif"|"else"{B}*"if")/[ \t(!] {
if (!otherCaseDone()) if (!otherCaseDone())
{ {
g_guardExpr.resize(0); g_guardExpr.resize(0);
...@@ -1354,7 +1354,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1354,7 +1354,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Command>"undef"{B}+ { <Command>"undef"{B}+ {
BEGIN(UndefName); BEGIN(UndefName);
} }
<Command>("elif"|"else"{B}*"if")/[ \t(] { <Command>("elif"|"else"{B}*"if")/[ \t(!] {
if (!otherCaseDone()) if (!otherCaseDone())
{ {
g_guardExpr.resize(0); g_guardExpr.resize(0);
...@@ -1445,7 +1445,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1445,7 +1445,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCPPBlock>^{B}*"#" { BEGIN(SkipCommand); } <SkipCPPBlock>^{B}*"#" { BEGIN(SkipCommand); }
<SkipCPPBlock>^{B}*/[^#] { BEGIN(SkipLine); } <SkipCPPBlock>^{B}*/[^#] { BEGIN(SkipLine); }
<SkipCPPBlock>. <SkipCPPBlock>.
<SkipCommand>"if"(("n")?("def"))?/[ \t(] { <SkipCommand>"if"(("n")?("def"))?/[ \t(!] {
incrLevel(); incrLevel();
g_ifcount++; g_ifcount++;
//printf("#if... depth=%d\n",g_ifcount); //printf("#if... depth=%d\n",g_ifcount);
...@@ -1459,7 +1459,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1459,7 +1459,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(Start); BEGIN(Start);
} }
} }
<SkipCommand>("elif"|"else"{B}*"if")/[ \t(] { <SkipCommand>("elif"|"else"{B}*"if")/[ \t(!] {
if (g_ifcount==0) if (g_ifcount==0)
{ {
if (!otherCaseDone()) if (!otherCaseDone())
......
...@@ -304,9 +304,8 @@ void RTFDocVisitor::visit(DocVerbatim *s) ...@@ -304,9 +304,8 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "}" << endl; m_t << "}" << endl;
break; break;
case DocVerbatim::HtmlOnly: case DocVerbatim::HtmlOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly: case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
/* nothing */ /* nothing */
break; break;
} }
......
...@@ -2223,6 +2223,27 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -2223,6 +2223,27 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl) DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl)
} }
void RTFGenerator::startCallGraph()
{
DBG_RTF(t << "{\\comment (startCallGraph)}" << endl)
}
void RTFGenerator::endCallGraph(DotCallGraph &g)
{
newParagraph();
QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),FALSE);
// display the file
t << "{" << endl;
t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
DBG_RTF(t << "{\\comment (endCallGraph)}" << endl)
}
/** Tests the integrity of the result by counting brackets. /** Tests the integrity of the result by counting brackets.
* *
*/ */
......
...@@ -223,6 +223,8 @@ class RTFGenerator : public OutputGenerator ...@@ -223,6 +223,8 @@ class RTFGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &); void endDotGraph(DotClassGraph &);
void startInclDepGraph(); void startInclDepGraph();
void endInclDepGraph(DotInclDepGraph &); void endInclDepGraph(DotInclDepGraph &);
void startCallGraph();
void endCallGraph(DotCallGraph &);
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {} void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startMemberGroupHeader(bool); void startMemberGroupHeader(bool);
......
...@@ -289,23 +289,30 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -289,23 +289,30 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
{ {
if (listName==0) return; if (listName==0) return;
//printf("addXRefItem(%s,%s,%s)\n",listName,itemTitle,listTitle);
ListItemInfo *lii=0; ListItemInfo *lii=0;
RefList *refList = Doxygen::xrefLists->find(listName); RefList *refList = Doxygen::xrefLists->find(listName);
if (refList==0) // new list if (refList==0) // new list
{ {
refList = new RefList(listName,listTitle,itemTitle); refList = new RefList(listName,listTitle,itemTitle);
Doxygen::xrefLists->insert(listName,refList); Doxygen::xrefLists->insert(listName,refList);
//printf("new list!\n");
} }
if (current->sli) if (current->sli)
{ {
QListIterator<ListItemInfo> slii(*current->sli); QListIterator<ListItemInfo> slii(*current->sli);
for (slii.toFirst();(lii=slii.current());++slii) for (slii.toFirst();(lii=slii.current());++slii)
{ {
if (strcmp(lii->type,listName)==0) break; if (strcmp(lii->type,listName)==0)
{
//printf("found %s lii->type=%s\n",listName,lii->type);
break;
}
} }
} }
if (lii) // already found item of same type before if (lii) // already found item of same type before
{ {
//printf("listName=%s item id = %d\n",listName,lii->itemId);
RefItem *item = refList->getRefItem(lii->itemId); RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0); ASSERT(item!=0);
item->text += " <p>"; item->text += " <p>";
...@@ -315,6 +322,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -315,6 +322,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
else // new item else // new item
{ {
int itemId = refList->addRefItem(); int itemId = refList->addRefItem();
//printf("listName=%s item id = %d\n",listName,itemId);
char anchorLabel[1024]; char anchorLabel[1024];
sprintf(anchorLabel,"_%s%06d",listName,itemId); sprintf(anchorLabel,"_%s%06d",listName,itemId);
RefItem *item = refList->getRefItem(itemId); RefItem *item = refList->getRefItem(itemId);
...@@ -484,7 +492,7 @@ static int yyread(char *buf,int max_size) ...@@ -484,7 +492,7 @@ static int yyread(char *buf,int max_size)
/* start command character */ /* start command character */
CMD ("\\"|"@") CMD ("\\"|"@")
SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"latexonly"|"htmlonly"|"{"|"verbatim"|"dotfile"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"typedef"|"def"|"overload")|("<"{PRE}">") SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"callgraph"|"latexonly"|"htmlonly"|"xmlonly"|"{"|"verbatim"|"dotfile"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"typedef"|"def"|"overload")|("<"{PRE}">")
BN [ \t\n\r] BN [ \t\n\r]
BL [ \t\r]*"\n" BL [ \t\r]*"\n"
B [ \t] B [ \t]
...@@ -1365,7 +1373,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -1365,7 +1373,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
BEGIN( Define ); BEGIN( Define );
} }
<FindMembers,ReadBody,ReadNSBody>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */ <FindMembers,ReadBody,ReadNSBody,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
yyLineNr = atoi(&yytext[1]); yyLineNr = atoi(&yytext[1]);
//printf("setting line number to %d\n",yyLineNr); //printf("setting line number to %d\n",yyLineNr);
lastPreLineCtrlContext = YY_START; lastPreLineCtrlContext = YY_START;
...@@ -3900,7 +3908,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3900,7 +3908,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
pSkipDoc=&current->brief; pSkipDoc=&current->brief;
BEGIN(SkipCode); BEGIN(SkipCode);
} }
<SkipVerbatim>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly")/[^a-z_A-Z0-9] { <SkipVerbatim>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly")/[^a-z_A-Z0-9] {
current->doc+=yytext; current->doc+=yytext;
BEGIN(lastVerbState); BEGIN(lastVerbState);
} }
...@@ -4016,13 +4024,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4016,13 +4024,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>("\\\\"|"@@")"f"[$\[\]] { <Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>("\\\\"|"@@")"f"[$\[\]] {
current->doc += yytext; current->doc += yytext;
} }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>{CMD}"f$" { <Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f$" {
lastFormulaContext = YY_START; lastFormulaContext = YY_START;
formulaText="$"; formulaText="$";
insideFormula=TRUE; insideFormula=TRUE;
BEGIN(ReadFormulaShort); BEGIN(ReadFormulaShort);
} }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>{CMD}"f[" { <Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f[" {
lastFormulaContext = YY_START; lastFormulaContext = YY_START;
formulaText="\\["; formulaText="\\[";
insideFormula=TRUE; insideFormula=TRUE;
...@@ -4036,9 +4044,18 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4036,9 +4044,18 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastFormulaContext==AfterDocBrief || lastFormulaContext==AfterDocBrief ||
lastFormulaContext==AfterDocLine lastFormulaContext==AfterDocLine
) )
{
current->brief += addFormula(); current->brief += addFormula();
}
else if (lastFormulaContext==CopyArgComment ||
lastFormulaContext==CopyArgCommentLine)
{
fullArgString += addFormula();
}
else else
{
current->doc += addFormula(); current->doc += addFormula();
}
insideFormula=FALSE; insideFormula=FALSE;
BEGIN(lastFormulaContext); BEGIN(lastFormulaContext);
} }
...@@ -4062,9 +4079,18 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4062,9 +4079,18 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastFormulaContext==AfterDocBrief || lastFormulaContext==AfterDocBrief ||
lastFormulaContext==AfterDocLine lastFormulaContext==AfterDocLine
) )
{
current->brief += addFormula(); current->brief += addFormula();
}
else if (lastFormulaContext==CopyArgComment ||
lastFormulaContext==CopyArgCommentLine)
{
fullArgString += addFormula();
}
else else
{
current->doc += addFormula(); current->doc += addFormula();
}
insideFormula=FALSE; insideFormula=FALSE;
BEGIN(lastFormulaContext); BEGIN(lastFormulaContext);
} }
...@@ -4251,6 +4277,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4251,6 +4277,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"hideinitializer"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"hideinitializer"/[^a-z_A-Z0-9] {
current->initLines = 0; // OFF current->initLines = 0; // OFF
} }
<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"callgraph"/[^a-z_A-Z0-9] {
current->callGraph = TRUE; // ON
}
<GroupName>{ID} { <GroupName>{ID} {
current->groups->append( current->groups->append(
new Grouping(yytext, Grouping::GROUPING_INGROUP) new Grouping(yytext, Grouping::GROUPING_INGROUP)
......
This diff is collapsed.
...@@ -3130,6 +3130,12 @@ void extractNamespaceName(const QCString &scopeName, ...@@ -3130,6 +3130,12 @@ void extractNamespaceName(const QCString &scopeName,
namespaceName.resize(0); namespaceName.resize(0);
done: done:
if (className.isEmpty() && !namespaceName.isEmpty())
{
// class and namespace with the same name, correct to return the class.
className=namespaceName.copy();
namespaceName.resize(0);
}
//printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(), //printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(),
// className.data(),namespaceName.data()); // className.data(),namespaceName.data());
return; return;
...@@ -4009,6 +4015,7 @@ void filterLatexString(QTextStream &t,const char *str, ...@@ -4009,6 +4015,7 @@ void filterLatexString(QTextStream &t,const char *str,
case '\\': t << "\\(\\backslash\\)"; break; case '\\': t << "\\(\\backslash\\)"; break;
case '{': t << "\\{"; break; case '{': t << "\\{"; break;
case '}': t << "\\}"; break; case '}': t << "\\}"; break;
case '_': t << "\\_"; break;
default: default:
{ {
// Some languages use wide characters // Some languages use wide characters
......
...@@ -185,6 +185,9 @@ void XmlDocVisitor::visit(DocVerbatim *s) ...@@ -185,6 +185,9 @@ void XmlDocVisitor::visit(DocVerbatim *s)
filter(s->text()); filter(s->text());
m_t << "</latexonly>"; m_t << "</latexonly>";
break; break;
case DocVerbatim::XmlOnly:
m_t << s->text();
break;
} }
} }
......
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