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
(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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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:
\refitem cmdbrief \\brief
\refitem cmdbug \\bug
\refitem cmdc \\c
\refitem cmdcallgraph \\callgraph
\refitem cmdclass \\class
\refitem cmdcode \\code
\refitem cmdcopydoc \\copydoc
......@@ -66,6 +67,7 @@ documentation:
\refitem cmdendlatexonly \\endlatexonly
\refitem cmdendlink \\endlink
\refitem cmdendverbatim \\endverbatim
\refitem cmdendxmlonly \\endxmlonly
\refitem cmdenum \\enum
\refitem cmdexample \\example
\refitem cmdexception \\exception
......@@ -129,6 +131,7 @@ documentation:
\refitem cmdversion \\version
\refitem cmdwarning \\warning
\refitem cmdweakgroup \\weakgroup
\refitem cmdxmlonly \\xmlonly
\refitem cmdxrefitem \\xrefitem
\refitem cmddollar \\\$
\refitem cmdat \\\@
......@@ -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
\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>]
\addindex \\class
......@@ -1551,6 +1565,14 @@ ALIASES = "english=\if english" \
\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>
\section cmdfdollar \f$
......@@ -1740,6 +1762,19 @@ ALIASES = "english=\if english" \
\warning Make sure you include a \\endverbatim command for each
\\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>
\section cmdbackslash \\
......
......@@ -62,6 +62,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_bin_abspath BIN_ABSPATH
\refitem cfg_binary_toc BINARY_TOC
\refitem cfg_brief_member_desc BRIEF_MEMBER_DESC
\refitem cfg_call_graph CALL_GRAPH
\refitem cfg_case_sense_names CASE_SENSE_NAMES
\refitem cfg_cgi_name CGI_NAME
\refitem cfg_cgi_url CGI_URL
......@@ -242,7 +243,8 @@ followed by the descriptions of the tags grouped by category.
The default language is English, other supported languages are:
Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
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
<dt>\c USE_WINDOWS_ENCODING <dd>
......@@ -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,
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
forces the Windows enconding, (this is the default for the Windows binary),
whereas setting the tag to \c NO uses a Unix-style encoding (the default for the
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
all platforms other than Windows).
\anchor cfg_extract_all
......@@ -366,7 +368,7 @@ function's detailed documentation block.
<dt>\c STRIP_FROM_PATH <dd>
\addindex STRIP_FROM_PATH
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
path.
......@@ -382,8 +384,8 @@ function's detailed documentation block.
<dt>\c CASE_SENSE_NAMES <dd>
\addindex CASE_SENSE_NAMES
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
\c YES upper case letters are also allowed. This is useful if you have
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
classes or files whose names only differ in case and if your file system
supports case sensitive file names.
......@@ -413,7 +415,7 @@ function's detailed documentation block.
<dt>\c SHOW_INCLUDE_FILES <dd>
\addindex SHOW_INCLUDE_FILES
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.
\anchor cfg_javadoc_autobrief
......@@ -529,7 +531,7 @@ function's detailed documentation block.
\endverbatim
will allow you to
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.
\anchor cfg_max_initializer_lines
......@@ -547,7 +549,7 @@ function's detailed documentation block.
\addindex OPTIMIZE_OUTPUT_FOR_C
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
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.
\anchor cfg_optimize_output_java
......@@ -555,7 +557,7 @@ function's detailed documentation block.
\addindex OPTIMIZE_OUTPUT_JAVA
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.
For instance namespaces will be presented as packages, qualified scopes
For instance, namespaces will be presented as packages, qualified scopes
will look different, etc.
\anchor cfg_show_used_files
......@@ -816,7 +818,7 @@ function's detailed documentation block.
\anchor cfg_html_header
<dt>\c HTML_HEADER <dd>
\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
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.
......@@ -847,7 +849,7 @@ function's detailed documentation block.
\anchor cfg_html_footer
<dt>\c HTML_FOOTER <dd>
\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
at least a \c \</BODY\> and a \c \</HTML\> tag. A minimal example:
\verbatim
......@@ -871,7 +873,7 @@ function's detailed documentation block.
\anchor cfg_html_stylesheet
<dt>\c HTML_STYLESHEET <dd>
\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
fine-tune the look of the HTML output. If the tag is left blank doxygen
will generate a default style sheet.
......@@ -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
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 on the generated index.hhp.
the HTML help compiler on the generated index.hhp.
\anchor cfg_generate_chi
<dt>\c GENERATE_CHI <dd>
......@@ -1053,7 +1055,7 @@ EXTRA_PACKAGES = times
let doxygen write the default header to a separate file.
\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:
<code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>,
......@@ -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
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.
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,
since it yield more powerful graphs.
......@@ -1467,6 +1469,15 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
documented header file showing the documented files that directly or indirectly
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
<dt>\c GRAPHICAL_HIERARCHY <dd>
\addindex GRAPHICAL_HIERARCHY
......@@ -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_height "MAX_DOT_GRAPH_HEIGHT").
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
<dt>\c MAX_DOT_GRAPH_WIDTH <dd>
......@@ -1537,7 +1548,7 @@ not depth constraint.
<dt>\c DOT_CLEANUP <dd>
\addindex DOT_CLEANUP
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>
......
......@@ -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
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>
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
that the text fragments that doxygen generates can be produced in
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):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish,
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.1
Version: 1.3.1_20030607
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -92,6 +92,7 @@ ClassDef::ClassDef(
m_membersMerged = FALSE;
QCString 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" &&
guessSection(defFileName)==Entry::SOURCE_SEC)
......
......@@ -41,6 +41,7 @@ CommandMap cmdMap[] =
{ "endlink", CMD_ENDLINK },
{ "endsecreflist", CMD_ENDSECREFLIST },
{ "endverbatim", CMD_ENDVERBATIM },
{ "endxmlonly", CMD_ENDXMLONLY },
{ "exception", CMD_EXCEPTION },
{ "form", CMD_FORMULA },
{ "htmlinclude", CMD_HTMLINCLUDE },
......@@ -79,6 +80,7 @@ CommandMap cmdMap[] =
{ "since", CMD_SINCE },
{ "skip", CMD_SKIP },
{ "skipline", CMD_SKIPLINE },
{ "xmlonly", CMD_XMLONLY },
{ "xrefitem", CMD_XREFITEM },
{ "throw", CMD_EXCEPTION },
{ "until", CMD_UNTIL },
......
......@@ -54,52 +54,54 @@ enum CommandType
CMD_ENDLINK = 20,
CMD_ENDSECREFLIST= 21,
CMD_ENDVERBATIM = 22,
CMD_EXCEPTION = 23 | SIMPLESECT_BIT,
CMD_FORMULA = 24,
CMD_GREATER = 25,
CMD_HASH = 26,
CMD_HTMLINCLUDE = 27,
CMD_HTMLONLY = 28,
CMD_IMAGE = 29,
CMD_INCLUDE = 30,
CMD_INTERNAL = 31,
CMD_INTERNALREF = 32,
CMD_INVARIANT = 33 | SIMPLESECT_BIT ,
CMD_LANGSWITCH = 34,
CMD_LATEXONLY = 35,
CMD_LESS = 36,
CMD_LI = 37,
CMD_LINE = 38,
CMD_LINEBREAK = 39,
CMD_LINK = 40,
CMD_NOTE = 41 | SIMPLESECT_BIT,
CMD_PAR = 42 | SIMPLESECT_BIT,
CMD_PARAM = 43 | SIMPLESECT_BIT,
CMD_PERCENT = 44,
CMD_POST = 45 | SIMPLESECT_BIT,
CMD_PRE = 46 | SIMPLESECT_BIT ,
CMD_REF = 47,
CMD_SECREFITEM = 48,
CMD_REMARK = 49 | SIMPLESECT_BIT ,
CMD_RETURN = 50 | SIMPLESECT_BIT ,
CMD_RETVAL = 51 | SIMPLESECT_BIT,
CMD_SA = 52 | SIMPLESECT_BIT ,
CMD_SECREFLIST = 53,
CMD_SECTION = 54,
CMD_SUBSECTION = 55,
CMD_SUBSUBSECTION= 56,
CMD_PARAGRAPH = 57,
CMD_SINCE = 58 | SIMPLESECT_BIT,
CMD_SKIP = 59,
CMD_SKIPLINE = 60,
CMD_STARTCODE = 61,
CMD_JAVALINK = 62,
CMD_UNTIL = 63,
CMD_VERBATIM = 64,
CMD_VERBINCLUDE = 65,
CMD_VERSION = 66 | SIMPLESECT_BIT,
CMD_WARNING = 67 | SIMPLESECT_BIT,
CMD_XREFITEM = 68 | SIMPLESECT_BIT
CMD_ENDXMLONLY = 23,
CMD_EXCEPTION = 24 | SIMPLESECT_BIT,
CMD_FORMULA = 25,
CMD_GREATER = 26,
CMD_HASH = 27,
CMD_HTMLINCLUDE = 28,
CMD_HTMLONLY = 29,
CMD_IMAGE = 30,
CMD_INCLUDE = 31,
CMD_INTERNAL = 32,
CMD_INTERNALREF = 33,
CMD_INVARIANT = 34 | SIMPLESECT_BIT ,
CMD_LANGSWITCH = 35,
CMD_LATEXONLY = 36,
CMD_LESS = 37,
CMD_LI = 38,
CMD_LINE = 39,
CMD_LINEBREAK = 40,
CMD_LINK = 41,
CMD_NOTE = 42 | SIMPLESECT_BIT,
CMD_PAR = 43 | SIMPLESECT_BIT,
CMD_PARAM = 44 | SIMPLESECT_BIT,
CMD_PERCENT = 45,
CMD_POST = 46 | SIMPLESECT_BIT,
CMD_PRE = 47 | SIMPLESECT_BIT ,
CMD_REF = 48,
CMD_SECREFITEM = 49,
CMD_REMARK = 50 | SIMPLESECT_BIT ,
CMD_RETURN = 51 | SIMPLESECT_BIT ,
CMD_RETVAL = 52 | SIMPLESECT_BIT,
CMD_SA = 53 | SIMPLESECT_BIT ,
CMD_SECREFLIST = 54,
CMD_SECTION = 55,
CMD_SUBSECTION = 56,
CMD_SUBSUBSECTION= 57,
CMD_PARAGRAPH = 58,
CMD_SINCE = 59 | SIMPLESECT_BIT,
CMD_SKIP = 60,
CMD_SKIPLINE = 61,
CMD_STARTCODE = 62,
CMD_JAVALINK = 63,
CMD_UNTIL = 64,
CMD_VERBATIM = 65,
CMD_VERBINCLUDE = 66,
CMD_VERSION = 67 | SIMPLESECT_BIT,
CMD_WARNING = 68 | SIMPLESECT_BIT,
CMD_XREFITEM = 69 | SIMPLESECT_BIT,
CMD_XMLONLY = 70
};
enum HtmlTagType
......
......@@ -1224,8 +1224,6 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_scopeStack.push(SCOPEBLOCK);
pushScope(g_curClassName);
//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)
{
g_curClassDef=new ClassDef("<code>",1,
......@@ -1611,9 +1609,6 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
BEGIN( SkipInits );
}
}
/*
<MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" {
*/
<CallEnd>({BN}"const"|"volatile")*{BN}*"{" {
if (g_insideBody)
{
......@@ -1622,10 +1617,19 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope();
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);
setClassScope(g_realScope);
}
else
{
......
This diff is collapsed.
......@@ -826,6 +826,15 @@ reparsetoken:
doctokenizerYYsetStatePara();
}
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:
{
DocFormula *form=new DocFormula(parent,g_token->id);
......@@ -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 "
"argument of command %s",cmdName.data());
return 0;
retval=0;
goto endparamlist;
}
ASSERT(tok==TK_WHITESPACE);
......@@ -3051,6 +3061,7 @@ int DocParamList::parse(const QString &cmdName)
m_paragraph->markFirst();
m_paragraph->markLast();
endparamlist:
DBG(("DocParamList::parse() end retval=%d\n",retval));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
......@@ -3588,6 +3599,15 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara();
}
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:
{
doctokenizerYYsetStateVerbatim();
......@@ -3600,6 +3620,7 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_ENDCODE:
case CMD_ENDHTMLONLY:
case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY:
case CMD_ENDLINK:
case CMD_ENDVERBATIM:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
......@@ -4491,6 +4512,9 @@ int DocSection::parse()
retval=0; // stop parsing
}
else
{
}
INTERNAL_ASSERT(retval==0 ||
retval==RetVal_Section ||
......@@ -4615,6 +4639,18 @@ void DocRoot::parse()
{
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);
if (lastPar) lastPar->markLast();
......@@ -4642,6 +4678,7 @@ void DocRoot::parse()
retval = in->parse();
}
handleUnclosedStyleCommands();
DocNode *n = g_nodeStack.pop();
......
......@@ -351,7 +351,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode
{
public:
enum Type { Code, HtmlOnly, LatexOnly, Verbatim };
enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim };
DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample,
const QString &exampleFile) :
......
......@@ -121,6 +121,7 @@ void doctokenizerYYsetStateTitle();
void doctokenizerYYsetStateCode();
void doctokenizerYYsetStateHtmlOnly();
void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly();
void doctokenizerYYsetStateVerbatim();
void doctokenizerYYsetStateParam();
void doctokenizerYYsetStateXRefItem();
......
......@@ -306,6 +306,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%x St_Code
%x St_HtmlOnly
%x St_LatexOnly
%x St_XmlOnly
%x St_Verbatim
%x St_Param
%x St_XRefItem
......@@ -507,6 +508,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_LatexOnly>. {
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" {
return RetVal_OK;
}
......@@ -742,6 +751,10 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
g_endMarker="endlatexonly";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"xmlonly" {
g_endMarker="endxmlonly";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"code" {
g_endMarker="endcode";
BEGIN(St_SecSkip);
......@@ -850,6 +863,12 @@ void doctokenizerYYsetStateHtmlOnly()
BEGIN(St_HtmlOnly);
}
void doctokenizerYYsetStateXmlOnly()
{
g_token->verb="";
BEGIN(St_XmlOnly);
}
void doctokenizerYYsetStateLatexOnly()
{
g_token->verb="";
......
This diff is collapsed.
......@@ -29,6 +29,7 @@ class FileDef;
class QTextStream;
class DotNodeList;
class ClassSDict;
class MemberDef;
enum GraphOutputFormat { BITMAP , EPS };
......@@ -48,7 +49,7 @@ struct EdgeInfo
class DotNode
{
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();
void addChild(DotNode *n,
......@@ -96,6 +97,7 @@ class DotNode
friend class DotClassGraph;
friend class DotInclDepGraph;
friend class DotNodeList;
friend class DotCallGraph;
friend void writeDotGraph(
DotNode *root,
GraphType gt,
......@@ -175,6 +177,25 @@ class DotInclDepGraph
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 writeDotGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,GraphOutputFormat format);
......
......@@ -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
bool Doxygen::parseSourcesNeeded = FALSE;
static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections
......@@ -1262,6 +1263,7 @@ static void findUsingDeclImports(Entry *root)
newMd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
}
newMd->setDefinition(md->definition());
newMd->enableCallGraph(root->callGraph);
newMd->setBitfields(md->bitfieldString());
newMd->addSectionsToDefinition(root->anchors);
newMd->setBodySegment(md->getStartBodyLine(),md->getEndBodyLine());
......@@ -1420,6 +1422,7 @@ static MemberDef *addVariableToClass(
md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId);
md->setMemberSpecifiers(root->memSpec);
md->enableCallGraph(root->callGraph);
addMemberToGroups(root,md);
//if (root->mGrpId!=-1)
//{
......@@ -1588,6 +1591,7 @@ static MemberDef *addVariableToFile(
md->setMemberGroupId(root->mGrpId);
md->setBodyDef(fd);
md->setDefinition(def);
md->enableCallGraph(root->callGraph);
md->setExplicitExternal(root->explicitExternal);
addMemberToGroups(root,md);
//if (root->mGrpId!=-1)
......@@ -2061,6 +2065,7 @@ static void addMethodToClass(Entry *root,ClassDef *cd,
}
if (def.left(7)=="friend ") def=def.right(def.length()-7);
md->setDefinition(def);
md->enableCallGraph(root->callGraph);
Debug::print(Debug::Functions,0,
" Func Member:\n"
......@@ -2267,6 +2272,8 @@ static void buildFunctionList(Entry *root)
md->addSectionsToDefinition(root->anchors);
md->enableCallGraph(md->hasCallGraph() || root->callGraph);
// merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first())
{
......@@ -2350,6 +2357,7 @@ static void buildFunctionList(Entry *root)
def.data()
);
md->setDefinition(def);
md->enableCallGraph(root->callGraph);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
......@@ -2486,6 +2494,9 @@ static void findFriends()
fmd->setBodyMember(mmd);
}
mmd->setDocsForDefinition(fmd->isDocsForDefinition());
mmd->enableCallGraph(mmd->hasCallGraph() || fmd->hasCallGraph());
fmd->enableCallGraph(mmd->hasCallGraph() || fmd->hasCallGraph());
}
}
}
......@@ -2643,6 +2654,9 @@ static void transferFunctionDocumentation()
mdef->setMemberDeclaration(mdec);
mdec->setMemberDefinition(mdef);
mdef->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
mdec->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
}
}
}
......@@ -3760,6 +3774,7 @@ static void addMemberDocs(Entry *root,
// strip extern specifier
if (fDecl.left(7)=="extern ") fDecl=fDecl.right(fDecl.length()-7);
md->setDefinition(fDecl);
md->enableCallGraph(root->callGraph);
ClassDef *cd=md->getClassDef();
NamespaceDef *nd=md->getNamespaceDef();
QCString fullName;
......@@ -3857,6 +3872,8 @@ static void addMemberDocs(Entry *root,
md->setRefItems(root->sli);
}
md->enableCallGraph(md->hasCallGraph() || root->callGraph);
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
md->mergeMemberSpecifiers(root->memSpec);
......@@ -4701,6 +4718,7 @@ static void findMember(Entry *root,
}
md->setMemberClass(cd);
md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
QCString doc=getOverloadDocs();
doc+="<p>";
doc+=root->doc;
......@@ -4855,6 +4873,7 @@ static void findMember(Entry *root,
md->setMemberClass(cd);
md->setMemberSpecifiers(root->memSpec);
md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
md->setDocumentation(root->doc,root->docFile,root->docLine);
md->setDocsForDefinition(!root->proto);
md->setPrototype(root->proto);
......@@ -5112,6 +5131,7 @@ static void findEnums(Entry *root)
// root->name.data(),root->bodyLine,root->fileName.data(),root->protection);
md->addSectionsToDefinition(root->anchors);
md->setMemberGroupId(root->mGrpId);
md->enableCallGraph(root->callGraph);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
......@@ -5534,6 +5554,12 @@ static void generateFileSources()
msg("Generating code for file %s...\n",fd->docName().data());
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()
QTextStream t(&f);
t << "#!/bin/sh" << 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");
char *s= extDocPaths.first();
......@@ -6415,7 +6441,7 @@ static void generateSearchIndex()
s=extDocPaths.next();
}
t << endl
t << "\"" << endl
<< "if [ -f $DOXYSEARCH ]" << endl
<< "then" << endl
<< " $DOXYSEARCH $DOXYPATH" << endl
......
......@@ -93,6 +93,7 @@ class Doxygen
static NamespaceDef *globalScope;
static QDict<RefList> *xrefLists; // array of xref lists: todo, test, bug, deprecated ...
static QCString htmlFileExtension;
static bool parseSourcesNeeded;
};
void initDoxygen();
......
......@@ -81,6 +81,7 @@ Entry::Entry(const Entry &e)
memSpec = e.memSpec;
initializer = e.initializer;
initLines = e.initLines;
callGraph = e.callGraph;
//todoId = e.todoId;
//testId = e.testId;
//bugId = e.bugId;
......@@ -240,6 +241,7 @@ void Entry::reset()
bodyLine = -1;
endBodyLine = -1;
mGrpId = -1;
callGraph = FALSE;
//todoId = 0;
//testId = 0;
//bugId = 0;
......
......@@ -27,7 +27,7 @@ enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event };
struct ListItemInfo
{
const char *type;
QCString type;
int itemId;
};
......@@ -253,6 +253,7 @@ class Entry
int memSpec; //!< member specifiers
int initLines; //!< define/variable initializer lines to show
bool subGrouping; //!< automatically group class members?
bool callGraph; //!< do we need to draw the call graph?
Specifier virt; //!< virtualness of the entry
Entry *parent; //!< parent node in the tree
QCString type; //!< member type
......
......@@ -32,6 +32,25 @@
#include "docparser.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,
\a the file name, and \a ref is an HTML anchor name if the
file was read from a tag file or 0 otherwise
......@@ -487,6 +506,14 @@ void FileDef::writeSource(OutputList &ol)
ol.enableAll();
}
void FileDef::parseSource()
{
DevNullCodeDocInterface devNullIntf;
parseCode(devNullIntf,0,
fileToString(absFilePath(),Config_getBool("FILTER_SOURCE_FILES")),
FALSE,0,this
);
}
void FileDef::addMembersToMemberGroup()
{
......
......@@ -122,6 +122,7 @@ class FileDef : public Definition
void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
void writeSource(OutputList &ol);
void parseSource();
friend void generatedFileNames();
void insertMember(MemberDef *md);
void insertClass(ClassDef *cd);
......
......@@ -437,13 +437,17 @@ int FTVHelp::decContentsDepth()
{
//int i; for (i=0;i<m_dc;i++) m_cts << " ";
m_indent--;
QList<FTVNode> *nl = &m_indentNodes[m_indent];
FTVNode *parent = nl->getLast();
QList<FTVNode> *children = &m_indentNodes[m_indent+1];
while (!children->isEmpty())
ASSERT(m_indent>0);
if (m_indent>0)
{
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;
}
......
......@@ -198,6 +198,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
m_t << s->text();
break;
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
/* nothing */
break;
}
......
......@@ -1053,6 +1053,15 @@ void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g)
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)
{
g.writeGraph(t,Config_getString("HTML_OUTPUT"));
......
......@@ -185,6 +185,8 @@ class HtmlGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &g);
void startInclDepGraph();
void endInclDepGraph(DotInclDepGraph &g);
void startCallGraph();
void endCallGraph(DotCallGraph &g);
void writeGraphicalHierarchy(DotGfxHierarchyTable &g);
void startTextBlock(bool) {}
......
......@@ -1298,6 +1298,7 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
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
{
startLetter=toupper(cd->className().at(index));
......@@ -2270,6 +2271,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
{
HtmlHelp *htmlHelp=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 hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
......@@ -2433,8 +2441,8 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
md=members->next();
}
if(htmlHelp) htmlHelp->decContentsDepth();
if(ftvHelp) ftvHelp->decContentsDepth();
if(htmlHelp && !first) htmlHelp->decContentsDepth();
if(ftvHelp && !first) ftvHelp->decContentsDepth();
}
}
......
......@@ -252,6 +252,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
m_t << "\\end{verbatim}\\normalsize" << endl;
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
......@@ -295,8 +296,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
void LatexDocVisitor::visit(DocIncOperator *op)
{
printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
op->type(),op->isFirst(),op->isLast(),op->text().data());
//printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
if (!m_hide) m_t << "\n\n\\footnotesize\\begin{verbatim}";
......
......@@ -1388,6 +1388,15 @@ void LatexGenerator::endInclDepGraph(DotInclDepGraph &g)
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()
{
t << "\\begin{description}" << endl;
......
......@@ -261,6 +261,8 @@ class LatexGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &);
void startInclDepGraph();
void endInclDepGraph(DotInclDepGraph &);
void startCallGraph();
void endCallGraph(DotCallGraph &);
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startTextBlock(bool) {}
......
......@@ -198,8 +198,7 @@ void ManDocVisitor::visit(DocVerbatim *s)
m_firstCol=TRUE;
break;
case DocVerbatim::HtmlOnly:
/* nothing */
break;
case DocVerbatim::XmlOnly:
case DocVerbatim::LatexOnly:
/* nothing */
break;
......
......@@ -227,6 +227,8 @@ class ManGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &) {}
void startInclDepGraph() {}
void endInclDepGraph(DotInclDepGraph &) {}
void startCallGraph() {}
void endCallGraph(DotCallGraph &) {}
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startTextBlock(bool) {}
......
......@@ -31,6 +31,7 @@
#include "groupdef.h"
#include "defargs.h"
#include "docparser.h"
#include "dot.h"
//#include "xml.h"
......@@ -282,6 +283,7 @@ MemberDef::MemberDef(const char *df,int dl,
//scopeTAL=0;
//membTAL=0;
m_defTmpArgLists=0;
m_hasCallGraph = FALSE;
initLines=0;
type=t;
if (mt==Typedef && type.left(8)=="typedef ") type=type.mid(8);
......@@ -1568,7 +1570,24 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
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()
......@@ -1992,3 +2011,9 @@ void MemberDef::findSectionsInDocumentation()
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
//void setIndentDepth( int i) { indDepth=i; }
//int indentDepth() { return indDepth; }
// callgraph related members
bool hasCallGraph() const { return m_hasCallGraph; }
void enableCallGraph(bool e);
bool visibleMemberGroup(bool hideNoHeader);
MemberDef *templateMaster() const { return m_templateMaster; }
......@@ -292,6 +296,7 @@ class MemberDef : public Definition
bool annScope; // member is part of an annoymous scope
bool annUsed;
bool annShown;
bool m_hasCallGraph;
//int indDepth; // indentation depth for this member if inside an annonymous scope
int maxInitLines; // when the initializer will be displayed
int userInitLines; // result of explicit \hideinitializer or \showinitializer
......
......@@ -29,6 +29,7 @@
class ClassDiagram;
class DotClassGraph;
class DotInclDepGraph;
class DotCallGraph;
class DotGfxHierarchyTable;
class DocNode;
class MemberDef;
......@@ -334,6 +335,8 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endDotGraph(DotClassGraph &g) = 0;
virtual void startInclDepGraph() = 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 startQuickIndexItem(const char *s,const char *l) = 0;
virtual void endQuickIndexItem() = 0;
......
......@@ -197,6 +197,7 @@ void OutputList::parseDoc(const char *fileName,int startLine,
const char *exampleName,SectionDict *sections)
{
int count=0;
OutputGenerator *og=outputs->first();
while (og)
{
......@@ -205,9 +206,19 @@ void OutputList::parseDoc(const char *fileName,int startLine,
}
if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseDoc(fileName,startLine,
clName,md,docStr,isExample,exampleName,
sections);
DocNode *root=0;
if (docStr.length()==0 || docStr.at(docStr.length()-1)=='\n')
{
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();
while (og)
......@@ -314,6 +325,7 @@ FORALL1(char a1,a1)
FORALL1(int a1,a1)
FORALL1(DotClassGraph &a1,a1)
FORALL1(DotInclDepGraph &a1,a1)
FORALL1(DotCallGraph &a1,a1)
FORALL1(DotGfxHierarchyTable &a1,a1)
FORALL1(SectionTypes a1,a1)
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
......
......@@ -312,6 +312,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startInclDepGraph); }
void endInclDepGraph(DotInclDepGraph &g)
{ forall(&OutputGenerator::endInclDepGraph,g); }
void startCallGraph()
{ forall(&OutputGenerator::startCallGraph); }
void endCallGraph(DotCallGraph &g)
{ forall(&OutputGenerator::endCallGraph,g); }
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
{ forall(&OutputGenerator::writeGraphicalHierarchy,g); }
void startTextBlock(bool dense=FALSE)
......@@ -376,6 +380,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO1(int);
FORALLPROTO1(DotClassGraph &);
FORALLPROTO1(DotInclDepGraph &);
FORALLPROTO1(DotCallGraph &);
FORALLPROTO1(DotGfxHierarchyTable &);
FORALLPROTO1(SectionTypes);
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
......
......@@ -619,6 +619,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break;
}
openItem(type);
m_output.addFieldQuotedString("content", s->text());
......
......@@ -1321,12 +1321,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_guardExpr="! ";
BEGIN(DefinedExpr1);
}
<Command>"if"/[ \t(] {
<Command>"if"/[ \t(!] {
incrLevel();
g_guardExpr.resize(0);
BEGIN(Guard);
}
<Command>("elif"|"else"{B}*"if")/[ \t(] {
<Command>("elif"|"else"{B}*"if")/[ \t(!] {
if (!otherCaseDone())
{
g_guardExpr.resize(0);
......@@ -1354,7 +1354,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Command>"undef"{B}+ {
BEGIN(UndefName);
}
<Command>("elif"|"else"{B}*"if")/[ \t(] {
<Command>("elif"|"else"{B}*"if")/[ \t(!] {
if (!otherCaseDone())
{
g_guardExpr.resize(0);
......@@ -1445,7 +1445,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCPPBlock>^{B}*"#" { BEGIN(SkipCommand); }
<SkipCPPBlock>^{B}*/[^#] { BEGIN(SkipLine); }
<SkipCPPBlock>.
<SkipCommand>"if"(("n")?("def"))?/[ \t(] {
<SkipCommand>"if"(("n")?("def"))?/[ \t(!] {
incrLevel();
g_ifcount++;
//printf("#if... depth=%d\n",g_ifcount);
......@@ -1459,7 +1459,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(Start);
}
}
<SkipCommand>("elif"|"else"{B}*"if")/[ \t(] {
<SkipCommand>("elif"|"else"{B}*"if")/[ \t(!] {
if (g_ifcount==0)
{
if (!otherCaseDone())
......
......@@ -304,9 +304,8 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "}" << endl;
break;
case DocVerbatim::HtmlOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
/* nothing */
break;
}
......
......@@ -2223,6 +2223,27 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
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.
*
*/
......
......@@ -223,6 +223,8 @@ class RTFGenerator : public OutputGenerator
void endDotGraph(DotClassGraph &);
void startInclDepGraph();
void endInclDepGraph(DotInclDepGraph &);
void startCallGraph();
void endCallGraph(DotCallGraph &);
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startMemberGroupHeader(bool);
......
......@@ -289,23 +289,30 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
{
if (listName==0) return;
//printf("addXRefItem(%s,%s,%s)\n",listName,itemTitle,listTitle);
ListItemInfo *lii=0;
RefList *refList = Doxygen::xrefLists->find(listName);
if (refList==0) // new list
{
refList = new RefList(listName,listTitle,itemTitle);
Doxygen::xrefLists->insert(listName,refList);
//printf("new list!\n");
}
if (current->sli)
{
QListIterator<ListItemInfo> slii(*current->sli);
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
{
//printf("listName=%s item id = %d\n",listName,lii->itemId);
RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0);
item->text += " <p>";
......@@ -315,6 +322,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
else // new item
{
int itemId = refList->addRefItem();
//printf("listName=%s item id = %d\n",listName,itemId);
char anchorLabel[1024];
sprintf(anchorLabel,"_%s%06d",listName,itemId);
RefItem *item = refList->getRefItem(itemId);
......@@ -484,7 +492,7 @@ static int yyread(char *buf,int max_size)
/* start command character */
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]
BL [ \t\r]*"\n"
B [ \t]
......@@ -1365,7 +1373,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->bodyLine = yyLineNr;
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]);
//printf("setting line number to %d\n",yyLineNr);
lastPreLineCtrlContext = YY_START;
......@@ -3900,7 +3908,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
pSkipDoc=&current->brief;
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;
BEGIN(lastVerbState);
}
......@@ -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"[$\[\]] {
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;
formulaText="$";
insideFormula=TRUE;
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;
formulaText="\\[";
insideFormula=TRUE;
......@@ -4036,9 +4044,18 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastFormulaContext==AfterDocBrief ||
lastFormulaContext==AfterDocLine
)
{
current->brief += addFormula();
}
else if (lastFormulaContext==CopyArgComment ||
lastFormulaContext==CopyArgCommentLine)
{
fullArgString += addFormula();
}
else
{
current->doc += addFormula();
}
insideFormula=FALSE;
BEGIN(lastFormulaContext);
}
......@@ -4062,9 +4079,18 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastFormulaContext==AfterDocBrief ||
lastFormulaContext==AfterDocLine
)
{
current->brief += addFormula();
}
else if (lastFormulaContext==CopyArgComment ||
lastFormulaContext==CopyArgCommentLine)
{
fullArgString += addFormula();
}
else
{
current->doc += addFormula();
}
insideFormula=FALSE;
BEGIN(lastFormulaContext);
}
......@@ -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] {
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} {
current->groups->append(
new Grouping(yytext, Grouping::GROUPING_INGROUP)
......
This diff is collapsed.
......@@ -3130,6 +3130,12 @@ void extractNamespaceName(const QCString &scopeName,
namespaceName.resize(0);
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(),
// className.data(),namespaceName.data());
return;
......@@ -4009,6 +4015,7 @@ void filterLatexString(QTextStream &t,const char *str,
case '\\': t << "\\(\\backslash\\)"; break;
case '{': t << "\\{"; break;
case '}': t << "\\}"; break;
case '_': t << "\\_"; break;
default:
{
// Some languages use wide characters
......
......@@ -185,6 +185,9 @@ void XmlDocVisitor::visit(DocVerbatim *s)
filter(s->text());
m_t << "</latexonly>";
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