Commit 5b3f3dc6 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.5.7.1-20081225

parent b2ff175f
DOXYGEN Version 1.5.7.1-20081206 DOXYGEN Version 1.5.7.1-20081225
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 (06 December 2008) Dimitri van Heesch (25 December 2008)
DOXYGEN Version 1.5.7.1_20081206 DOXYGEN Version 1.5.7.1_20081225
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) (06 December 2008) Dimitri van Heesch (dimitri@stack.nl) (25 December 2008)
...@@ -270,6 +270,7 @@ int main(int argc,char **argv) ...@@ -270,6 +270,7 @@ int main(int argc,char **argv)
// check and finialize the configuration // check and finialize the configuration
checkConfiguration(); checkConfiguration();
adjustConfiguration();
// parse the files // parse the files
parseInput(); parseInput();
......
...@@ -111,7 +111,7 @@ Usage: $0 [--help] [--shared] [--static] [--release] [--debug] ...@@ -111,7 +111,7 @@ Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--flex name] [--bison name] [--make name] [--perl name] [--flex name] [--bison name] [--make name]
[--dot name] [--platform target] [--prefix dir] [--docdir dir] [--dot name] [--platform target] [--prefix dir] [--docdir dir]
[--install name] [--english-only] [----enable-langs list] [--install name] [--english-only] [----enable-langs list]
[--with-doxywizard] [--with-doxywizard] [--with-doxyapp]
Options: Options:
...@@ -145,6 +145,7 @@ Options: ...@@ -145,6 +145,7 @@ Options:
[default: $f_langs] [default: $f_langs]
--with-doxywizard Build the GUI frontend for doxygen. This --with-doxywizard Build the GUI frontend for doxygen. This
requires Qt 3.3.x requires Qt 3.3.x
--with-doxyapp Example showing how to embed doxygen in an application.
EOF EOF
test "$f_error" = y && exit 1 test "$f_error" = y && exit 1
......
...@@ -127,14 +127,14 @@ documentation: ...@@ -127,14 +127,14 @@ documentation:
\refitem cmdparam \\param \refitem cmdparam \\param
\refitem cmdpost \\post \refitem cmdpost \\post
\refitem cmdpre \\pre \refitem cmdpre \\pre
\refitem cmd_php_only \\private (PHP only) \refitem cmdprivate \\private
\refitem cmd_php_only \\privatesection (PHP only) \refitem cmdprivate \\privatesection
\refitem cmdproperty \\property \refitem cmdproperty \\property
\refitem cmd_php_only \\protected (PHP only) \refitem cmdprotected \\protected
\refitem cmd_php_only \\protectedsection (PHP only) \refitem cmdprotected \\protectedsection
\refitem cmdprotocol \\protocol \refitem cmdprotocol \\protocol
\refitem cmd_php_only \\public (PHP only) \refitem cmdpublic \\public
\refitem cmd_php_only \\publicsection (PHP only) \refitem cmdpublic \\publicsection
\refitem cmdref \\ref \refitem cmdref \\ref
\refitem cmdrelates \\relates \refitem cmdrelates \\relates
\refitem cmdrelatesalso \\relatesalso \refitem cmdrelatesalso \\relatesalso
...@@ -575,6 +575,10 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -575,6 +575,10 @@ doxygen. Unrecognized commands are treated as normal text.
is represented as a real member of the class. is represented as a real member of the class.
This can be useful when the programming language does not support This can be useful when the programming language does not support
the concept of member functions natively (e.g. C). the concept of member functions natively (e.g. C).
It is also possible to use this command together with
\ref cmdpublic "\\public", \ref cmdprotected "\\protected" or
\ref cmdprivate "\\private".
The file \c manual.c in the example directory shows how to use this command. The file \c manual.c in the example directory shows how to use this command.
\htmlonly \htmlonly
...@@ -582,8 +586,9 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -582,8 +586,9 @@ doxygen. Unrecognized commands are treated as normal text.
for the corresponding HTML documentation that is generated by doxygen. for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly \endhtmlonly
\sa section \ref cmdextends "\\extends" and section \sa sections \ref cmdextends "\\extends", \ref cmdimplements "\\implements",
\ref cmdmemberof "\\memberof" \ref cmdpublic "\\public", \ref cmdprotected "\\protected" and
\ref cmdprivate "\\private".
<hr> <hr>
\section cmdname \\name (header) \section cmdname \\name (header)
...@@ -682,6 +687,25 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -682,6 +687,25 @@ doxygen. Unrecognized commands are treated as normal text.
\ref cmdsubsection "\\subsection", and section \ref cmdsubsection "\\subsection", and section
\ref cmdref "\\ref". \ref cmdref "\\ref".
<hr>
\section cmdprivate \\private
\addindex \\private
\addindex \\privatesection
Indicates that the member documented in the comment block is private,
i.e., should only be accessed by other members in the same class.
Note that Doxygen automatically detects the protection level of members
in object-oriented languages. This command is intended for use only when
the language does not support the concept of protection level natively
(e.g. C, PHP 4).
For starting a section of private members, in a way similar to the
"private:" class marker in C++, use \\privatesection.
\sa sections \ref cmdmemberof "\\memberof", \ref cmdpublic "\\public",
and \ref cmdprotected "\\protected".
<hr> <hr>
\section cmdproperty \\property (qualified property name) \section cmdproperty \\property (qualified property name)
...@@ -692,6 +716,26 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -692,6 +716,26 @@ doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdfn "\\fn" and \ref cmdvar "\\var". \sa section \ref cmdfn "\\fn" and \ref cmdvar "\\var".
<hr>
\section cmdprotected \\protected
\addindex \\protected
\addindex \\protectedsection
Indicates that the member documented in the comment block is protected,
i.e., should only be accessed by other members in the same or derived
classes.
Note that Doxygen automatically detects the protection level of members
in object-oriented languages. This command is intended for use only when
the language does not support the concept of protection level natively
(e.g. C, PHP 4).
For starting a section of protected members, in a way similar to the
"protected:" class marker in C++, use \\protectedsection.
\sa sections \ref cmdmemberof "\\memberof", \ref cmdpublic "\\public",
and \ref cmdprivate "\\private".
<hr> <hr>
\section cmdprotocol \\protocol <name> [<header-file>] [<header-name>] \section cmdprotocol \\protocol <name> [<header-file>] [<header-name>]
...@@ -702,6 +746,25 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -702,6 +746,25 @@ doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdclass "\\class". \sa section \ref cmdclass "\\class".
<hr>
\section cmdpublic \\public
\addindex \\public
\addindex \\publicsection
Indicates that the member documented in the comment block is public,
i.e., can be accessed by any other class or function.
Note that Doxygen automatically detects the protection level of members
in object-oriented languages. This command is intended for use only when
the language does not support the concept of protection level natively
(e.g. C, PHP 4).
For starting a section of public members, in a way similar to the
"public:" class marker in C++, use \\publicsection.
\sa sections \ref cmdmemberof "\\memberof", \ref cmdprotected "\\protected"
and \ref cmdprivate "\\private".
<hr> <hr>
\section cmdrelates \\relates <name> \section cmdrelates \\relates <name>
...@@ -2369,18 +2432,6 @@ class Receiver ...@@ -2369,18 +2432,6 @@ class Receiver
character has to be escaped in some cases, because it is used to character has to be escaped in some cases, because it is used to
prevent auto-linking to word that is also a documented class or struct. prevent auto-linking to word that is also a documented class or struct.
<hr>
\section cmd_php_only PHP only commands
For PHP files there are a number of additional commands, that can be
used inside classes to make members public, private, or protected even
though the language itself doesn't support this notion.
To mark a single item use one of \\private, \\protected, \\public.
For starting a section with a certain protection level use one of:
\\privatesection, \\protectedsection, \\publicsection.
The latter commands are similar to
"private:", "protected:", and "public:" in C++.
<h2>\htmlonly <center> --- \endhtmlonly <h2>\htmlonly <center> --- \endhtmlonly
Commands included for Qt compatibility Commands included for Qt compatibility
\htmlonly --- </center>\endhtmlonly</h2> \htmlonly --- </center>\endhtmlonly</h2>
......
...@@ -238,7 +238,8 @@ If you want to document the members of a file, struct, union, class, or enum, ...@@ -238,7 +238,8 @@ If you want to document the members of a file, struct, union, class, or enum,
and you want to put the documentation for these members inside the compound, and you want to put the documentation for these members inside the compound,
it is sometimes desired to place the documentation block after the member it is sometimes desired to place the documentation block after the member
instead of before. For this purpose you have to put an additional \< marker instead of before. For this purpose you have to put an additional \< marker
in the comment block. Note that this also works for the parameters of a function. in the comment block. Note that this also works for the parameters
of a function.
Here are some examples: Here are some examples:
\verbatim \verbatim
...@@ -271,6 +272,14 @@ or ...@@ -271,6 +272,14 @@ or
int var; ///< Brief description after the member int var; ///< Brief description after the member
\endverbatim \endverbatim
For functions one can use \@param to document the parameters
and then use <code>[in]</code>, <code>[out]</code>, <code>[in,out]</code>
to document the direction. For inline documentation this is also possible
by starting with the direction attribute, e.g.
\verbatim
void foo(int v /**< [in] docs for input parameter v. */);
\endverbatim
Note that these blocks have the same structure and meaning as the Note that these blocks have the same structure and meaning as the
special comment blocks in the previous section special comment blocks in the previous section
only the \< indicates that the member is only the \< indicates that the member is
...@@ -287,7 +296,8 @@ Here is an example of the use of these comment blocks: ...@@ -287,7 +296,8 @@ Here is an example of the use of these comment blocks:
They cannot be used to document files, classes, unions, structs, They cannot be used to document files, classes, unions, structs,
groups, namespaces and enums themselves. Furthermore, the structural groups, namespaces and enums themselves. Furthermore, the structural
commands mentioned in the next section commands mentioned in the next section
(like <code>\\class</code>) are ignored inside these comment blocks. (like <code>\\class</code>) are not allowed
inside these comment blocks.
\section structuralcommands Documentation at other places \section structuralcommands Documentation at other places
......
...@@ -420,10 +420,10 @@ Just follow these steps: ...@@ -420,10 +420,10 @@ Just follow these steps:
at two places in the script: at two places in the script:
<ol> <ol>
<li>After the <code>f_langs=</code> is statement, in lower case. <li>After the <code>f_langs=</code> is statement, in lower case.
<li>In the string that following <code>@allowed=</code> in upper case. <li>In the string that following <code>\@allowed=</code> in upper case.
</ol> </ol>
The rerun the configure script such that is generates src/lang_cfg.h. The rerun the configure script such that is generates src/lang_cfg.h.
This file should now contain a #define for your language code. This file should now contain a \#define for your language code.
<li>Edit language.cpp: <li>Edit language.cpp:
Add a Add a
\verbatim \verbatim
......
...@@ -34,7 +34,6 @@ The following output formats are \e directly supported by doxygen: ...@@ -34,7 +34,6 @@ The following output formats are \e directly supported by doxygen:
Word 97. If you have success with other programs, please let me know. Word 97. If you have success with other programs, please let me know.
<dt><b>XML</b> <dt><b>XML</b>
<dd>Generated if \c GENERATE_XML is set to \c YES in the configuration file.<p> <dd>Generated if \c GENERATE_XML is set to \c YES in the configuration file.<p>
Note that the XML output is still under development.
<dt><b>Qt Help Project (.qhp)</b> <dt><b>Qt Help Project (.qhp)</b>
<dd>Generated if \c GENERATE_QHP is set to \c YES in the configuration file. <dd>Generated if \c GENERATE_QHP is set to \c YES in the configuration file.
</dl> </dl>
......
...@@ -277,7 +277,6 @@ QCString ClassDef::getMemberListFileName() const ...@@ -277,7 +277,6 @@ QCString ClassDef::getMemberListFileName() const
QCString ClassDef::displayName() const QCString ClassDef::displayName() const
{ {
static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
QCString n; QCString n;
...@@ -285,11 +284,7 @@ QCString ClassDef::displayName() const ...@@ -285,11 +284,7 @@ QCString ClassDef::displayName() const
{ {
n = VhdlDocGen::getClassName(this); n = VhdlDocGen::getClassName(this);
} }
else if (hideScopeNames) else
{
n=m_impl->className;
}
else
{ {
n=qualifiedNameWithTemplateParameters(); n=qualifiedNameWithTemplateParameters();
} }
...@@ -1450,9 +1445,6 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1450,9 +1445,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part ------------------------------- //---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli( QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Class)); LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
LayoutDocEntry *lde; LayoutDocEntry *lde;
...@@ -1544,154 +1536,6 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1544,154 +1536,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
} }
#else // old fixed layout
//printf("Class %s brief=`%s' doc=`%s'\n",name().data(),briefDescription().data(),documentation().data());
//ol.startTextBlock();
// write brief description
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeBriefDescription(ol,exampleFlag);
}
writeIncludeFiles(ol);
writeInheritanceGraph(ol);
writeCollaborationGraph(ol);
writeAllMembersLink(ol);
//ol.endTextBlock();
// write detailed description if the user wants it near the top
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,pageType,exampleFlag);
}
///////////////////////////////////////////////////////////////////////////
//// Member declarations + brief descriptions
///////////////////////////////////////////////////////////////////////////
startMemberDeclarations(ol);
// write member groups
writeMemberGroups(ol);
// public types
writeMemberDeclarations(ol,MemberList::pubTypes,theTranslator->trPublicTypes());
// public methods
writeMemberDeclarations(ol,MemberList::pubSlots,theTranslator->trPublicSlots());
writeMemberDeclarations(ol,MemberList::signals,theTranslator->trSignals());
writeMemberDeclarations(ol,MemberList::dcopMethods,theTranslator->trDCOPMethods());
writeMemberDeclarations(ol,MemberList::pubMethods,theTranslator->trPublicMembers());
writeMemberDeclarations(ol,MemberList::pubStaticMethods,theTranslator->trStaticPublicMembers());
// public attribs
writeMemberDeclarations(ol,MemberList::pubAttribs,theTranslator->trPublicAttribs());
writeMemberDeclarations(ol,MemberList::pubStaticAttribs,theTranslator->trStaticPublicAttribs());
// protected types
writeMemberDeclarations(ol,MemberList::proTypes,theTranslator->trProtectedTypes());
// protected methods
writeMemberDeclarations(ol,MemberList::proSlots,theTranslator->trProtectedSlots());
writeMemberDeclarations(ol,MemberList::proMethods,theTranslator->trProtectedMembers());
writeMemberDeclarations(ol,MemberList::proStaticMethods,theTranslator->trStaticProtectedMembers());
// protected attribs
writeMemberDeclarations(ol,MemberList::proAttribs,theTranslator->trProtectedAttribs());
writeMemberDeclarations(ol,MemberList::proStaticAttribs,theTranslator->trStaticProtectedAttribs());
// package types
writeMemberDeclarations(ol,MemberList::pacTypes,theTranslator->trPackageTypes());
// package methods
writeMemberDeclarations(ol,MemberList::pacMethods,theTranslator->trPackageMembers());
writeMemberDeclarations(ol,MemberList::pacStaticMethods,theTranslator->trStaticPackageMembers());
// package attribs
writeMemberDeclarations(ol,MemberList::pacAttribs,theTranslator->trPackageAttribs());
writeMemberDeclarations(ol,MemberList::pacStaticAttribs,theTranslator->trStaticPackageAttribs());
// package
writeMemberDeclarations(ol,MemberList::properties,theTranslator->trProperties());
// events
writeMemberDeclarations(ol,MemberList::events,theTranslator->trEvents());
if (Config_getBool("EXTRACT_PRIVATE"))
{
// private types
writeMemberDeclarations(ol,MemberList::priTypes,theTranslator->trPrivateTypes());
// private members
writeMemberDeclarations(ol,MemberList::priSlots,theTranslator->trPrivateSlots());
writeMemberDeclarations(ol,MemberList::priMethods,theTranslator->trPrivateMembers());
writeMemberDeclarations(ol,MemberList::priStaticMethods,theTranslator->trStaticPrivateMembers());
// private attribs
writeMemberDeclarations(ol,MemberList::priAttribs,theTranslator->trPrivateAttribs());
writeMemberDeclarations(ol,MemberList::priStaticAttribs,theTranslator->trStaticPrivateAttribs());
}
// friends
writeMemberDeclarations(ol,MemberList::friends,theTranslator->trFriends());
// related functions
writeMemberDeclarations(ol,MemberList::related,theTranslator->trRelatedFunctions(),
theTranslator->trRelatedSubscript()
);
writeNestedClasses(ol);
endMemberDeclarations(ol);
// write detailed description
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,pageType,exampleFlag);
}
///////////////////////////////////////////////////////////////////////////
//// Member definitions + detailed documentation
///////////////////////////////////////////////////////////////////////////
startMemberDocumentation(ol);
writeMemberDocumentation(ol,MemberList::typedefMembers,theTranslator->trMemberTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::enumMembers,theTranslator->trMemberEnumerationDocumentation());
writeMemberDocumentation(ol,MemberList::constructors,theTranslator->trConstructorDocumentation());
if (fortranOpt)
{
writeMemberDocumentation(ol,MemberList::functionMembers,theTranslator->trMemberFunctionDocumentationFortran());
}
else
{
writeMemberDocumentation(ol,MemberList::functionMembers,theTranslator->trMemberFunctionDocumentation());
}
writeMemberDocumentation(ol,MemberList::relatedMembers,theTranslator->trRelatedFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::variableMembers,theTranslator->trMemberDataDocumentation());
writeMemberDocumentation(ol,MemberList::propertyMembers,theTranslator->trPropertyDocumentation());
writeMemberDocumentation(ol,MemberList::eventMembers,theTranslator->trEventDocumentation());
endMemberDocumentation(ol);
/////////////////////////////////////////////////////////////////////
//ol.startTextBlock();
// write the list of used files (not for man pages)
showUsedFiles(ol);
// write Author section (Man only)
writeAuthorSection(ol);
//ol.endTextBlock();
/////////////////////////////////////////////////////////////////////
//---------------------------------------- end flexible part -------------------------------
#endif
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{ {
writeDocAnchorsToTagFile(); writeDocAnchorsToTagFile();
...@@ -3154,30 +2998,34 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( ...@@ -3154,30 +2998,34 @@ QCString ClassDef::qualifiedNameWithTemplateParameters(
QList<ArgumentList> *actualParams) const QList<ArgumentList> *actualParams) const
{ {
static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
//printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data()); //printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data());
QCString scName; QCString scName;
Definition *d=getOuterScope(); if (!hideScopeNames)
if (d)
{ {
if (d->definitionType()==Definition::TypeClass) Definition *d=getOuterScope();
{ if (d)
ClassDef *cd=(ClassDef *)d;
scName = cd->qualifiedNameWithTemplateParameters(actualParams);
}
else
{ {
scName = d->qualifiedName(); if (d->definitionType()==Definition::TypeClass)
{
ClassDef *cd=(ClassDef *)d;
scName = cd->qualifiedNameWithTemplateParameters(actualParams);
}
else
{
scName = d->qualifiedName();
}
} }
}
QCString scopeSeparator; QCString scopeSeparator;
if (optimizeOutputJava) if (optimizeOutputJava)
scopeSeparator="."; scopeSeparator=".";
else else
scopeSeparator="::"; scopeSeparator="::";
if (!scName.isEmpty()) scName+=scopeSeparator; if (!scName.isEmpty()) scName+=scopeSeparator;
scName+=localName(); }
scName+=m_impl->className;
ArgumentList *al=0; ArgumentList *al=0;
bool isSpecialization = localName().find('<')!=-1; bool isSpecialization = localName().find('<')!=-1;
if (templateArguments()) if (templateArguments())
......
...@@ -2441,7 +2441,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2441,7 +2441,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_code->codify(yytext); g_code->codify(yytext);
} }
<SkipVerbString>\n { <SkipVerbString>\n {
g_code->codify(yytext); codifyLines(yytext);
} }
<Body>":" { <Body>":" {
g_code->codify(yytext); g_code->codify(yytext);
......
...@@ -61,6 +61,8 @@ static QStack<CondCtx> g_condStack; ...@@ -61,6 +61,8 @@ static QStack<CondCtx> g_condStack;
static QCString g_blockName; static QCString g_blockName;
static int g_lastCommentContext; static int g_lastCommentContext;
static bool g_inSpecialComment; static bool g_inSpecialComment;
static bool g_inRoseComment;
static int g_javaBlock;
static QCString g_aliasString; static QCString g_aliasString;
static int g_blockCount; static int g_blockCount;
...@@ -331,6 +333,7 @@ void replaceComment(int offset); ...@@ -331,6 +333,7 @@ void replaceComment(int offset);
g_blockHeadCol=g_col; g_blockHeadCol=g_col;
copyToOutput("/**",3); copyToOutput("/**",3);
replaceAliases(yytext+i); replaceAliases(yytext+i);
g_inRoseComment=TRUE;
BEGIN(SComment); BEGIN(SComment);
} }
<Scan>"//"/.*\n { /* one line C++ comment */ <Scan>"//"/.*\n { /* one line C++ comment */
...@@ -364,9 +367,17 @@ void replaceComment(int offset); ...@@ -364,9 +367,17 @@ void replaceComment(int offset);
BEGIN(CComment); BEGIN(CComment);
} }
} }
<CComment>[ \t]+"{@code" {
copyToOutput(" @code",6);
g_lastCommentContext = YY_START;
g_javaBlock=1;
g_blockName=&yytext[1];
BEGIN(VerbatimCode);
}
<CComment,ReadLine>[\\@]("dot"|"code"|"msc")/[^a-z_A-Z0-9] { /* start of a verbatim block */ <CComment,ReadLine>[\\@]("dot"|"code"|"msc")/[^a-z_A-Z0-9] { /* start of a verbatim block */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
g_lastCommentContext = YY_START; g_lastCommentContext = YY_START;
g_javaBlock=0;
g_blockName=&yytext[1]; g_blockName=&yytext[1];
BEGIN(VerbatimCode); BEGIN(VerbatimCode);
} }
...@@ -404,6 +415,31 @@ void replaceComment(int offset); ...@@ -404,6 +415,31 @@ void replaceComment(int offset);
BEGIN(g_lastCommentContext); BEGIN(g_lastCommentContext);
} }
} }
<VerbatimCode>"{" {
if (g_javaBlock==0)
{
REJECT;
}
else
{
g_javaBlock++;
}
}
<VerbatimCode>"}" {
if (g_javaBlock==0)
{
REJECT;
}
else
{
g_javaBlock--;
if (g_javaBlock==0)
{
copyToOutput(" @endcode ",10);
BEGIN(g_lastCommentContext);
}
}
}
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc") { /* end of verbatim block */ <VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc") { /* end of verbatim block */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
if (&yytext[4]==g_blockName) if (&yytext[4]==g_blockName)
...@@ -417,7 +453,7 @@ void replaceComment(int offset); ...@@ -417,7 +453,7 @@ void replaceComment(int offset);
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
} }
<Verbatim,VerbatimCode>[^@\/\\\n]* { /* any character not a backslash or new line */ <Verbatim,VerbatimCode>[^@\/\\\n{}]* { /* any character not a backslash or new line or } */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
<Verbatim,VerbatimCode>\n { /* new line in verbatim block */ <Verbatim,VerbatimCode>\n { /* new line in verbatim block */
...@@ -552,19 +588,34 @@ void replaceComment(int offset); ...@@ -552,19 +588,34 @@ void replaceComment(int offset);
BEGIN(ReadLine); BEGIN(ReadLine);
} }
<SComment>^[ \t]*"//##"/.*\n { <SComment>^[ \t]*"//##"/.*\n {
replaceComment(0); if (!g_inRoseComment)
g_readLineCtx=YY_START; {
BEGIN(ReadLine); REJECT;
}
else
{
replaceComment(0);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
}
} }
<SComment>\n[ \t]*"//##"/.*\n { <SComment>\n[ \t]*"//##"/.*\n {
replaceComment(1); if (!g_inRoseComment)
g_readLineCtx=YY_START; {
BEGIN(ReadLine); REJECT;
}
else
{
replaceComment(1);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
}
} }
<SComment>\n { /* end of special comment */ <SComment>\n { /* end of special comment */
copyToOutput(" */",3); copyToOutput(" */",3);
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
g_inSpecialComment=FALSE; g_inSpecialComment=FALSE;
g_inRoseComment=FALSE;
BEGIN(Scan); BEGIN(Scan);
} }
<ReadLine>[^\\@\n]*/\n { <ReadLine>[^\\@\n]*/\n {
......
...@@ -540,7 +540,7 @@ static void addXRefItem(const char *listName,const char *itemTitle, ...@@ -540,7 +540,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
item->listAnchor = anchorLabel; item->listAnchor = anchorLabel;
docEntry->addSpecialListItem(listName,itemId); docEntry->addSpecialListItem(listName,itemId);
QCString cmdString; QCString cmdString;
cmdString.sprintf("\\xrefitem %s %d\n",listName,itemId); cmdString.sprintf("\\xrefitem %s %d.",listName,itemId);
if (inBody) if (inBody)
{ {
docEntry->inbodyDocs += cmdString; docEntry->inbodyDocs += cmdString;
...@@ -1237,6 +1237,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ...@@ -1237,6 +1237,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
{ {
current->name=current->name.left(current->name.length()-5); current->name=current->name.left(current->name.length()-5);
} }
current->type.resize(0);
BEGIN(GroupDocArg2); BEGIN(GroupDocArg2);
} }
<GroupDocArg1>"\\"{B}*"\n" { // line continuation <GroupDocArg1>"\\"{B}*"\n" { // line continuation
...@@ -2411,6 +2412,11 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, ...@@ -2411,6 +2412,11 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
commentScanYYlex(); commentScanYYlex();
setOutput( OutputDoc ); setOutput( OutputDoc );
if (YY_START==OverloadParam) // comment ended with \overload
{
addOutput(getOverloadDocs());
}
if (!guards.isEmpty()) if (!guards.isEmpty())
{ {
warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!");
...@@ -2431,8 +2437,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, ...@@ -2431,8 +2437,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
} }
Debug::print(Debug::CommentScan,0, Debug::print(Debug::CommentScan,0,
"brief=[%s]\ndocs=[%s]\n===========\n", "brief=[%s]\ndocs=[%s]\ninbody=[%s]\n===========\n",
current->brief.data(),current->doc.data() current->brief.data(),current->doc.data(),current->inbodyDocs.data()
); );
checkFormula(); checkFormula();
......
...@@ -97,7 +97,7 @@ static int yyread(char *buf,int max_size) ...@@ -97,7 +97,7 @@ static int yyread(char *buf,int max_size)
%} %}
B [ \t] B [ \t]
ID ([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+) ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
%option nounput %option nounput
%option noyywrap %option noyywrap
......
...@@ -58,13 +58,14 @@ class DefinitionImpl ...@@ -58,13 +58,14 @@ class DefinitionImpl
QList<ListItemInfo> *xrefListItems; QList<ListItemInfo> *xrefListItems;
GroupList *partOfGroups; GroupList *partOfGroups;
DocInfo *details; // not exported DocInfo *details; // not exported
BriefInfo *brief; // not exported DocInfo *inbodyDocs; // not exported
BodyInfo *body; // not exported BriefInfo *brief; // not exported
BodyInfo *body; // not exported
QCString docSignatures; QCString docSignatures;
QCString localName; // local (unqualified) name of the definition QCString localName; // local (unqualified) name of the definition
// in the future m_name should become m_localName // in the future m_name should become m_localName
QCString qualifiedName; QCString qualifiedName;
QCString ref; // reference to external documentation QCString ref; // reference to external documentation
...@@ -82,7 +83,7 @@ class DefinitionImpl ...@@ -82,7 +83,7 @@ class DefinitionImpl
DefinitionImpl::DefinitionImpl() DefinitionImpl::DefinitionImpl()
: sectionDict(0), sourceRefByDict(0), sourceRefsDict(0), : sectionDict(0), sourceRefByDict(0), sourceRefsDict(0),
xrefListItems(0), partOfGroups(0), xrefListItems(0), partOfGroups(0),
details(0), brief(0), body(0), details(0), inbodyDocs(0), brief(0), body(0),
outerScope(0) outerScope(0)
{ {
} }
...@@ -97,6 +98,7 @@ DefinitionImpl::~DefinitionImpl() ...@@ -97,6 +98,7 @@ DefinitionImpl::~DefinitionImpl()
delete brief; delete brief;
delete details; delete details;
delete body; delete body;
delete inbodyDocs;
} }
void DefinitionImpl::init(const char *df,int dl, void DefinitionImpl::init(const char *df,int dl,
...@@ -121,17 +123,18 @@ void DefinitionImpl::init(const char *df,int dl, ...@@ -121,17 +123,18 @@ void DefinitionImpl::init(const char *df,int dl,
} }
//printf("m_localName=%s\n",m_localName.data()); //printf("m_localName=%s\n",m_localName.data());
brief = 0; brief = 0;
details = 0; details = 0;
body = 0; body = 0;
sourceRefByDict=0; inbodyDocs = 0;
sourceRefsDict=0; sourceRefByDict = 0;
sectionDict=0, sourceRefsDict = 0;
outerScope=Doxygen::globalScope; sectionDict = 0,
partOfGroups=0; outerScope = Doxygen::globalScope;
xrefListItems=0; partOfGroups = 0;
hidden = FALSE; xrefListItems = 0;
isArtificial = FALSE; hidden = FALSE;
isArtificial = FALSE;
} }
//----------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------
...@@ -305,26 +308,6 @@ void Definition::setName(const char *name) ...@@ -305,26 +308,6 @@ void Definition::setName(const char *name)
{ {
if (name==0) return; if (name==0) return;
m_name = name; m_name = name;
#if 0
makeResident();
if (m_isSymbol)
{
removeFromMap(this);
}
if (m_name!="<globalScope>")
{
//extractNamespaceName(m_name,m_localName,ns);
m_impl->localName=stripScope(m_name);
}
else
{
m_impl->localName=m_name;
}
if (m_isSymbol)
{
addToMap(m_name,this);
}
#endif
} }
void Definition::addSectionsToDefinition(QList<SectionInfo> *anchorList) void Definition::addSectionsToDefinition(QList<SectionInfo> *anchorList)
...@@ -494,6 +477,31 @@ void Definition::setBriefDescription(const char *b,const char *briefFile,int bri ...@@ -494,6 +477,31 @@ void Definition::setBriefDescription(const char *b,const char *briefFile,int bri
_setBriefDescription(b,briefFile,briefLine); _setBriefDescription(b,briefFile,briefLine);
} }
void Definition::_setInbodyDocumentation(const char *doc,const char *inbodyFile,int inbodyLine)
{
if (m_impl->inbodyDocs==0)
{
m_impl->inbodyDocs = new DocInfo;
}
if (m_impl->inbodyDocs->doc.isEmpty()) // fresh inbody docs
{
m_impl->inbodyDocs->doc = doc;
m_impl->inbodyDocs->file = inbodyFile;
m_impl->inbodyDocs->line = inbodyLine;
}
else // another inbody documentation fragment, append this to the end
{
m_impl->inbodyDocs->doc += QCString("\n\n")+doc;
}
}
void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine)
{
if (d==0) return;
makeResident();
_setInbodyDocumentation(d,inbodyFile,inbodyLine);
}
/*! Reads a fragment of code from file \a fileName starting at /*! Reads a fragment of code from file \a fileName starting at
* line \a startLine and ending at line \a endLine (inclusive). The fragment is * line \a startLine and ending at line \a endLine (inclusive). The fragment is
* stored in \a result. If FALSE is returned the code fragment could not be * stored in \a result. If FALSE is returned the code fragment could not be
...@@ -903,8 +911,9 @@ bool Definition::hasDocumentation() const ...@@ -903,8 +911,9 @@ bool Definition::hasDocumentation() const
//static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); //static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
makeResident(); makeResident();
bool hasDocs = bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs (m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs
(m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description (m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description
(m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty()) || // has inbody docs
extractAll //|| // extract everything extractAll //|| // extract everything
// (sourceBrowser && m_impl->body && // (sourceBrowser && m_impl->body &&
// m_impl->body->startLine!=-1 && m_impl->body->fileDef) // m_impl->body->startLine!=-1 && m_impl->body->fileDef)
...@@ -916,8 +925,9 @@ bool Definition::hasUserDocumentation() const ...@@ -916,8 +925,9 @@ bool Definition::hasUserDocumentation() const
{ {
makeResident(); makeResident();
bool hasDocs = bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) || (m_impl->details && !m_impl->details->doc.isEmpty()) ||
(m_impl->brief && !m_impl->brief->doc.isEmpty()); (m_impl->brief && !m_impl->brief->doc.isEmpty()) ||
(m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty());
return hasDocs; return hasDocs;
} }
...@@ -1204,6 +1214,8 @@ QCString Definition::symbolName() const ...@@ -1204,6 +1214,8 @@ QCString Definition::symbolName() const
return m_symbolName; return m_symbolName;
} }
//----------------------
QCString Definition::documentation() const QCString Definition::documentation() const
{ {
makeResident(); makeResident();
...@@ -1222,6 +1234,8 @@ QCString Definition::docFile() const ...@@ -1222,6 +1234,8 @@ QCString Definition::docFile() const
return m_impl->details ? m_impl->details->file : QCString("<"+m_name+">"); return m_impl->details ? m_impl->details->file : QCString("<"+m_name+">");
} }
//----------------------
QCString Definition::briefDescription() const QCString Definition::briefDescription() const
{ {
makeResident(); makeResident();
...@@ -1266,6 +1280,29 @@ QCString Definition::briefFile() const ...@@ -1266,6 +1280,29 @@ QCString Definition::briefFile() const
return m_impl->brief ? m_impl->brief->file : QCString("<"+m_name+">"); return m_impl->brief ? m_impl->brief->file : QCString("<"+m_name+">");
} }
//----------------------
QCString Definition::inbodyDocumentation() const
{
makeResident();
return m_impl->inbodyDocs ? m_impl->inbodyDocs->doc : QCString("");
}
int Definition::inbodyLine() const
{
makeResident();
return m_impl->inbodyDocs ? m_impl->inbodyDocs->line : 1;
}
QCString Definition::inbodyFile() const
{
makeResident();
return m_impl->inbodyDocs ? m_impl->inbodyDocs->file : QCString("<"+m_name+">");
}
//----------------------
QCString Definition::getDefFileName() const QCString Definition::getDefFileName() const
{ {
makeResident(); makeResident();
...@@ -1405,6 +1442,7 @@ void Definition::flushToDisk() const ...@@ -1405,6 +1442,7 @@ void Definition::flushToDisk() const
marshalItemInfoList (Doxygen::symbolStorage,m_impl->xrefListItems); marshalItemInfoList (Doxygen::symbolStorage,m_impl->xrefListItems);
marshalGroupList (Doxygen::symbolStorage,m_impl->partOfGroups); marshalGroupList (Doxygen::symbolStorage,m_impl->partOfGroups);
marshalDocInfo (Doxygen::symbolStorage,m_impl->details); marshalDocInfo (Doxygen::symbolStorage,m_impl->details);
marshalDocInfo (Doxygen::symbolStorage,m_impl->inbodyDocs);
marshalBriefInfo (Doxygen::symbolStorage,m_impl->brief); marshalBriefInfo (Doxygen::symbolStorage,m_impl->brief);
marshalBodyInfo (Doxygen::symbolStorage,m_impl->body); marshalBodyInfo (Doxygen::symbolStorage,m_impl->body);
marshalQCString (Doxygen::symbolStorage,m_impl->docSignatures); marshalQCString (Doxygen::symbolStorage,m_impl->docSignatures);
...@@ -1436,6 +1474,7 @@ void Definition::loadFromDisk() const ...@@ -1436,6 +1474,7 @@ void Definition::loadFromDisk() const
m_impl->xrefListItems = unmarshalItemInfoList (Doxygen::symbolStorage); m_impl->xrefListItems = unmarshalItemInfoList (Doxygen::symbolStorage);
m_impl->partOfGroups = unmarshalGroupList (Doxygen::symbolStorage); m_impl->partOfGroups = unmarshalGroupList (Doxygen::symbolStorage);
m_impl->details = unmarshalDocInfo (Doxygen::symbolStorage); m_impl->details = unmarshalDocInfo (Doxygen::symbolStorage);
m_impl->inbodyDocs = unmarshalDocInfo (Doxygen::symbolStorage);
m_impl->brief = unmarshalBriefInfo (Doxygen::symbolStorage); m_impl->brief = unmarshalBriefInfo (Doxygen::symbolStorage);
m_impl->body = unmarshalBodyInfo (Doxygen::symbolStorage); m_impl->body = unmarshalBodyInfo (Doxygen::symbolStorage);
m_impl->docSignatures = unmarshalQCString (Doxygen::symbolStorage); m_impl->docSignatures = unmarshalQCString (Doxygen::symbolStorage);
......
...@@ -156,6 +156,16 @@ class Definition : public DefinitionIntf, public LockableObj ...@@ -156,6 +156,16 @@ class Definition : public DefinitionIntf, public LockableObj
/*! Returns the line number at which the brief description was found. */ /*! Returns the line number at which the brief description was found. */
int briefLine() const; int briefLine() const;
/*! Returns the documentation found inside the body of a member */
QCString inbodyDocumentation() const;
/*! Returns the file in which the in body documentation was found */
QCString inbodyFile() const;
/*! Returns the line at which the first in body documentation
part was found */
int inbodyLine() const;
/*! Returns the file in which the brief description was found. /*! Returns the file in which the brief description was found.
* This can differ from getDefFileName(). * This can differ from getDefFileName().
*/ */
...@@ -255,6 +265,12 @@ class Definition : public DefinitionIntf, public LockableObj ...@@ -255,6 +265,12 @@ class Definition : public DefinitionIntf, public LockableObj
*/ */
void setBriefDescription(const char *b,const char *briefFile,int briefLine); void setBriefDescription(const char *b,const char *briefFile,int briefLine);
/*! Set the documentation that was found inside the body of an item.
* If there was already some documentation set, the new documentation
* will be appended.
*/
void setInbodyDocumentation(const char *d,const char *docFile,int docLine);
/*! Sets the tag file id via which this definition was imported. */ /*! Sets the tag file id via which this definition was imported. */
void setReference(const char *r); void setReference(const char *r);
...@@ -318,6 +334,7 @@ class Definition : public DefinitionIntf, public LockableObj ...@@ -318,6 +334,7 @@ class Definition : public DefinitionIntf, public LockableObj
const QCString &text,MemberSDict *members,bool); const QCString &text,MemberSDict *members,bool);
void _setBriefDescription(const char *b,const char *briefFile,int briefLine); void _setBriefDescription(const char *b,const char *briefFile,int briefLine);
void _setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace,bool atTop); void _setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace,bool atTop);
void _setInbodyDocumentation(const char *d,const char *docFile,int docLine);
bool _docsAlreadyAdded(const QString &doc); bool _docsAlreadyAdded(const QString &doc);
DefinitionImpl *m_impl; // internal structure holding all private data DefinitionImpl *m_impl; // internal structure holding all private data
QCString m_name; QCString m_name;
......
...@@ -343,9 +343,6 @@ void DirDef::writeDocumentation(OutputList &ol) ...@@ -343,9 +343,6 @@ void DirDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part ------------------------------- //---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli( QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Directory)); LayoutDocManager::instance().docEntries(LayoutDocManager::Directory));
LayoutDocEntry *lde; LayoutDocEntry *lde;
...@@ -410,35 +407,6 @@ void DirDef::writeDocumentation(OutputList &ol) ...@@ -410,35 +407,6 @@ void DirDef::writeDocumentation(OutputList &ol)
} }
} }
#else
// write brief or details (if DETAILS_AT_TOP)
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
else if (!briefDescription().isEmpty())
{
writeBriefDescription(ol);
}
writeDirectoryGraph(ol);
startMemberDeclarations(ol);
writeSubDirList(ol);
writeFileList(ol);
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
#endif
//---------------------------------------- end flexible part ------------------------------- //---------------------------------------- end flexible part -------------------------------
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
......
...@@ -290,7 +290,7 @@ CMD ("\\"|"@") ...@@ -290,7 +290,7 @@ CMD ("\\"|"@")
WS [ \t\r\n] WS [ \t\r\n]
NONWS [^ \t\r\n] NONWS [^ \t\r\n]
BLANK [ \t\r] BLANK [ \t\r]
ID [a-z_A-Z][a-z_A-Z0-9]* ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
MAILADR [a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+ MAILADR [a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}* OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
LISTITEM {BLANK}*{OPTSTARS}"-"("#")?{WS} LISTITEM {BLANK}*{OPTSTARS}"-"("#")?{WS}
...@@ -773,7 +773,7 @@ REFWORD ("#"|"::")?({ID}{TEMPLPART}?("."|"#"|"::"|"-"|"/"))*({ID}(":")?){FUNCA ...@@ -773,7 +773,7 @@ REFWORD ("#"|"::")?({ID}{TEMPLPART}?("."|"#"|"::"|"-"|"/"))*({ID}(":")?){FUNCA
<St_XRefItem>" " { <St_XRefItem>" " {
BEGIN(St_XRefItem2); BEGIN(St_XRefItem2);
} }
<St_XRefItem2>[0-9]+{WS} { <St_XRefItem2>[0-9]+"." {
QString numStr=yytext; QString numStr=yytext;
numStr=numStr.left(yyleng-1); numStr=numStr.left(yyleng-1);
g_token->id=numStr.toInt(); g_token->id=numStr.toInt();
......
...@@ -587,7 +587,8 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList *ml,ClassDef ...@@ -587,7 +587,8 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList *ml,ClassDef
if (mma->getClassDef() == scope) if (mma->getClassDef() == scope)
{ {
t << prot << " " << convertLabel(mma->name()); t << prot << " " << convertLabel(mma->name());
if (!mma->isObjCMethod() && mma->isFunction()) t << "()"; if (!mma->isObjCMethod() &&
(mma->isFunction() || mma->isSlot() || mma->isSignal())) t << "()";
t << "\\l"; t << "\\l";
} }
} }
...@@ -2323,7 +2324,7 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance) ...@@ -2323,7 +2324,7 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance)
MemberDef *rmd; MemberDef *rmd;
for (;(rmd=mri.current());++mri) for (;(rmd=mri.current());++mri)
{ {
if (rmd->isFunction()) if (rmd->isFunction() || rmd->isSlot() || rmd->isSignal())
{ {
QCString uniqueId; QCString uniqueId;
uniqueId=rmd->getReference()+"$"+ uniqueId=rmd->getReference()+"$"+
......
...@@ -142,31 +142,26 @@ bool Doxygen::gatherDefines = TRUE; ...@@ -142,31 +142,26 @@ bool Doxygen::gatherDefines = TRUE;
IndexList Doxygen::indexList; IndexList Doxygen::indexList;
int Doxygen::subpageNestingLevel = 0; int Doxygen::subpageNestingLevel = 0;
bool Doxygen::userComments = FALSE; bool Doxygen::userComments = FALSE;
QCString Doxygen::spaces;
// locally accessible globals // locally accessible globals
static QDict<EntryNav> classEntries(1009); static QDict<EntryNav> g_classEntries(1009);
static StringList inputFiles; static StringList g_inputFiles;
static StringDict excludeNameDict(1009); // sections static QDict<void> g_compoundKeywordDict(7); // keywords recognised as compounds
static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds static OutputList *g_outputList = 0; // list of output generating objects
static OutputList *outputList = 0; // list of output generating objects static QDict<FileDef> g_usingDeclarations(1009); // used classes
static QDict<FileDef> g_usingDeclarations(1009); // used classes static FileStorage *g_storage = 0;
static const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*"; static bool g_successfulRun = FALSE;
static bool g_dumpSymbolMap = FALSE;
FileStorage *g_storage = 0; static bool g_dumpConfigAsXML = FALSE;
QCString spaces;
static bool g_successfulRun = FALSE;
static bool g_dumpSymbolMap = FALSE;
static bool g_dumpConfigAsXML = FALSE;
void clearAll() void clearAll()
{ {
inputFiles.clear(); g_inputFiles.clear();
excludeNameDict.clear(); //g_excludeNameDict.clear();
delete outputList; outputList=0; //delete g_outputList; g_outputList=0;
Doxygen::classSDict->clear(); Doxygen::classSDict->clear();
Doxygen::namespaceSDict->clear(); Doxygen::namespaceSDict->clear();
...@@ -198,8 +193,8 @@ void statistics() ...@@ -198,8 +193,8 @@ void statistics()
Doxygen::imageNameDict->statistics(); Doxygen::imageNameDict->statistics();
fprintf(stderr,"--- dotFileNameDict stats ----\n"); fprintf(stderr,"--- dotFileNameDict stats ----\n");
Doxygen::dotFileNameDict->statistics(); Doxygen::dotFileNameDict->statistics();
fprintf(stderr,"--- excludeNameDict stats ----\n"); //fprintf(stderr,"--- g_excludeNameDict stats ----\n");
excludeNameDict.statistics(); //g_excludeNameDict.statistics();
fprintf(stderr,"--- aliasDict stats ----\n"); fprintf(stderr,"--- aliasDict stats ----\n");
Doxygen::aliasDict.statistics(); Doxygen::aliasDict.statistics();
fprintf(stderr,"--- typedefDict stats ----\n"); fprintf(stderr,"--- typedefDict stats ----\n");
...@@ -211,8 +206,8 @@ void statistics() ...@@ -211,8 +206,8 @@ void statistics()
Doxygen::formulaNameDict.statistics(); Doxygen::formulaNameDict.statistics();
fprintf(stderr,"--- tagDestinationDict stats ----\n"); fprintf(stderr,"--- tagDestinationDict stats ----\n");
Doxygen::tagDestinationDict.statistics(); Doxygen::tagDestinationDict.statistics();
fprintf(stderr,"--- compoundKeywordDict stats ----\n"); fprintf(stderr,"--- g_compoundKeywordDict stats ----\n");
compoundKeywordDict.statistics(); g_compoundKeywordDict.statistics();
fprintf(stderr,"--- expandAsDefinedDict stats ----\n"); fprintf(stderr,"--- expandAsDefinedDict stats ----\n");
Doxygen::expandAsDefinedDict.statistics(); Doxygen::expandAsDefinedDict.statistics();
fprintf(stderr,"--- memGrpInfoDict stats ----\n"); fprintf(stderr,"--- memGrpInfoDict stats ----\n");
...@@ -468,11 +463,11 @@ static void addRelatedPage(EntryNav *rootNav) ...@@ -468,11 +463,11 @@ static void addRelatedPage(EntryNav *rootNav)
QCString doc; QCString doc;
if (root->brief.isEmpty()) if (root->brief.isEmpty())
{ {
doc=root->doc; doc=root->doc+root->inbodyDocs;
} }
else else
{ {
doc=root->brief+"\n\n"+root->doc; doc=root->brief+"\n\n"+root->doc+root->inbodyDocs;
} }
PageDef *pd = addRelatedPage(root->name,root->args,doc,root->anchors, PageDef *pd = addRelatedPage(root->name,root->args,doc,root->anchors,
root->fileName,root->startLine, root->fileName,root->startLine,
...@@ -503,31 +498,21 @@ static void buildGroupListFiltered(EntryNav *rootNav,bool additional) ...@@ -503,31 +498,21 @@ static void buildGroupListFiltered(EntryNav *rootNav,bool additional)
if ((gd=Doxygen::groupSDict->find(root->name))) if ((gd=Doxygen::groupSDict->find(root->name)))
{ {
#if 0 if ( !gd->hasGroupTitle() )
if ( root->groupDocType==Entry::GROUPDOC_NORMAL )
{ {
warn(root->fileName,root->startLine, gd->setGroupTitle( root->type );
"Warning: group %s already documented. "
"Skipping documentation.",
root->name.data());
} }
else else if ( root->type.length() > 0 && root->name != root->type && gd->groupTitle() != root->type )
#endif
{ {
if ( !gd->hasGroupTitle() ) warn( root->fileName,root->startLine,
gd->setGroupTitle( root->type ); "group %s: ignoring title \"%s\" that does not match old title \"%s\"\n",
else if ( root->type.length() > 0 && root->name != root->type && gd->groupTitle() != root->type ) root->name.data(), root->type.data(), gd->groupTitle() );
warn( root->fileName,root->startLine,
"group %s: ignoring title \"%s\" that does not match old title \"%s\"\n",
root->name.data(), root->type.data(), gd->groupTitle() );
//if ( gd->briefDescription().isEmpty() )
gd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
//if ( !root->doc.stripWhiteSpace().isEmpty() )
gd->setDocumentation( root->doc, root->docFile, root->docLine );
gd->addSectionsToDefinition(root->anchors);
gd->setRefItems(root->sli);
//addGroupToGroups(root,gd);
} }
gd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
gd->setDocumentation( root->doc, root->docFile, root->docLine );
gd->setInbodyDocumentation( root->inbodyDocs, root->inbodyFile, root->inbodyLine );
gd->addSectionsToDefinition(root->anchors);
gd->setRefItems(root->sli);
} }
else else
{ {
...@@ -542,6 +527,7 @@ static void buildGroupListFiltered(EntryNav *rootNav,bool additional) ...@@ -542,6 +527,7 @@ static void buildGroupListFiltered(EntryNav *rootNav,bool additional)
} }
gd->setBriefDescription(root->brief,root->briefFile,root->briefLine); gd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
gd->setDocumentation(root->doc,root->docFile,root->docLine); gd->setDocumentation(root->doc,root->docFile,root->docLine);
gd->setInbodyDocumentation( root->inbodyDocs, root->inbodyFile, root->inbodyLine );
gd->addSectionsToDefinition(root->anchors); gd->addSectionsToDefinition(root->anchors);
Doxygen::groupSDict->append(root->name,gd); Doxygen::groupSDict->append(root->name,gd);
gd->setRefItems(root->sli); gd->setRefItems(root->sli);
...@@ -1468,7 +1454,7 @@ static void buildNamespaceList(EntryNav *rootNav) ...@@ -1468,7 +1454,7 @@ static void buildNamespaceList(EntryNav *rootNav)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
static NamespaceDef *findUsedNamespace(const NamespaceSDict *unl, static NamespaceDef *findUsedNamespace(NamespaceSDict *unl,
const QCString &name) const QCString &name)
{ {
NamespaceDef *usingNd =0; NamespaceDef *usingNd =0;
...@@ -1660,8 +1646,8 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1660,8 +1646,8 @@ static void findUsingDeclarations(EntryNav *rootNav)
Entry *root = rootNav->entry(); Entry *root = rootNav->entry();
//printf("Found using declaration %s at line %d of %s inside section %x\n", //printf("Found using declaration %s at line %d of %s inside section %x\n",
// root->name.data(),root->startLine,root->fileName.data(), // root->name.data(),root->startLine,root->fileName.data(),
// root->parent->section); // rootNav->parent()->section());
if (!root->name.isEmpty()) if (!root->name.isEmpty())
{ {
ClassDef *usingCd = 0; ClassDef *usingCd = 0;
...@@ -1686,9 +1672,7 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1686,9 +1672,7 @@ static void findUsingDeclarations(EntryNav *rootNav)
// with the most inner scope and going to the most outer scope (i.e. // with the most inner scope and going to the most outer scope (i.e.
// file scope). // file scope).
QCString name = substitute(root->name,".","::"); QCString name = substitute(root->name,".","::"); //Java/C# scope->internal
//MemberDef *mtd=0;
//usingCd = getResolvedClass(nd,fd,name,&mtd);
usingCd = getClass(name); usingCd = getClass(name);
if (usingCd==0) if (usingCd==0)
{ {
...@@ -1712,22 +1696,6 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1712,22 +1696,6 @@ static void findUsingDeclarations(EntryNav *rootNav)
usingCd->name().data(),nd?nd->name().data():fd->name().data()); usingCd->name().data(),nd?nd->name().data():fd->name().data());
} }
#if 0
if (mtd) // add the typedef to the correct scope
{
if (nd)
{
//printf("Inside namespace %s\n",nd->name().data());
nd->addUsingDeclaration(mtd);
}
else if (fd)
{
//printf("Inside file %s\n",nd->name().data());
fd->addUsingDeclaration(mtd);
}
}
else
#endif
if (usingCd) // add the class to the correct scope if (usingCd) // add the class to the correct scope
{ {
if (nd) if (nd)
...@@ -1737,7 +1705,7 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1737,7 +1705,7 @@ static void findUsingDeclarations(EntryNav *rootNav)
} }
else if (fd) else if (fd)
{ {
//printf("Inside file %s\n",nd->name().data()); //printf("Inside file %s\n",fd->name().data());
fd->addUsingDeclaration(usingCd); fd->addUsingDeclaration(usingCd);
} }
} }
...@@ -2056,16 +2024,46 @@ static MemberDef *addVariableToFile( ...@@ -2056,16 +2024,46 @@ static MemberDef *addVariableToFile(
FileDef *fd = rootNav->fileDef(); FileDef *fd = rootNav->fileDef();
// see if we have a typedef that should hide a struct or union
if (mtype==MemberDef::Typedef && Config_getBool("TYPEDEF_HIDES_STRUCT"))
{
QCString type = root->type;
type.stripPrefix("typedef ");
if (type.left(7)=="struct " || type.left(6)=="union ")
{
type.stripPrefix("struct ");
type.stripPrefix("union ");
static QRegExp re("[a-z_A-Z][a-z_A-Z0-9]*");
int l,s;
s = re.match(type,0,&l);
if (s>=0)
{
QCString typeValue = type.mid(s,l);
ClassDef *cd = getClass(typeValue);
if (cd)
{
// this typedef should hide compound name cd, so we
// change the name that is displayed from cd.
cd->setClassName(name);
cd->setDocumentation(root->doc,root->docFile,root->docLine);
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
return 0;
}
}
}
}
// see if the function is inside a namespace // see if the function is inside a namespace
NamespaceDef *nd = 0; NamespaceDef *nd = 0;
QCString nscope; QCString nscope;
if (!scope.isEmpty()) if (!scope.isEmpty())
{ {
nscope=removeAnonymousScopes(scope); if (scope.find('@')!=-1) return 0; // anonymous scope!
if (!nscope.isEmpty()) //nscope=removeAnonymousScopes(scope);
{ //if (!nscope.isEmpty())
nd = getResolvedNamespace(nscope); //{
} nd = getResolvedNamespace(scope);
//}
} }
QCString def; QCString def;
...@@ -2110,9 +2108,10 @@ static MemberDef *addVariableToFile( ...@@ -2110,9 +2108,10 @@ static MemberDef *addVariableToFile(
//QCString nscope=removeAnonymousScopes(scope); //QCString nscope=removeAnonymousScopes(scope);
//NamespaceDef *nd=0; //NamespaceDef *nd=0;
//if (!nscope.isEmpty()) //if (!nscope.isEmpty())
//{ if (!scope.isEmpty())
// nd = getResolvedNamespace(nscope); {
//} nd = getResolvedNamespace(scope);
}
MemberNameIterator mni(*mn); MemberNameIterator mni(*mn);
MemberDef *md; MemberDef *md;
for (mni.toFirst();(md=mni.current());++mni) for (mni.toFirst();(md=mni.current());++mni)
...@@ -2541,6 +2540,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) ...@@ -2541,6 +2540,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
} }
} }
} }
//printf("name=`%s' scope=%s scope.right=%s\n", //printf("name=`%s' scope=%s scope.right=%s\n",
// name.data(),scope.data(), // name.data(),scope.data(),
// scope.right(scope.length()-si).data()); // scope.right(scope.length()-si).data());
...@@ -2599,7 +2599,7 @@ static void buildVarList(EntryNav *rootNav) ...@@ -2599,7 +2599,7 @@ static void buildVarList(EntryNav *rootNav)
//printf("buildVarList(%s)\n",rootNav->name().data()); //printf("buildVarList(%s)\n",rootNav->name().data());
int isFuncPtr=-1; int isFuncPtr=-1;
if (!rootNav->name().isEmpty() && if (!rootNav->name().isEmpty() &&
(rootNav->type().isEmpty() || compoundKeywordDict.find(rootNav->type())==0) && (rootNav->type().isEmpty() || g_compoundKeywordDict.find(rootNav->type())==0) &&
( (
(rootNav->section()==Entry::VARIABLE_SEC // it's a variable (rootNav->section()==Entry::VARIABLE_SEC // it's a variable
) || ) ||
...@@ -2821,12 +2821,12 @@ static void buildFunctionList(EntryNav *rootNav) ...@@ -2821,12 +2821,12 @@ static void buildFunctionList(EntryNav *rootNav)
QCString rname = removeRedundantWhiteSpace(root->name); QCString rname = removeRedundantWhiteSpace(root->name);
//printf("rname=%s\n",rname.data()); //printf("rname=%s\n",rname.data());
if (!rname.isEmpty()) QCString scope=rootNav->parent()->name(); //stripAnonymousNamespaceScope(root->parent->name);
if (!rname.isEmpty() && scope.find('@')==-1)
{ {
ClassDef *cd=0; ClassDef *cd=0;
// check if this function's parent is a class // check if this function's parent is a class
QCString scope=rootNav->parent()->name(); //stripAnonymousNamespaceScope(root->parent->name);
scope=stripTemplateSpecifiersFromScope(scope,FALSE); scope=stripTemplateSpecifiersFromScope(scope,FALSE);
FileDef *rfd=rootNav->fileDef(); FileDef *rfd=rootNav->fileDef();
...@@ -3042,7 +3042,8 @@ static void buildFunctionList(EntryNav *rootNav) ...@@ -3042,7 +3042,8 @@ static void buildFunctionList(EntryNav *rootNav)
// the name already (in that case nd should be non-zero already) // the name already (in that case nd should be non-zero already)
if (nd==0 && rootNav->parent()->section() == Entry::NAMESPACE_SEC ) if (nd==0 && rootNav->parent()->section() == Entry::NAMESPACE_SEC )
{ {
QCString nscope=removeAnonymousScopes(rootNav->parent()->name()); //QCString nscope=removeAnonymousScopes(rootNav->parent()->name());
QCString nscope=rootNav->parent()->name();
if (!nscope.isEmpty()) if (!nscope.isEmpty())
{ {
nd = getResolvedNamespace(nscope); nd = getResolvedNamespace(nscope);
...@@ -3845,7 +3846,7 @@ static void findBaseClassesForClass( ...@@ -3845,7 +3846,7 @@ static void findBaseClassesForClass(
BaseInfo *bi=0; BaseInfo *bi=0;
for (bii.toFirst();(bi=bii.current());++bii) for (bii.toFirst();(bi=bii.current());++bii)
{ {
//printf("masterCd=%s bi->name=%s #actualArgs=%d\n", //printf("masterCd=%s bi->name='%s' #actualArgs=%d\n",
// masterCd->localName().data(),bi->name.data(),actualArgs?(int)actualArgs->count():-1); // masterCd->localName().data(),bi->name.data(),actualArgs?(int)actualArgs->count():-1);
bool delTempNames=FALSE; bool delTempNames=FALSE;
if (templateNames==0) if (templateNames==0)
...@@ -3924,7 +3925,7 @@ static bool findTemplateInstanceRelation(Entry *root, ...@@ -3924,7 +3925,7 @@ static bool findTemplateInstanceRelation(Entry *root,
// search for new template instances caused by base classes of // search for new template instances caused by base classes of
// instanceClass // instanceClass
EntryNav *templateRootNav = classEntries.find(templateClass->name()); EntryNav *templateRootNav = g_classEntries.find(templateClass->name());
if (templateRootNav) if (templateRootNav)
{ {
bool unloadNeeded=FALSE; bool unloadNeeded=FALSE;
...@@ -4225,7 +4226,8 @@ static bool findClassRelation( ...@@ -4225,7 +4226,8 @@ static bool findClassRelation(
} }
bool isATemplateArgument = templateNames!=0 && templateNames->find(biName)!=0; bool isATemplateArgument = templateNames!=0 && templateNames->find(biName)!=0;
// make templSpec canonical // make templSpec canonical
templSpec = getCanonicalTemplateSpec(cd, cd->getFileDef(), templSpec); // Warning: the following line doesn't work for Mixin classes (see bug 560623)
// templSpec = getCanonicalTemplateSpec(cd, cd->getFileDef(), templSpec);
//printf("3. found=%d\n",found); //printf("3. found=%d\n",found);
if (found) if (found)
...@@ -4378,7 +4380,7 @@ static void findClassEntries(EntryNav *rootNav) ...@@ -4378,7 +4380,7 @@ static void findClassEntries(EntryNav *rootNav)
{ {
if (isClassSection(rootNav)) if (isClassSection(rootNav))
{ {
classEntries.insert(rootNav->name(),rootNav); g_classEntries.insert(rootNav->name(),rootNav);
} }
RECURSE_ENTRYTREE(findClassEntries,rootNav); RECURSE_ENTRYTREE(findClassEntries,rootNav);
} }
...@@ -4392,7 +4394,7 @@ static void findInheritedTemplateInstances() ...@@ -4392,7 +4394,7 @@ static void findInheritedTemplateInstances()
{ {
ClassSDict::Iterator cli(*Doxygen::classSDict); ClassSDict::Iterator cli(*Doxygen::classSDict);
for (cli.toFirst();cli.current();++cli) cli.current()->visited=FALSE; for (cli.toFirst();cli.current();++cli) cli.current()->visited=FALSE;
QDictIterator<EntryNav> edi(classEntries); QDictIterator<EntryNav> edi(g_classEntries);
EntryNav *rootNav; EntryNav *rootNav;
for (;(rootNav=edi.current());++edi) for (;(rootNav=edi.current());++edi)
{ {
...@@ -4415,7 +4417,7 @@ static void findUsedTemplateInstances() ...@@ -4415,7 +4417,7 @@ static void findUsedTemplateInstances()
{ {
ClassSDict::Iterator cli(*Doxygen::classSDict); ClassSDict::Iterator cli(*Doxygen::classSDict);
for (cli.toFirst();cli.current();++cli) cli.current()->visited=FALSE; for (cli.toFirst();cli.current();++cli) cli.current()->visited=FALSE;
QDictIterator<EntryNav> edi(classEntries); QDictIterator<EntryNav> edi(g_classEntries);
EntryNav *rootNav; EntryNav *rootNav;
for (;(rootNav=edi.current());++edi) for (;(rootNav=edi.current());++edi)
{ {
...@@ -4437,7 +4439,7 @@ static void computeClassRelations() ...@@ -4437,7 +4439,7 @@ static void computeClassRelations()
{ {
ClassSDict::Iterator cli(*Doxygen::classSDict); ClassSDict::Iterator cli(*Doxygen::classSDict);
for (cli.toFirst();cli.current();++cli) cli.current()->visited=FALSE; for (cli.toFirst();cli.current();++cli) cli.current()->visited=FALSE;
QDictIterator<EntryNav> edi(classEntries); QDictIterator<EntryNav> edi(g_classEntries);
EntryNav *rootNav; EntryNav *rootNav;
for (;(rootNav=edi.current());++edi) for (;(rootNav=edi.current());++edi)
{ {
...@@ -4476,7 +4478,7 @@ static void computeClassRelations() ...@@ -4476,7 +4478,7 @@ static void computeClassRelations()
static void computeTemplateClassRelations() static void computeTemplateClassRelations()
{ {
QDictIterator<EntryNav> edi(classEntries); QDictIterator<EntryNav> edi(g_classEntries);
EntryNav *rootNav; EntryNav *rootNav;
for (;(rootNav=edi.current());++edi) for (;(rootNav=edi.current());++edi)
{ {
...@@ -4901,7 +4903,7 @@ static bool findGlobalMember(EntryNav *rootNav, ...@@ -4901,7 +4903,7 @@ static bool findGlobalMember(EntryNav *rootNav,
FileDef *fd=rootNav->fileDef(); FileDef *fd=rootNav->fileDef();
//printf("File %s\n",fd ? fd->name().data() : "<none>"); //printf("File %s\n",fd ? fd->name().data() : "<none>");
NamespaceSDict *nl = fd ? fd->getUsedNamespaces() : 0; NamespaceSDict *nl = fd ? fd->getUsedNamespaces() : 0;
//SDict<Definition> *cl = fd ? fd->getUsedClasses() : 0; //SDict<Definition> *cl = fd ? fd->getUsedClasses() : 0;
//printf("NamespaceList %p\n",nl); //printf("NamespaceList %p\n",nl);
...@@ -5007,9 +5009,8 @@ static QCString substituteTemplatesInString( ...@@ -5007,9 +5009,8 @@ static QCString substituteTemplatesInString(
) )
{ {
QCString dst; QCString dst;
QRegExp re(idMask); QRegExp re( "[A-Za-z_][A-Za-z_0-9]*");
//printf("type=%s\n",sa->type.data()); //printf("type=%s\n",sa->type.data());
int i,p=0,l; int i,p=0,l;
while ((i=re.match(src,p,&l))!=-1) // for each word in srcType while ((i=re.match(src,p,&l))!=-1) // for each word in srcType
{ {
...@@ -5294,7 +5295,9 @@ static void findMember(EntryNav *rootNav, ...@@ -5294,7 +5295,9 @@ static void findMember(EntryNav *rootNav,
//printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n", //printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n",
// scopeName.data(),className.data(),namespaceName.data()); // scopeName.data(),className.data(),namespaceName.data());
namespaceName=removeAnonymousScopes(namespaceName); //namespaceName=removeAnonymousScopes(namespaceName);
if (namespaceName.find('@')!=-1) return; // skip stuff in anonymous namespace...
//printf("namespaceName=`%s' className=`%s'\n",namespaceName.data(),className.data()); //printf("namespaceName=`%s' className=`%s'\n",namespaceName.data(),className.data());
// merge class and namespace scopes again // merge class and namespace scopes again
scopeName.resize(0); scopeName.resize(0);
...@@ -6104,7 +6107,7 @@ static void filterMemberDocumentation(EntryNav *rootNav) ...@@ -6104,7 +6107,7 @@ static void filterMemberDocumentation(EntryNav *rootNav)
|| ||
(root->section==Entry::VARIABLE_SEC && // variable (root->section==Entry::VARIABLE_SEC && // variable
!root->type.isEmpty() && // with a type !root->type.isEmpty() && // with a type
compoundKeywordDict.find(root->type)==0 // that is not a keyword g_compoundKeywordDict.find(root->type)==0 // that is not a keyword
// (to skip forward declaration of class etc.) // (to skip forward declaration of class etc.)
) )
) )
...@@ -6552,14 +6555,33 @@ static void addEnumValuesToEnums(EntryNav *rootNav) ...@@ -6552,14 +6555,33 @@ static void addEnumValuesToEnums(EntryNav *rootNav)
) )
) )
{ {
// For C# enum value are only inside the enum scope, so we // Unlike C++, for C# enum value are only inside the enum
// must create them here // scope, so we must create them here and only add them to the
// enum
e->loadEntry(g_storage); e->loadEntry(g_storage);
MemberDef *fmd = addVariableToFile(e,MemberDef::EnumValue, Entry *root = e->entry();
md->getOuterScope() ? md->getOuterScope()->name() : QCString(), MemberDef *fmd=new MemberDef(
e->name(),FALSE,0); root->fileName,root->startLine,
md->insertEnumField(fmd); root->type,root->name,root->args,0,
fmd->setEnumScope(md); Public, Normal,root->stat,Member,
MemberDef::EnumValue,0,0);
if (md->getClassDef()) fmd->setMemberClass(md->getClassDef());
else if (md->getNamespaceDef()) fmd->setNamespace(md->getNamespaceDef());
else if (md->getFileDef()) fmd->setFileDef(md->getFileDef());
fmd->setOuterScope(md->getOuterScope());
fmd->setTagInfo(e->tagInfo());
fmd->setDocumentation(root->doc,root->docFile,root->docLine);
fmd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
fmd->addSectionsToDefinition(root->anchors);
fmd->setInitializer(root->initializer);
fmd->setMaxInitLines(root->initLines);
fmd->setMemberGroupId(root->mGrpId);
fmd->setExplicitExternal(root->explicitExternal);
if (fmd)
{
md->insertEnumField(fmd);
fmd->setEnumScope(md);
}
e->releaseEntry(); e->releaseEntry();
} }
else else
...@@ -7024,7 +7046,7 @@ static void generateFileSources() ...@@ -7024,7 +7046,7 @@ static void generateFileSources()
if (fd->generateSourceFile()) // sources need to be shown in the output if (fd->generateSourceFile()) // sources need to be shown in the output
{ {
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(*g_outputList);
} }
else if (!fd->isReference() && Doxygen::parseSourcesNeeded) else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them // we needed to parse the sources even if we do not show them
...@@ -7057,7 +7079,7 @@ static void generateFileDocs() ...@@ -7057,7 +7079,7 @@ static void generateFileDocs()
if (doc) if (doc)
{ {
msg("Generating docs for file %s...\n",fd->docName().data()); msg("Generating docs for file %s...\n",fd->docName().data());
fd->writeDocumentation(*outputList); fd->writeDocumentation(*g_outputList);
} }
} }
} }
...@@ -7163,11 +7185,11 @@ static void generateClassList(ClassSDict &classSDict) ...@@ -7163,11 +7185,11 @@ static void generateClassList(ClassSDict &classSDict)
{ {
msg("Generating docs for compound %s...\n",cd->name().data()); msg("Generating docs for compound %s...\n",cd->name().data());
cd->writeDocumentation(*outputList); cd->writeDocumentation(*g_outputList);
cd->writeMemberList(*outputList); cd->writeMemberList(*g_outputList);
} }
// even for undocumented classes, the inner classes can be documented. // even for undocumented classes, the inner classes can be documented.
cd->writeDocumentationForInnerClasses(*outputList); cd->writeDocumentationForInnerClasses(*g_outputList);
} }
} }
} }
...@@ -7185,19 +7207,19 @@ static void generateClassDocs() ...@@ -7185,19 +7207,19 @@ static void generateClassDocs()
} }
msg("Generating annotated compound index...\n"); msg("Generating annotated compound index...\n");
writeAnnotatedIndex(*outputList); writeAnnotatedIndex(*g_outputList);
//if (Config_getBool("ALPHABETICAL_INDEX")) //if (Config_getBool("ALPHABETICAL_INDEX"))
//{ //{
msg("Generating alphabetical compound index...\n"); msg("Generating alphabetical compound index...\n");
writeAlphabeticalIndex(*outputList); writeAlphabeticalIndex(*g_outputList);
//} //}
msg("Generating hierarchical class index...\n"); msg("Generating hierarchical class index...\n");
writeHierarchicalIndex(*outputList); writeHierarchicalIndex(*g_outputList);
msg("Generating member index...\n"); msg("Generating member index...\n");
writeClassMemberIndex(*outputList); writeClassMemberIndex(*g_outputList);
if (Doxygen::exampleSDict->count()>0) if (Doxygen::exampleSDict->count()>0)
{ {
...@@ -7742,7 +7764,7 @@ static void findMainPage(EntryNav *rootNav) ...@@ -7742,7 +7764,7 @@ static void findMainPage(EntryNav *rootNav)
QCString title=root->args.stripWhiteSpace(); QCString title=root->args.stripWhiteSpace();
QCString indexName=usingTreeIndex()?"main":"index"; QCString indexName=usingTreeIndex()?"main":"index";
Doxygen::mainPage = new PageDef(root->fileName,root->startLine, Doxygen::mainPage = new PageDef(root->fileName,root->startLine,
indexName, root->brief+root->doc,title); indexName, root->brief+root->doc+root->inbodyDocs,title);
//setFileNameForSections(root->anchors,"index",Doxygen::mainPage); //setFileNameForSections(root->anchors,"index",Doxygen::mainPage);
Doxygen::mainPage->setFileName(indexName); Doxygen::mainPage->setFileName(indexName);
addPageToContext(Doxygen::mainPage,rootNav); addPageToContext(Doxygen::mainPage,rootNav);
...@@ -7910,7 +7932,7 @@ static void generatePageDocs() ...@@ -7910,7 +7932,7 @@ static void generatePageDocs()
{ {
msg("Generating docs for page %s...\n",pd->name().data()); msg("Generating docs for page %s...\n",pd->name().data());
Doxygen::insideMainPage=TRUE; Doxygen::insideMainPage=TRUE;
pd->writeDocumentation(*outputList); pd->writeDocumentation(*g_outputList);
Doxygen::insideMainPage=FALSE; Doxygen::insideMainPage=FALSE;
} }
} }
...@@ -7937,7 +7959,7 @@ static void buildExampleList(EntryNav *rootNav) ...@@ -7937,7 +7959,7 @@ static void buildExampleList(EntryNav *rootNav)
else else
{ {
PageDef *pd=new PageDef(root->fileName,root->startLine, PageDef *pd=new PageDef(root->fileName,root->startLine,
root->name,root->brief+root->doc,root->args); root->name,root->brief+root->doc+root->inbodyDocs,root->args);
pd->setFileName(convertNameToFile(pd->name()+"-example")); pd->setFileName(convertNameToFile(pd->name()+"-example"));
pd->addSectionsToDefinition(root->anchors); pd->addSectionsToDefinition(root->anchors);
//pi->addSections(root->anchors); //pi->addSections(root->anchors);
...@@ -7976,7 +7998,7 @@ void printNavTree(EntryNav *rootNav,int indent) ...@@ -7976,7 +7998,7 @@ void printNavTree(EntryNav *rootNav,int indent)
static void generateExampleDocs() static void generateExampleDocs()
{ {
outputList->disable(OutputGenerator::Man); g_outputList->disable(OutputGenerator::Man);
PageSDict::Iterator pdi(*Doxygen::exampleSDict); PageSDict::Iterator pdi(*Doxygen::exampleSDict);
PageDef *pd=0; PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi) for (pdi.toFirst();(pd=pdi.current());++pdi)
...@@ -7984,11 +8006,11 @@ static void generateExampleDocs() ...@@ -7984,11 +8006,11 @@ static void generateExampleDocs()
msg("Generating docs for example %s...\n",pd->name().data()); msg("Generating docs for example %s...\n",pd->name().data());
resetCCodeParserState(); resetCCodeParserState();
QCString n=pd->getOutputFileBase(); QCString n=pd->getOutputFileBase();
startFile(*outputList,n,n,pd->name()); startFile(*g_outputList,n,n,pd->name());
startTitle(*outputList,n); startTitle(*g_outputList,n);
outputList->docify(pd->name()); g_outputList->docify(pd->name());
endTitle(*outputList,n,0); endTitle(*g_outputList,n,0);
outputList->parseDoc(pd->docFile(), // file g_outputList->parseDoc(pd->docFile(), // file
pd->docLine(), // startLine pd->docLine(), // startLine
pd, // context pd, // context
0, // memberDef 0, // memberDef
...@@ -7997,9 +8019,9 @@ static void generateExampleDocs() ...@@ -7997,9 +8019,9 @@ static void generateExampleDocs()
TRUE, // is example TRUE, // is example
pd->name() pd->name()
); );
endFile(*outputList); endFile(*g_outputList);
} }
outputList->enable(OutputGenerator::Man); g_outputList->enable(OutputGenerator::Man);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -8013,7 +8035,7 @@ static void generateGroupDocs() ...@@ -8013,7 +8035,7 @@ static void generateGroupDocs()
{ {
if (!gd->isReference()) if (!gd->isReference())
{ {
gd->writeDocumentation(*outputList); gd->writeDocumentation(*g_outputList);
} }
} }
} }
...@@ -8022,7 +8044,7 @@ static void generateGroupDocs() ...@@ -8022,7 +8044,7 @@ static void generateGroupDocs()
//static void generatePackageDocs() //static void generatePackageDocs()
//{ //{
// writePackageIndex(*outputList); // writePackageIndex(*g_outputList);
// //
// if (Doxygen::packageDict.count()>0) // if (Doxygen::packageDict.count()>0)
// { // {
...@@ -8030,7 +8052,7 @@ static void generateGroupDocs() ...@@ -8030,7 +8052,7 @@ static void generateGroupDocs()
// PackageDef *pd; // PackageDef *pd;
// for (pdi.toFirst();(pd=pdi.current());++pdi) // for (pdi.toFirst();(pd=pdi.current());++pdi)
// { // {
// pd->writeDocumentation(*outputList); // pd->writeDocumentation(*g_outputList);
// } // }
// } // }
//} //}
...@@ -8040,7 +8062,7 @@ static void generateGroupDocs() ...@@ -8040,7 +8062,7 @@ static void generateGroupDocs()
static void generateNamespaceDocs() static void generateNamespaceDocs()
{ {
writeNamespaceIndex(*outputList); writeNamespaceIndex(*g_outputList);
NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict);
NamespaceDef *nd; NamespaceDef *nd;
...@@ -8051,7 +8073,7 @@ static void generateNamespaceDocs() ...@@ -8051,7 +8073,7 @@ static void generateNamespaceDocs()
if (nd->isLinkableInProject()) if (nd->isLinkableInProject())
{ {
msg("Generating docs for namespace %s\n",nd->name().data()); msg("Generating docs for namespace %s\n",nd->name().data());
nd->writeDocumentation(*outputList); nd->writeDocumentation(*g_outputList);
} }
// for each class in the namespace... // for each class in the namespace...
...@@ -8068,10 +8090,10 @@ static void generateNamespaceDocs() ...@@ -8068,10 +8090,10 @@ static void generateNamespaceDocs()
{ {
msg("Generating docs for compound %s...\n",cd->name().data()); msg("Generating docs for compound %s...\n",cd->name().data());
cd->writeDocumentation(*outputList); cd->writeDocumentation(*g_outputList);
cd->writeMemberList(*outputList); cd->writeMemberList(*g_outputList);
} }
cd->writeDocumentationForInnerClasses(*outputList); cd->writeDocumentationForInnerClasses(*g_outputList);
} }
} }
} }
...@@ -8201,14 +8223,14 @@ static QCString fixSlashes(QCString &s) ...@@ -8201,14 +8223,14 @@ static QCString fixSlashes(QCString &s)
// { // {
// err("Error: Cannot open file %s for writing\n",fileName.data()); // err("Error: Cannot open file %s for writing\n",fileName.data());
// } // }
// //outputList->generateExternalIndex(); // //g_outputList->generateExternalIndex();
// outputList->pushGeneratorState(); // g_outputList->pushGeneratorState();
// outputList->disableAllBut(OutputGenerator::Html); // g_outputList->disableAllBut(OutputGenerator::Html);
// startFile(*outputList,"header"+Doxygen::htmlFileExtension,0,"Search Engine",TRUE); // startFile(*g_outputList,"header"+Doxygen::htmlFileExtension,0,"Search Engine",TRUE);
// outputList->endPlainFile(); // g_outputList->endPlainFile();
// outputList->startPlainFile("footer"+Doxygen::htmlFileExtension); // g_outputList->startPlainFile("footer"+Doxygen::htmlFileExtension);
// endFile(*outputList,TRUE); // endFile(*g_outputList,TRUE);
// outputList->popGeneratorState(); // g_outputList->popGeneratorState();
// } // }
//} //}
...@@ -8513,7 +8535,7 @@ static void parseFiles(Entry *root,EntryNav *rootNav) ...@@ -8513,7 +8535,7 @@ static void parseFiles(Entry *root,EntryNav *rootNav)
} }
} }
QCString *s=inputFiles.first(); QCString *s=g_inputFiles.first();
while (s) while (s)
{ {
QCString fileName=*s; QCString fileName=*s;
...@@ -8561,10 +8583,65 @@ static void parseFiles(Entry *root,EntryNav *rootNav) ...@@ -8561,10 +8583,65 @@ static void parseFiles(Entry *root,EntryNav *rootNav)
ASSERT(fd!=0); ASSERT(fd!=0);
root->createNavigationIndex(rootNav,g_storage,fd); root->createNavigationIndex(rootNav,g_storage,fd);
s=inputFiles.next(); s=g_inputFiles.next();
} }
} }
// resolves a path that may include symlinks, if a recursive symlink is
// found an empty string is returned.
static QCString resolveSymlink(QCString path)
{
int sepPos=0;
QFileInfo fi;
QDict<void> nonSymlinks;
QDict<void> known;
QCString result = path;
do
{
#ifdef WIN32
// UNC path, skip server and share name
if (sepPos==0 && (result.left(2)=="//" || result.left(2)=="\\\\"))
sepPos = result.find('/',2);
if (sepPos!=-1)
sepPos = result.find('/',sepPos+1);
#else
sepPos = result.find('/',sepPos+1);
#endif
QCString prefix = sepPos==-1 ? result : result.left(sepPos);
if (nonSymlinks.find(prefix)==0)
{
fi.setFile(prefix);
if (fi.isSymLink())
{
QString target = fi.readLink();
if (QFileInfo(target).isRelative())
{
target = QDir::cleanDirPath(prefix+"/"+target.data());
}
if (sepPos!=-1)
{
if (fi.isDir() && target.length()>0 && target.at(target.length()-1)!='/')
{
target+='/';
}
target+=result.mid(sepPos);
}
result = QDir::cleanDirPath(target).data();
sepPos = 0;
if (known.find(result)) return QCString(); // recursive symlink!
known.insert(result,(void*)0x8);
}
else
{
nonSymlinks.insert(prefix,(void*)0x8);
}
}
}
while (sepPos!=-1);
return QDir::cleanDirPath(result).data();
}
static QDict<void> g_pathsVisited(1009);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Read all files matching at least one pattern in `patList' in the // Read all files matching at least one pattern in `patList' in the
...@@ -8585,7 +8662,15 @@ int readDir(QFileInfo *fi, ...@@ -8585,7 +8662,15 @@ int readDir(QFileInfo *fi,
QDict<void> *killDict QDict<void> *killDict
) )
{ {
QDir dir((const char *)fi->absFilePath()); QString dirName = fi->absFilePath();
if (fi->isSymLink())
{
dirName = resolveSymlink(dirName.data());
if (dirName.isEmpty()) return 0; // recusive symlink
if (g_pathsVisited.find(dirName)) return 0; // already visited path
g_pathsVisited.insert(dirName,(void*)0x8);
}
QDir dir(dirName);
dir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden ); dir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden );
int totalSize=0; int totalSize=0;
msg("Searching for files in directory %s\n", fi->absFilePath().data()); msg("Searching for files in directory %s\n", fi->absFilePath().data());
...@@ -9001,6 +9086,40 @@ void initDoxygen() ...@@ -9001,6 +9086,40 @@ void initDoxygen()
initClassMemberIndices(); initClassMemberIndices();
initNamespaceMemberIndices(); initNamespaceMemberIndices();
initFileMemberIndices(); initFileMemberIndices();
Doxygen::symbolMap = new QDict<DefinitionIntf>(1000);
Doxygen::inputNameList = new FileNameList;
Doxygen::inputNameList->setAutoDelete(TRUE);
Doxygen::memberNameSDict = new MemberNameSDict(10000);
Doxygen::memberNameSDict->setAutoDelete(TRUE);
Doxygen::functionNameSDict = new MemberNameSDict(10000);
Doxygen::functionNameSDict->setAutoDelete(TRUE);
Doxygen::groupSDict = new GroupSDict(17);
Doxygen::groupSDict->setAutoDelete(TRUE);
Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globalScope>");
Doxygen::namespaceSDict = new NamespaceSDict(20);
Doxygen::namespaceSDict->setAutoDelete(TRUE);
Doxygen::classSDict = new ClassSDict(1009);
Doxygen::classSDict->setAutoDelete(TRUE);
Doxygen::hiddenClasses = new ClassSDict(257);
Doxygen::hiddenClasses->setAutoDelete(TRUE);
Doxygen::directories = new DirSDict(17);
Doxygen::directories->setAutoDelete(TRUE);
Doxygen::pageSDict = new PageSDict(1009); // all doc pages
Doxygen::pageSDict->setAutoDelete(TRUE);
Doxygen::exampleSDict = new PageSDict(1009); // all examples
Doxygen::exampleSDict->setAutoDelete(TRUE);
Doxygen::inputNameDict = new FileNameDict(10007);
Doxygen::includeNameDict = new FileNameDict(10007);
Doxygen::exampleNameDict = new FileNameDict(1009);
Doxygen::exampleNameDict->setAutoDelete(TRUE);
Doxygen::imageNameDict = new FileNameDict(257);
Doxygen::dotFileNameDict = new FileNameDict(257);
Doxygen::sectionDict.setAutoDelete(TRUE);
Doxygen::memGrpInfoDict.setAutoDelete(TRUE);
Doxygen::tagDestinationDict.setAutoDelete(TRUE);
Doxygen::lookupCache.setAutoDelete(TRUE);
Doxygen::dirRelations.setAutoDelete(TRUE);
} }
void cleanUpDoxygen() void cleanUpDoxygen()
...@@ -9018,7 +9137,7 @@ void cleanUpDoxygen() ...@@ -9018,7 +9137,7 @@ void cleanUpDoxygen()
delete Doxygen::parserManager; delete Doxygen::parserManager;
cleanUpPreprocessor(); cleanUpPreprocessor();
delete theTranslator; delete theTranslator;
delete outputList; delete g_outputList;
Mappers::freeMappers(); Mappers::freeMappers();
codeFreeScanner(); codeFreeScanner();
...@@ -9368,6 +9487,7 @@ void readConfiguration(int argc, char **argv) ...@@ -9368,6 +9487,7 @@ void readConfiguration(int argc, char **argv)
} }
/** check and resolve config options */
void checkConfiguration() void checkConfiguration()
{ {
...@@ -9376,7 +9496,11 @@ void checkConfiguration() ...@@ -9376,7 +9496,11 @@ void checkConfiguration()
Config::instance()->check(); Config::instance()->check();
initWarningFormat(); initWarningFormat();
}
/** adjust globals that depend on configuration settings. */
void adjustConfiguration()
{
QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
if (!setTranslator(outputLanguage)) if (!setTranslator(outputLanguage))
{ {
...@@ -9403,7 +9527,56 @@ void checkConfiguration() ...@@ -9403,7 +9527,56 @@ void checkConfiguration()
Config_getBool("REFERENCES_RELATION") || Config_getBool("REFERENCES_RELATION") ||
Config_getBool("REFERENCED_BY_RELATION"); Config_getBool("REFERENCED_BY_RELATION");
/**************************************************************************
* Add custom extension mappings
**************************************************************************/
QStrList &extMaps = Config_getList("EXTENSION_MAPPING");
char *mapping = extMaps.first();
while (mapping)
{
QCString mapStr = mapping;
int i;
if ((i=mapStr.find('='))!=-1)
{
QCString ext=mapStr.left(i).stripWhiteSpace().lower();
QCString language=mapStr.mid(i+1).stripWhiteSpace().lower();
if (!updateLanguageMapping(ext,language))
{
err("Failed to map file extension '%s' to unsupported language '%s'.\n"
"Check the EXTENSION_MAPPING setting in the config file.\n",
ext.data(),language.data());
}
else
{
msg("Adding custom extension mapping: .%s will be treated as language %s\n",
ext.data(),language.data());
}
}
mapping = extMaps.next();
}
// add predefined macro name to a dictionary
QStrList &expandAsDefinedList =Config_getList("EXPAND_AS_DEFINED");
s=expandAsDefinedList.first();
while (s)
{
if (Doxygen::expandAsDefinedDict[s]==0)
{
Doxygen::expandAsDefinedDict.insert(s,(void *)666);
}
s=expandAsDefinedList.next();
}
// read aliases and store them in a dictionary
readAliases();
// store number of spaces in a tab into Doxygen::spaces
int &tabSize = Config_getInt("TAB_SIZE");
Doxygen::spaces.resize(tabSize+1);
int sp;for (sp=0;sp<tabSize;sp++) Doxygen::spaces.at(sp)=' ';
Doxygen::spaces.at(tabSize)='\0';
} }
#ifdef HAS_SIGNALS #ifdef HAS_SIGNALS
...@@ -9481,39 +9654,113 @@ static QCString getQchFileName() ...@@ -9481,39 +9654,113 @@ static QCString getQchFileName()
+ QCString(".qch"); + QCString(".qch");
} }
void parseInput() void searchInputFiles(StringList &inputFiles)
{ {
atexit(exitDoxygen); QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
bool alwaysRecursive = Config_getBool("RECURSIVE");
StringDict excludeNameDict(1009);
excludeNameDict.setAutoDelete(TRUE);
// gather names of all files in the include path
msg("Searching for include files...\n");
QStrList &includePathList = Config_getList("INCLUDE_PATH");
char *s=includePathList.first();
while (s)
{
QStrList &pl = Config_getList("INCLUDE_FILE_PATTERNS");
if (pl.count()==0)
{
pl = Config_getList("FILE_PATTERNS");
}
readFileOrDirectory(s,0,Doxygen::includeNameDict,0,&pl,
&exclPatterns,0,0,
alwaysRecursive);
s=includePathList.next();
}
msg("Searching for example files...\n");
QStrList &examplePathList = Config_getList("EXAMPLE_PATH");
s=examplePathList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::exampleNameDict,0,
&Config_getList("EXAMPLE_PATTERNS"),
0,0,0,
(alwaysRecursive || Config_getBool("EXAMPLE_RECURSIVE")));
s=examplePathList.next();
}
msg("Searching for images...\n");
QStrList &imagePathList=Config_getList("IMAGE_PATH");
s=imagePathList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::imageNameDict,0,0,
0,0,0,
alwaysRecursive);
s=imagePathList.next();
}
msg("Searching for dot files...\n");
QStrList &dotFileList=Config_getList("DOTFILE_DIRS");
s=dotFileList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::dotFileNameDict,0,0,
0,0,0,
alwaysRecursive);
s=dotFileList.next();
}
msg("Searching for files to exclude\n");
QStrList &excludeList = Config_getList("EXCLUDE");
s=excludeList.first();
while (s)
{
readFileOrDirectory(s,0,0,0,&Config_getList("FILE_PATTERNS"),
0,0,&excludeNameDict,
alwaysRecursive,
FALSE);
s=excludeList.next();
}
/************************************************************************** /**************************************************************************
* Add custom extension mappings * Determine Input Files *
**************************************************************************/ **************************************************************************/
QStrList &extMaps = Config_getList("EXTENSION_MAPPING"); msg("Searching for files to process...\n");
char *mapping = extMaps.first(); QDict<void> *killDict = new QDict<void>(10007);
while (mapping) int inputSize=0;
QStrList &inputList=Config_getList("INPUT");
inputFiles.setAutoDelete(TRUE);
s=inputList.first();
while (s)
{ {
QCString mapStr = mapping; QCString path=s;
int i; uint l = path.length();
if ((i=mapStr.find('='))!=-1) // strip trailing slashes
{ if (path.at(l-1)=='\\' || path.at(l-1)=='/') path=path.left(l-1);
QCString ext=mapStr.left(i).stripWhiteSpace().lower();
QCString language=mapStr.mid(i+1).stripWhiteSpace().lower(); inputSize+=readFileOrDirectory(
if (!updateLanguageMapping(ext,language)) path,
{ Doxygen::inputNameList,
err("Failed to map file extension '%s' to unsupported language '%s'.\n" Doxygen::inputNameDict,
"Check the EXTENSION_MAPPING setting in the config file.\n", &excludeNameDict,
ext.data(),language.data()); &Config_getList("FILE_PATTERNS"),
} &exclPatterns,
else &inputFiles,0,
{ alwaysRecursive,
msg("Adding custom extension mapping: .%s will be treated as language %s\n", TRUE,
ext.data(),language.data()); killDict);
} s=inputList.next();
}
mapping = extMaps.next();
} }
delete killDict;
}
void parseInput()
{
atexit(exitDoxygen);
/************************************************************************** /**************************************************************************
...@@ -9551,7 +9798,6 @@ void parseInput() ...@@ -9551,7 +9798,6 @@ void parseInput()
* Initialize global lists and dictionaries * Initialize global lists and dictionaries
**************************************************************************/ **************************************************************************/
Doxygen::symbolMap = new QDict<DefinitionIntf>(1000);
int cacheSize = Config_getInt("SYMBOL_CACHE_SIZE"); int cacheSize = Config_getInt("SYMBOL_CACHE_SIZE");
if (cacheSize<0) cacheSize=0; if (cacheSize<0) cacheSize=0;
if (cacheSize>9) cacheSize=9; if (cacheSize>9) cacheSize=9;
...@@ -9575,58 +9821,19 @@ void parseInput() ...@@ -9575,58 +9821,19 @@ void parseInput()
exit(1); exit(1);
} }
Doxygen::inputNameList = new FileNameList;
Doxygen::inputNameList->setAutoDelete(TRUE);
Doxygen::memberNameSDict = new MemberNameSDict(10000);
Doxygen::memberNameSDict->setAutoDelete(TRUE);
Doxygen::functionNameSDict = new MemberNameSDict(10000);
Doxygen::functionNameSDict->setAutoDelete(TRUE);
Doxygen::groupSDict = new GroupSDict(17);
Doxygen::groupSDict->setAutoDelete(TRUE);
Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globalScope>");
Doxygen::namespaceSDict = new NamespaceSDict(20);
Doxygen::namespaceSDict->setAutoDelete(TRUE);
Doxygen::classSDict = new ClassSDict(1009);
Doxygen::classSDict->setAutoDelete(TRUE);
Doxygen::hiddenClasses = new ClassSDict(257);
Doxygen::hiddenClasses->setAutoDelete(TRUE);
Doxygen::directories = new DirSDict(17);
Doxygen::directories->setAutoDelete(TRUE);
Doxygen::pageSDict = new PageSDict(1009); // all doc pages
Doxygen::pageSDict->setAutoDelete(TRUE);
Doxygen::exampleSDict = new PageSDict(1009); // all examples
Doxygen::exampleSDict->setAutoDelete(TRUE);
Doxygen::inputNameDict = new FileNameDict(10007);
Doxygen::includeNameDict = new FileNameDict(10007);
Doxygen::exampleNameDict = new FileNameDict(1009);
Doxygen::exampleNameDict->setAutoDelete(TRUE);
Doxygen::imageNameDict = new FileNameDict(257);
Doxygen::dotFileNameDict = new FileNameDict(257);
Doxygen::sectionDict.setAutoDelete(TRUE);
Doxygen::memGrpInfoDict.setAutoDelete(TRUE);
Doxygen::tagDestinationDict.setAutoDelete(TRUE);
Doxygen::lookupCache.setAutoDelete(TRUE);
Doxygen::dirRelations.setAutoDelete(TRUE);
excludeNameDict.setAutoDelete(TRUE);
/************************************************************************** /**************************************************************************
* Initialize some global constants * Initialize some global constants
**************************************************************************/ **************************************************************************/
int &tabSize = Config_getInt("TAB_SIZE"); g_compoundKeywordDict.insert("template class",(void *)8);
spaces.resize(tabSize+1); g_compoundKeywordDict.insert("template struct",(void *)8);
int sp;for (sp=0;sp<tabSize;sp++) spaces.at(sp)=' '; g_compoundKeywordDict.insert("class",(void *)8);
spaces.at(tabSize)='\0'; g_compoundKeywordDict.insert("struct",(void *)8);
g_compoundKeywordDict.insert("union",(void *)8);
compoundKeywordDict.insert("template class",(void *)8); g_compoundKeywordDict.insert("interface",(void *)8);
compoundKeywordDict.insert("template struct",(void *)8); g_compoundKeywordDict.insert("exception",(void *)8);
compoundKeywordDict.insert("class",(void *)8);
compoundKeywordDict.insert("struct",(void *)8);
compoundKeywordDict.insert("union",(void *)8);
compoundKeywordDict.insert("interface",(void *)8);
compoundKeywordDict.insert("exception",(void *)8);
bool alwaysRecursive = Config_getBool("RECURSIVE");
/************************************************************************** /**************************************************************************
* Check/create output directorties * * Check/create output directorties *
...@@ -9686,124 +9893,16 @@ void parseInput() ...@@ -9686,124 +9893,16 @@ void parseInput()
* Read and preprocess input * * Read and preprocess input *
**************************************************************************/ **************************************************************************/
QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
// prevent search in the output directories // prevent search in the output directories
QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
if (generateHtml) exclPatterns.append(htmlOutput); if (generateHtml) exclPatterns.append(htmlOutput);
if (generateXml) exclPatterns.append(xmlOutput); if (generateXml) exclPatterns.append(xmlOutput);
if (generateLatex) exclPatterns.append(latexOutput); if (generateLatex) exclPatterns.append(latexOutput);
if (generateRtf) exclPatterns.append(rtfOutput); if (generateRtf) exclPatterns.append(rtfOutput);
if (generateMan) exclPatterns.append(manOutput); if (generateMan) exclPatterns.append(manOutput);
// gather names of all files in the include path
msg("Searching for include files...\n");
QStrList &includePathList = Config_getList("INCLUDE_PATH");
char *s=includePathList.first();
while (s)
{
QStrList &pl = Config_getList("INCLUDE_FILE_PATTERNS");
if (pl.count()==0)
{
pl = Config_getList("FILE_PATTERNS");
}
readFileOrDirectory(s,0,Doxygen::includeNameDict,0,&pl,
&exclPatterns,0,0,
alwaysRecursive);
s=includePathList.next();
}
msg("Searching for example files...\n");
QStrList &examplePathList = Config_getList("EXAMPLE_PATH");
s=examplePathList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::exampleNameDict,0,
&Config_getList("EXAMPLE_PATTERNS"),
0,0,0,
(alwaysRecursive || Config_getBool("EXAMPLE_RECURSIVE")));
s=examplePathList.next();
}
msg("Searching for images...\n");
QStrList &imagePathList=Config_getList("IMAGE_PATH");
s=imagePathList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::imageNameDict,0,0,
0,0,0,
alwaysRecursive);
s=imagePathList.next();
}
msg("Searching for dot files...\n");
QStrList &dotFileList=Config_getList("DOTFILE_DIRS");
s=dotFileList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::dotFileNameDict,0,0,
0,0,0,
alwaysRecursive);
s=dotFileList.next();
}
msg("Searching for files to exclude\n");
QStrList &excludeList = Config_getList("EXCLUDE");
s=excludeList.first();
while (s)
{
readFileOrDirectory(s,0,0,0,&Config_getList("FILE_PATTERNS"),
0,0,&excludeNameDict,
alwaysRecursive,
FALSE);
s=excludeList.next();
}
/**************************************************************************
* Determine Input Files *
**************************************************************************/
msg("Searching for files to process...\n");
QDict<void> *killDict = new QDict<void>(10007);
int inputSize=0;
QStrList &inputList=Config_getList("INPUT");
inputFiles.setAutoDelete(TRUE);
s=inputList.first();
while (s)
{
QCString path=s;
uint l = path.length();
// strip trailing slashes
if (path.at(l-1)=='\\' || path.at(l-1)=='/') path=path.left(l-1);
inputSize+=readFileOrDirectory(
path,
Doxygen::inputNameList,
Doxygen::inputNameDict,
&excludeNameDict,
&Config_getList("FILE_PATTERNS"),
&exclPatterns,
&inputFiles,0,
alwaysRecursive,
TRUE,
killDict);
s=inputList.next();
}
delete killDict;
// add predefined macro name to a dictionary
QStrList &expandAsDefinedList =Config_getList("EXPAND_AS_DEFINED");
s=expandAsDefinedList.first();
while (s)
{
if (Doxygen::expandAsDefinedDict[s]==0)
{
Doxygen::expandAsDefinedDict.insert(s,(void *)666);
}
s=expandAsDefinedList.next();
}
// read aliases and store them in a dictionary
readAliases();
searchInputFiles(g_inputFiles);
// Notice: the order of the function calls below is very important! // Notice: the order of the function calls below is very important!
...@@ -9830,7 +9929,7 @@ void parseInput() ...@@ -9830,7 +9929,7 @@ void parseInput()
msg("Reading and parsing tag files\n"); msg("Reading and parsing tag files\n");
QStrList &tagFileList = Config_getList("TAGFILES"); QStrList &tagFileList = Config_getList("TAGFILES");
s=tagFileList.first(); char *s=tagFileList.first();
while (s) while (s)
{ {
readTagFile(root,s); readTagFile(root,s);
...@@ -9888,9 +9987,6 @@ void parseInput() ...@@ -9888,9 +9987,6 @@ void parseInput()
buildFileList(rootNav); buildFileList(rootNav);
//generateFileTree(); //generateFileTree();
msg("Searching for included using directives...\n");
findIncludedUsingDirectives();
msg("Building class list...\n"); msg("Building class list...\n");
buildClassList(rootNav); buildClassList(rootNav);
...@@ -9904,16 +10000,12 @@ void parseInput() ...@@ -9904,16 +10000,12 @@ void parseInput()
resolveClassNestingRelations(); resolveClassNestingRelations();
// calling buildClassList may result in cached relations that // calling buildClassList may result in cached relations that
// become invalid after resolveClassNestingRelation(), that's why // become invalid after resolveClassNestingRelations(), that's why
// we need to clear the cache here // we need to clear the cache here
Doxygen::lookupCache.clear(); Doxygen::lookupCache.clear();
// we don't need the list of using declaration anymore // we don't need the list of using declaration anymore
g_usingDeclarations.clear(); g_usingDeclarations.clear();
msg("Searching for members imported via using declarations...\n");
findUsingDeclImports(rootNav);
findUsingDeclarations(rootNav);
msg("Building example list...\n"); msg("Building example list...\n");
buildExampleList(rootNav); buildExampleList(rootNav);
...@@ -9927,6 +10019,15 @@ void parseInput() ...@@ -9927,6 +10019,15 @@ void parseInput()
msg("Searching for documented typedefs...\n"); msg("Searching for documented typedefs...\n");
buildTypedefList(rootNav); buildTypedefList(rootNav);
msg("Searching for members imported via using declarations...\n");
findUsingDeclImports(rootNav);
// this should be after buildTypedefList in order to properly import
// used typedefs
findUsingDeclarations(rootNav);
msg("Searching for included using directives...\n");
findIncludedUsingDirectives();
msg("Searching for documented variables...\n"); msg("Searching for documented variables...\n");
buildVarList(rootNav); buildVarList(rootNav);
...@@ -9956,13 +10057,13 @@ void parseInput() ...@@ -9956,13 +10057,13 @@ void parseInput()
flushUnresolvedRelations(); flushUnresolvedRelations();
//if (Config_getBool("OPTIMIZE_OUTPUT_VHDL")) //if (Config_getBool("OPTIMIZE_OUTPUT_VHDL"))
//{ //{
// VhdlDocGen::computeVhdlComponentRelations(classEntries,g_storage); // VhdlDocGen::computeVhdlComponentRelations(g_classEntries,g_storage);
//} //}
//else //else
//{ //{
computeClassRelations(); computeClassRelations();
//} //}
classEntries.clear(); g_classEntries.clear();
msg("Add enum values to enums...\n"); msg("Add enum values to enums...\n");
addEnumValuesToEnums(rootNav); addEnumValuesToEnums(rootNav);
...@@ -10093,10 +10194,10 @@ void generateOutput() ...@@ -10093,10 +10194,10 @@ void generateOutput()
initDocParser(); initDocParser();
outputList = new OutputList(TRUE); g_outputList = new OutputList(TRUE);
if (Config_getBool("GENERATE_HTML")) if (Config_getBool("GENERATE_HTML"))
{ {
outputList->add(new HtmlGenerator); g_outputList->add(new HtmlGenerator);
HtmlGenerator::init(); HtmlGenerator::init();
if (Config_getBool("GENERATE_HTMLHELP")) Doxygen::indexList.addIndex(new HtmlHelp); if (Config_getBool("GENERATE_HTMLHELP")) Doxygen::indexList.addIndex(new HtmlHelp);
if (Config_getBool("GENERATE_QHP")) Doxygen::indexList.addIndex(new Qhp); if (Config_getBool("GENERATE_QHP")) Doxygen::indexList.addIndex(new Qhp);
...@@ -10116,17 +10217,17 @@ void generateOutput() ...@@ -10116,17 +10217,17 @@ void generateOutput()
} }
if (Config_getBool("GENERATE_LATEX")) if (Config_getBool("GENERATE_LATEX"))
{ {
outputList->add(new LatexGenerator); g_outputList->add(new LatexGenerator);
LatexGenerator::init(); LatexGenerator::init();
} }
if (Config_getBool("GENERATE_MAN")) if (Config_getBool("GENERATE_MAN"))
{ {
outputList->add(new ManGenerator); g_outputList->add(new ManGenerator);
ManGenerator::init(); ManGenerator::init();
} }
if (Config_getBool("GENERATE_RTF")) if (Config_getBool("GENERATE_RTF"))
{ {
outputList->add(new RTFGenerator); g_outputList->add(new RTFGenerator);
RTFGenerator::init(); RTFGenerator::init();
} }
...@@ -10171,17 +10272,17 @@ void generateOutput() ...@@ -10171,17 +10272,17 @@ void generateOutput()
//printf("writing style info\n"); //printf("writing style info\n");
QCString genString = QCString genString =
theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME")); theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"));
outputList->writeStyleInfo(0); // write first part g_outputList->writeStyleInfo(0); // write first part
outputList->disableAllBut(OutputGenerator::Latex); g_outputList->disableAllBut(OutputGenerator::Latex);
outputList->parseText(genString); g_outputList->parseText(genString);
outputList->writeStyleInfo(1); // write second part g_outputList->writeStyleInfo(1); // write second part
//parseText(*outputList,theTranslator->trWrittenBy()); //parseText(*g_outputList,theTranslator->trWrittenBy());
outputList->writeStyleInfo(2); // write third part g_outputList->writeStyleInfo(2); // write third part
outputList->parseText(genString); g_outputList->parseText(genString);
outputList->writeStyleInfo(3); // write fourth part g_outputList->writeStyleInfo(3); // write fourth part
//parseText(*outputList,theTranslator->trWrittenBy()); //parseText(*g_outputList,theTranslator->trWrittenBy());
outputList->writeStyleInfo(4); // write last part g_outputList->writeStyleInfo(4); // write last part
outputList->enableAll(); g_outputList->enableAll();
//statistics(); //statistics();
...@@ -10189,10 +10290,10 @@ void generateOutput() ...@@ -10189,10 +10290,10 @@ void generateOutput()
// If the result is 0 we do not generate the lists and omit the // If the result is 0 we do not generate the lists and omit the
// corresponding links in the index. // corresponding links in the index.
msg("Generating index page...\n"); msg("Generating index page...\n");
writeIndex(*outputList); writeIndex(*g_outputList);
msg("Generating page index...\n"); msg("Generating page index...\n");
writePageIndex(*outputList); writePageIndex(*g_outputList);
msg("Generating example documentation...\n"); msg("Generating example documentation...\n");
generateExampleDocs(); generateExampleDocs();
...@@ -10213,7 +10314,7 @@ void generateOutput() ...@@ -10213,7 +10314,7 @@ void generateOutput()
generateGroupDocs(); generateGroupDocs();
msg("Generating group index...\n"); msg("Generating group index...\n");
writeGroupIndex(*outputList); writeGroupIndex(*g_outputList);
msg("Generating class documentation...\n"); msg("Generating class documentation...\n");
generateClassDocs(); generateClassDocs();
...@@ -10221,41 +10322,41 @@ void generateOutput() ...@@ -10221,41 +10322,41 @@ void generateOutput()
if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY")) if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY"))
{ {
msg("Generating graphical class hierarchy...\n"); msg("Generating graphical class hierarchy...\n");
writeGraphicalClassHierarchy(*outputList); writeGraphicalClassHierarchy(*g_outputList);
} }
msg("Generating namespace index...\n"); msg("Generating namespace index...\n");
generateNamespaceDocs(); generateNamespaceDocs();
msg("Generating namespace member index...\n"); msg("Generating namespace member index...\n");
writeNamespaceMemberIndex(*outputList); writeNamespaceMemberIndex(*g_outputList);
if (Config_getBool("GENERATE_LEGEND")) if (Config_getBool("GENERATE_LEGEND"))
{ {
msg("Generating graph info page...\n"); msg("Generating graph info page...\n");
writeGraphInfo(*outputList); writeGraphInfo(*g_outputList);
} }
if (Config_getBool("SHOW_DIRECTORIES")) if (Config_getBool("SHOW_DIRECTORIES"))
{ {
msg("Generating directory documentation...\n"); msg("Generating directory documentation...\n");
generateDirDocs(*outputList); generateDirDocs(*g_outputList);
} }
msg("Generating file index...\n"); msg("Generating file index...\n");
writeFileIndex(*outputList); writeFileIndex(*g_outputList);
if (Config_getBool("SHOW_DIRECTORIES")) if (Config_getBool("SHOW_DIRECTORIES"))
{ {
msg("Generating directory index...\n"); msg("Generating directory index...\n");
writeDirIndex(*outputList); writeDirIndex(*g_outputList);
} }
msg("Generating example index...\n"); msg("Generating example index...\n");
writeExampleIndex(*outputList); writeExampleIndex(*g_outputList);
msg("Generating file member index...\n"); msg("Generating file member index...\n");
writeFileMemberIndex(*outputList); writeFileMemberIndex(*g_outputList);
//writeDirDependencyGraph(Config_getString("HTML_OUTPUT")); //writeDirDependencyGraph(Config_getString("HTML_OUTPUT"));
......
...@@ -71,7 +71,7 @@ struct LookupInfo ...@@ -71,7 +71,7 @@ struct LookupInfo
QCString resolvedType; QCString resolvedType;
}; };
extern QCString spaces; extern QCString g_spaces;
/*! \brief This class serves as a namespace for global variables used by doxygen. /*! \brief This class serves as a namespace for global variables used by doxygen.
* *
...@@ -130,11 +130,14 @@ class Doxygen ...@@ -130,11 +130,14 @@ class Doxygen
static bool userComments; static bool userComments;
static IndexList indexList; static IndexList indexList;
static int subpageNestingLevel; static int subpageNestingLevel;
static QCString spaces;
}; };
void initDoxygen(); void initDoxygen();
void readConfiguration(int argc, char **argv); void readConfiguration(int argc, char **argv);
void checkConfiguration(); void checkConfiguration();
void adjustConfiguration();
void searchInputFiles(StringList &inputFiles);
void parseInput(); void parseInput();
void generateOutput(); void generateOutput();
void readAliases(); void readAliases();
......
...@@ -530,9 +530,6 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -530,9 +530,6 @@ void FileDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part ------------------------------- //---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli( QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::File)); LayoutDocManager::instance().docEntries(LayoutDocManager::File));
LayoutDocEntry *lde; LayoutDocEntry *lde;
...@@ -627,62 +624,6 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -627,62 +624,6 @@ void FileDef::writeDocumentation(OutputList &ol)
} }
} }
#else
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
else
{
writeBriefDescription(ol);
}
writeIncludeFiles(ol);
writeIncludeGraph(ol);
writeIncludedByGraph(ol);
writeSourceLink(ol);
startMemberDeclarations(ol);
writeNamespaceDeclarations(ol);
writeClassDeclarations(ol);
writeMemberGroups(ol);
writeMemberDeclarations(ol,MemberList::decDefineMembers,theTranslator->trDefines());
writeMemberDeclarations(ol,MemberList::decTypedefMembers,theTranslator->trTypedefs());
writeMemberDeclarations(ol,MemberList::decEnumMembers,theTranslator->trEnumerations());
writeMemberDeclarations(ol,MemberList::decFuncMembers,
fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
theTranslator->trFunctions()) ;
writeMemberDeclarations(ol,MemberList::decVarMembers,theTranslator->trVariables());
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
startMemberDocumentation(ol);
writeMemberDocumentation(ol,MemberList::docDefineMembers,theTranslator->trDefineDocumentation());
writeMemberDocumentation(ol,MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
writeMemberDocumentation(ol,MemberList::docFuncMembers,theTranslator->trFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::docVarMembers,theTranslator->trVariableDocumentation());
endMemberDocumentation(ol);
// write Author section (Man only)
writeAuthorSection(ol);
#endif
//---------------------------------------- end flexible part ------------------------------- //---------------------------------------- end flexible part -------------------------------
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
...@@ -1056,6 +997,7 @@ void FileDef::addIncludedUsingDirectives() ...@@ -1056,6 +997,7 @@ void FileDef::addIncludedUsingDirectives()
{ {
if (ii->fileDef && ii->fileDef!=this) if (ii->fileDef && ii->fileDef!=this)
{ {
// add using directives
NamespaceSDict *unl = ii->fileDef->usingDirList; NamespaceSDict *unl = ii->fileDef->usingDirList;
if (unl) if (unl)
{ {
...@@ -1073,6 +1015,25 @@ void FileDef::addIncludedUsingDirectives() ...@@ -1073,6 +1015,25 @@ void FileDef::addIncludedUsingDirectives()
} }
} }
} }
// add using declarations
SDict<Definition> *udl = ii->fileDef->usingDeclList;
if (udl)
{
SDict<Definition>::Iterator udi(*udl);
Definition *d;
for (udi.toLast();(d=udi.current());--udi)
{
//printf("Adding using declaration %s\n",d->name().data());
if (usingDeclList==0)
{
usingDeclList = new SDict<Definition>(17);
}
if (usingDeclList->find(d->qualifiedName())==0)
{
usingDeclList->prepend(d->qualifiedName(),d);
}
}
}
} }
} }
} }
......
...@@ -345,10 +345,10 @@ static void addDocCrossReference(MemberDef *src, MemberDef *dst) ...@@ -345,10 +345,10 @@ static void addDocCrossReference(MemberDef *src, MemberDef *dst)
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
/** /**
searches for definition of a type searches for definition of a type
@param memberName the name of the type @param tname the name of the type
@param moduleName name of enclosing module or null, if global entry @param moduleName name of enclosing module or null, if global entry
@param cd the entry, if found or null @param cd the entry, if found or null
@param useList array of data of USE-statement @param useDict dictionary of data of USE-statement
@returns true, if type is found @returns true, if type is found
*/ */
static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName, static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName,
......
...@@ -204,7 +204,7 @@ SEPARATE [:, \t] ...@@ -204,7 +204,7 @@ SEPARATE [:, \t]
ID [a-z_A-Z%]+{IDSYM}* ID [a-z_A-Z%]+{IDSYM}*
PP_ID {ID} PP_ID {ID}
LABELID [a-z_A-Z]+[a-z_A-Z0-9\-]* LABELID [a-z_A-Z]+[a-z_A-Z0-9\-]*
SUBPROG (subroutine|function) SUBPROG (subroutine|function|block)
B [ \t] B [ \t]
BS [ \t]* BS [ \t]*
BS_ [ \t]+ BS_ [ \t]+
......
...@@ -747,6 +747,7 @@ void FTVHelp::generateTreeView(QString* OutString) ...@@ -747,6 +747,7 @@ void FTVHelp::generateTreeView(QString* OutString)
else else
{ {
QTextStream t(&f); QTextStream t(&f);
t.setEncoding(QTextStream::UnicodeUTF8);
t << *OutString << endl; t << *OutString << endl;
f.close(); f.close();
} }
......
...@@ -500,7 +500,7 @@ void GroupDef::computeAnchors() ...@@ -500,7 +500,7 @@ void GroupDef::computeAnchors()
void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{ {
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
|| !documentation().isEmpty() || !documentation().isEmpty() || !inbodyDocumentation().isEmpty()
) )
{ {
if (pageDict->count()!=countMembers()) // not only pages -> classical layout if (pageDict->count()!=countMembers()) // not only pages -> classical layout
...@@ -513,25 +513,25 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) ...@@ -513,25 +513,25 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.startGroupHeader(); ol.startGroupHeader();
ol.parseText(title); ol.parseText(title);
ol.endGroupHeader(); ol.endGroupHeader();
}
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
} }
// write separator between brief and details // write separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty()) !documentation().isEmpty())
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.enableAll(); ol.enableAll();
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Man);
ol.writeString("\n\n"); ol.writeString("\n\n");
ol.popGeneratorState(); ol.popGeneratorState();
}
} }
// write detailed documentation // write detailed documentation
...@@ -539,6 +539,12 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) ...@@ -539,6 +539,12 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{ {
ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
} }
// write inbody documentation
if (!inbodyDocumentation().isEmpty())
{
ol.parseDoc(inbodyFile(),inbodyLine(),this,0,inbodyDocumentation()+"\n",TRUE,FALSE);
}
} }
} }
...@@ -729,7 +735,7 @@ void GroupDef::writePageDocumentation(OutputList &ol) ...@@ -729,7 +735,7 @@ void GroupDef::writePageDocumentation(OutputList &ol)
ol.endSection(si->label,SectionInfo::Subsection); ol.endSection(si->label,SectionInfo::Subsection);
} }
ol.startTextBlock(); ol.startTextBlock();
ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation(),TRUE,FALSE); ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE);
ol.endTextBlock(); ol.endTextBlock();
} }
} }
...@@ -822,9 +828,6 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -822,9 +828,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part ------------------------------- //---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli( QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Group)); LayoutDocManager::instance().docEntries(LayoutDocManager::Group));
LayoutDocEntry *lde; LayoutDocEntry *lde;
...@@ -930,78 +933,6 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -930,78 +933,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
} }
} }
#else
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
else
{
writeBriefDescription(ol);
}
writeGroupGraph(ol);
startMemberDeclarations(ol);
writeFiles(ol);
writeNamespaces(ol);
writeNestedGroups(ol);
writeDirs(ol);
writeClasses(ol);
writeMemberGroups(ol);
writeMemberDeclarations(ol,MemberList::decDefineMembers,theTranslator->trDefines());
writeMemberDeclarations(ol,MemberList::decTypedefMembers,theTranslator->trTypedefs());
writeMemberDeclarations(ol,MemberList::decEnumMembers,theTranslator->trEnumerations());
writeMemberDeclarations(ol,MemberList::decEnumValMembers,theTranslator->trEnumerationValues());
writeMemberDeclarations(ol,MemberList::decFuncMembers,
fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
theTranslator->trFunctions());
writeMemberDeclarations(ol,MemberList::decVarMembers,theTranslator->trVariables());
writeMemberDeclarations(ol,MemberList::decSignalMembers,theTranslator->trSignals());
writeMemberDeclarations(ol,MemberList::decPubSlotMembers,theTranslator->trPublicSlots());
writeMemberDeclarations(ol,MemberList::decProSlotMembers,theTranslator->trProtectedSlots());
writeMemberDeclarations(ol,MemberList::decPriSlotMembers,theTranslator->trPrivateSlots());
writeMemberDeclarations(ol,MemberList::decEventMembers,theTranslator->trEvents());
writeMemberDeclarations(ol,MemberList::decPropMembers,theTranslator->trProperties());
writeMemberDeclarations(ol,MemberList::decFriendMembers,theTranslator->trFriends());
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
startMemberDocumentation(ol);
writePageDocumentation(ol);
writeMemberDocumentation(ol,MemberList::docDefineMembers,theTranslator->trDefineDocumentation());
writeMemberDocumentation(ol,MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumValMembers,theTranslator->trEnumerationValueDocumentation());
writeMemberDocumentation(ol,MemberList::docFuncMembers,fortranOpt?theTranslator->trSubprogramDocumentation():theTranslator->trFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::docVarMembers,theTranslator->trVariableDocumentation());
writeMemberDocumentation(ol,MemberList::docSignalMembers,theTranslator->trSignals()); // todo: add trSignalDocumentation()
writeMemberDocumentation(ol,MemberList::docPubSlotMembers,theTranslator->trPublicSlots()); // todo: add trSlotDocumentation()
writeMemberDocumentation(ol,MemberList::docProSlotMembers,theTranslator->trProtectedSlots()); // todo: add trSlotDocumentation()
writeMemberDocumentation(ol,MemberList::docPriSlotMembers,theTranslator->trPrivateSlots()); // todo: add trSlotDocumentation()
writeMemberDocumentation(ol,MemberList::docEventMembers,theTranslator->trEvents()); // todo: add trEventDocumentation()
writeMemberDocumentation(ol,MemberList::docPropMembers,theTranslator->trProperties()); // todo: add trPropertyDocumentation()
writeMemberDocumentation(ol,MemberList::docFriendMembers,theTranslator->trFriends()); // todo: add trFriendDocumentation()
endMemberDocumentation(ol);
#endif
//---------------------------------------- end flexible part ------------------------------- //---------------------------------------- end flexible part -------------------------------
endFile(ol); endFile(ol);
......
...@@ -1081,7 +1081,7 @@ void HtmlGenerator::codify(const char *str) ...@@ -1081,7 +1081,7 @@ void HtmlGenerator::codify(const char *str)
{ {
case '\t': spacesToNextTabStop = case '\t': spacesToNextTabStop =
Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE")); Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
t << spaces.left(spacesToNextTabStop); t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop; col+=spacesToNextTabStop;
break; break;
case '\n': t << "\n"; col=0; case '\n': t << "\n"; col=0;
...@@ -1740,9 +1740,6 @@ static QCString fixSpaces(const QCString &s) ...@@ -1740,9 +1740,6 @@ static QCString fixSpaces(const QCString &s)
return substitute(s," ","&nbsp;"); return substitute(s," ","&nbsp;");
} }
#define NEW_LAYOUT
#ifdef NEW_LAYOUT
static bool quickLinkVisible(LayoutNavEntry::Kind kind) static bool quickLinkVisible(LayoutNavEntry::Kind kind)
{ {
switch (kind) switch (kind)
...@@ -1910,325 +1907,6 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact, ...@@ -1910,325 +1907,6 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,
} }
} }
#else // old fixed layout
static void writeNamespaceSubIndex(QTextStream &t,bool compact,
HighlightedItem hli,const QCString &relPath
)
{
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
startQuickIndexList(t,compact);
if (documentedNamespaces>0)
{
startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
hli==HLI_Namespaces,compact,relPath);
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
t << fixSpaces(theTranslator->trPackages());
}
else if(fortranOpt)
{
t << theTranslator->trModulesList();
}
else
{
t << theTranslator->trNamespaceList();
}
endQuickIndexItem(t);
}
if (documentedNamespaceMembers[NMHL_All]>0)
{
startQuickIndexItem(t,"namespacemembers"+Doxygen::htmlFileExtension,
hli==HLI_NamespaceMembers,compact,relPath);
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
t << fixSpaces(theTranslator->trPackageMembers());
}
else if(fortranOpt)
{
t << fixSpaces(theTranslator->trModulesMembers());
}
else
{
t << fixSpaces(theTranslator->trNamespaceMembers());
}
endQuickIndexItem(t);
}
endQuickIndexList(t,compact);
}
static void writeClassSubIndex(QTextStream &t,bool compact,
HighlightedItem hli,const QCString &relPath
)
{
bool fortranOpt=Config_getBool("OPTIMIZE_FOR_FORTRAN");
bool vhdlOpt=Config_getBool("OPTIMIZE_OUTPUT_VHDL");
startQuickIndexList(t,compact);
if (annotatedClasses>0)
{
if (Config_getBool("ALPHABETICAL_INDEX"))
{
startQuickIndexItem(t,"classes"+Doxygen::htmlFileExtension,
hli==HLI_Classes,compact,relPath);
t << fixSpaces(theTranslator->trAlphabeticalList());
endQuickIndexItem(t);
}
startQuickIndexItem(t,"annotated"+Doxygen::htmlFileExtension,
hli==HLI_Annotated,compact,relPath);
if (fortranOpt)
{
t << fixSpaces(theTranslator->trCompoundListFortran());
}
else if (vhdlOpt)
{
t << fixSpaces(VhdlDocGen::trDesignUnitList());
}
else
{
t << fixSpaces(theTranslator->trCompoundList());
}
endQuickIndexItem(t);
}
if (hierarchyClasses>0)
{
QCString title = theTranslator->trClassHierarchy();
if (vhdlOpt) title = VhdlDocGen::trDesignUnitHierarchy();
startQuickIndexItem(t,"hierarchy"+Doxygen::htmlFileExtension,
hli==HLI_Hierarchy,compact,relPath);
t << fixSpaces(title);
endQuickIndexItem(t);
}
if (documentedClassMembers[CMHL_All]>0)
{
startQuickIndexItem(t,"functions"+Doxygen::htmlFileExtension,
hli==HLI_Functions,compact,relPath);
if (fortranOpt)
{
t << fixSpaces(theTranslator->trCompoundMembersFortran());
}
else if (vhdlOpt)
{
t << fixSpaces(VhdlDocGen::trDesignUnitMembers());
}
else
{
t << fixSpaces(theTranslator->trCompoundMembers());
}
endQuickIndexItem(t);
}
endQuickIndexList(t,compact);
}
static void writeFileSubIndex(QTextStream &t,bool compact,
HighlightedItem hli,const QCString &relPath)
{
startQuickIndexList(t,compact);
if (documentedHtmlFiles>0)
{
startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
hli==HLI_Files,compact,relPath);
t << fixSpaces(theTranslator->trFileList());
endQuickIndexItem(t);
}
if (documentedFileMembers[FMHL_All]>0)
{
startQuickIndexItem(t,"globals"+Doxygen::htmlFileExtension,
hli==HLI_Globals,compact,relPath);
t << fixSpaces(theTranslator->trFileMembers());
endQuickIndexItem(t);
}
endQuickIndexList(t,compact);
}
static void writeDefaultQuickLinks(QTextStream &t,bool compact,
HighlightedItem hli,const QCString &relPath)
{
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
startQuickIndexList(t,compact);
if (usingTreeIndex())
{
startQuickIndexItem(t,"main"+Doxygen::htmlFileExtension,
hli==HLI_Main,compact,relPath);
}
else
{
startQuickIndexItem(t,"index"+Doxygen::htmlFileExtension,
hli==HLI_Main,compact,relPath);
}
t << fixSpaces(theTranslator->trMainPage());
endQuickIndexItem(t);
// -------------- Related pages
if (indexedPages>0)
{
startQuickIndexItem(t,"pages"+Doxygen::htmlFileExtension,
hli==HLI_Pages,compact,relPath);
t << fixSpaces(theTranslator->trRelatedPages());
endQuickIndexItem(t);
}
// --------------- Modules
if (documentedGroups>0)
{
startQuickIndexItem(t,"modules"+Doxygen::htmlFileExtension,
hli==HLI_Modules,compact,relPath);
t << fixSpaces(theTranslator->trModules());
endQuickIndexItem(t);
}
// --------------- Namespace indices
if (documentedNamespaces>0)
{
startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
hli==HLI_Namespaces || hli==HLI_NamespaceMembers || hli==HLI_NamespaceVisible,
compact,relPath);
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
t << fixSpaces(theTranslator->trPackages());
}
else if (fortranOpt)
{
t << theTranslator->trModules();
}
else
{
t << theTranslator->trNamespaces();
}
endQuickIndexItem(t);
if (!compact)
{
writeNamespaceSubIndex(t,compact,hli,relPath);
}
}
// -------------- Class indices
if (annotatedClasses>0)
{
static bool alphaIndex=Config_getBool("ALPHABETICAL_INDEX");
{
startQuickIndexItem(t,QCString(alphaIndex?"classes":"annotated")+Doxygen::htmlFileExtension,
hli==HLI_Hierarchy || hli==HLI_Classes ||
hli==HLI_Annotated || hli==HLI_Functions || hli==HLI_ClassVisible,
compact,relPath);
}
if (fortranOpt)
{
t << fixSpaces(theTranslator->trDataTypes());
}
else if (vhdlOpt)
{
t << fixSpaces(VhdlDocGen::trDesignUnits());
}
else
{
t << fixSpaces(theTranslator->trClasses());
}
endQuickIndexItem(t);
if (!compact)
{
writeClassSubIndex(t,compact,hli,relPath);
}
}
// -------------- File
if (documentedHtmlFiles>0)
{
startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
hli==HLI_Files || hli==HLI_Globals || hli==HLI_FileVisible,
compact,relPath);
t << fixSpaces(theTranslator->trFile(TRUE,FALSE));
endQuickIndexItem(t);
if (!compact)
{
writeFileSubIndex(t,compact,hli,relPath);
}
}
// -------------- Directories
if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
{
startQuickIndexItem(t,"dirs"+Doxygen::htmlFileExtension,
hli==HLI_Directories,compact,relPath);
t << fixSpaces(theTranslator->trDirectories());
endQuickIndexItem(t);
}
// -------------- Examples
if (Doxygen::exampleSDict->count()>0)
{
startQuickIndexItem(t,"examples"+Doxygen::htmlFileExtension,
hli==HLI_Examples,compact,relPath);
t << fixSpaces(theTranslator->trExamples());
endQuickIndexItem(t);
}
// -------------- Search field
if (Config_getBool("SEARCHENGINE"))
{
QCString searchFor = fixSpaces(theTranslator->trSearchForIndex());
if (searchFor.at(0)=='S') searchFor="<u>S</u>"+searchFor.mid(1);
t << " <li>\n";
t << " <form action=\"" << relPath << "search.php\" method=\"get\">\n";
t << " <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
t << " <tr>\n";
t << " <td><label>&nbsp;" << searchFor << "&nbsp;</label></td>\n";
if (hli!=HLI_Search)
{
t << " <td><input type=\"text\" name=\"query\" value=\"\" size=\"20\" accesskey=\"s\"/></td>\n";
t << " </tr>\n";
t << " </table>\n";
t << " </form>\n";
t << " </li>\n";
}
}
if (hli!=HLI_Search) // on the search page the page will be ended by the
// page itself
{
endQuickIndexList(t,compact);
}
//-------------------------------------------------------------------------
// write sub indices in compact mode
if ((hli==HLI_Namespaces || hli==HLI_NamespaceMembers ||
hli==HLI_NamespaceVisible
) &&
documentedNamespaces>0 &&
documentedNamespaceMembers[NMHL_All]>0)
{
writeNamespaceSubIndex(t,compact,hli,relPath);
}
else if ((hli==HLI_Hierarchy || hli==HLI_Classes ||
hli==HLI_Annotated || hli==HLI_Functions ||
hli==HLI_ClassVisible || !compact
) && annotatedClasses>0
)
{
writeClassSubIndex(t,compact,hli,relPath);
}
else if ((hli==HLI_Files || hli==HLI_Globals ||
hli==HLI_FileVisible || !compact
) && documentedHtmlFiles>0 && documentedFileMembers[FMHL_All]>0
)
{
writeFileSubIndex(t,compact,hli,relPath);
}
}
#endif
void HtmlGenerator::startQuickIndices() void HtmlGenerator::startQuickIndices()
{ {
if (!Config_getBool("DISABLE_INDEX")) if (!Config_getBool("DISABLE_INDEX"))
......
...@@ -1519,15 +1519,16 @@ void addClassMemberNameToIndex(MemberDef *md) ...@@ -1519,15 +1519,16 @@ void addClassMemberNameToIndex(MemberDef *md)
static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
ClassDef *cd=0; ClassDef *cd=0;
if (vhdlOpt && (VhdlDocGen::isRecord(md) || VhdlDocGen::isUnit(md)))
{
VhdlDocGen::adjustRecordMember(md);
}
if (md->isLinkableInProject() && if (md->isLinkableInProject() &&
(cd=md->getClassDef()) && (cd=md->getClassDef()) &&
cd->isLinkableInProject() && cd->isLinkableInProject() &&
cd->templateMaster()==0) cd->templateMaster()==0)
{ {
if (vhdlOpt && (VhdlDocGen::isRecord(md) || VhdlDocGen::isUnit(md)))
{
VhdlDocGen::adjustRecordMember(md);
}
QCString n = md->name(); QCString n = md->name();
int index = getPrefixIndex(n); int index = getPrefixIndex(n);
int letter = tolower(n.at(index)) & 0x7f; int letter = tolower(n.at(index)) & 0x7f;
......
...@@ -76,6 +76,8 @@ class IndexList : public IndexIntf ...@@ -76,6 +76,8 @@ class IndexList : public IndexIntf
IndexList() { m_intfs.setAutoDelete(TRUE); } IndexList() { m_intfs.setAutoDelete(TRUE); }
void addIndex(IndexIntf *intf) void addIndex(IndexIntf *intf)
{ m_intfs.append(intf); } { m_intfs.append(intf); }
// IndexIntf implementation
void initialize() void initialize()
{ foreach(&IndexIntf::initialize); } { foreach(&IndexIntf::initialize); }
void finalize() void finalize()
......
...@@ -1321,7 +1321,7 @@ void LatexGenerator::codify(const char *str) ...@@ -1321,7 +1321,7 @@ void LatexGenerator::codify(const char *str)
case 0x0c: break; // remove ^L case 0x0c: break; // remove ^L
case '\t': spacesToNextTabStop = case '\t': spacesToNextTabStop =
tabSize - (col%tabSize); tabSize - (col%tabSize);
t << spaces.left(spacesToNextTabStop); t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop; col+=spacesToNextTabStop;
break; break;
case '\n': t << '\n'; col=0; break; case '\n': t << '\n'; col=0; break;
......
...@@ -464,6 +464,8 @@ class LayoutParser : public QXmlDefaultHandler ...@@ -464,6 +464,8 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandlerKind(this,LayoutDocEntry::FileIncludedByGraph,&LayoutParser::startSimpleEntry)); new StartElementHandlerKind(this,LayoutDocEntry::FileIncludedByGraph,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/sourcelink", m_sHandler.insert("file/sourcelink",
new StartElementHandlerKind(this,LayoutDocEntry::FileSourceLink,&LayoutParser::startSimpleEntry)); new StartElementHandlerKind(this,LayoutDocEntry::FileSourceLink,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/memberdecl", m_sHandler.insert("file/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl)); new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("file/memberdecl/classes", m_sHandler.insert("file/memberdecl/classes",
...@@ -533,6 +535,8 @@ class LayoutParser : public QXmlDefaultHandler ...@@ -533,6 +535,8 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry)); new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/groupgraph", m_sHandler.insert("group/groupgraph",
new StartElementHandlerKind(this,LayoutDocEntry::GroupGraph,&LayoutParser::startSimpleEntry)); new StartElementHandlerKind(this,LayoutDocEntry::GroupGraph,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/memberdecl", m_sHandler.insert("group/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl)); new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("group/memberdecl/classes", m_sHandler.insert("group/memberdecl/classes",
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
" <collaborationgraph visible=\"$COLLABORATION_GRAPH\"/>\n" " <collaborationgraph visible=\"$COLLABORATION_GRAPH\"/>\n"
" <allmemberslink visible=\"yes\"/>\n" " <allmemberslink visible=\"yes\"/>\n"
" <memberdecl>\n" " <memberdecl>\n"
" <membergroups visible=\"yes\"/>\n"
" <nestedclasses visible=\"yes\" title=\"\"/>\n" " <nestedclasses visible=\"yes\" title=\"\"/>\n"
" <publictypes title=\"\"/>\n" " <publictypes title=\"\"/>\n"
" <publicslots title=\"\"/>\n" " <publicslots title=\"\"/>\n"
...@@ -60,6 +59,7 @@ ...@@ -60,6 +59,7 @@
" <privatestaticattributes title=\"\"/>\n" " <privatestaticattributes title=\"\"/>\n"
" <friends title=\"\"/>\n" " <friends title=\"\"/>\n"
" <related title=\"\" subtitle=\"\"/>\n" " <related title=\"\" subtitle=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n" " </memberdecl>\n"
" <detaileddescription title=\"\"/>\n" " <detaileddescription title=\"\"/>\n"
" <memberdef>\n" " <memberdef>\n"
...@@ -82,11 +82,11 @@ ...@@ -82,11 +82,11 @@
" <memberdecl>\n" " <memberdecl>\n"
" <nestednamespaces visible=\"yes\" title=\"\"/>\n" " <nestednamespaces visible=\"yes\" title=\"\"/>\n"
" <classes visible=\"yes\" title=\"\"/>\n" " <classes visible=\"yes\" title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" <typedefs title=\"\"/>\n" " <typedefs title=\"\"/>\n"
" <enums title=\"\"/>\n" " <enums title=\"\"/>\n"
" <functions title=\"\"/>\n" " <functions title=\"\"/>\n"
" <variables title=\"\"/>\n" " <variables title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n" " </memberdecl>\n"
" <detaileddescription title=\"\"/>\n" " <detaileddescription title=\"\"/>\n"
" <memberdef>\n" " <memberdef>\n"
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
" <enums title=\"\"/>\n" " <enums title=\"\"/>\n"
" <functions title=\"\"/>\n" " <functions title=\"\"/>\n"
" <variables title=\"\"/>\n" " <variables title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n" " </memberdecl>\n"
" <detaileddescription title=\"\"/>\n" " <detaileddescription title=\"\"/>\n"
" <memberdef>\n" " <memberdef>\n"
...@@ -148,6 +149,7 @@ ...@@ -148,6 +149,7 @@
" <events title=\"\"/>\n" " <events title=\"\"/>\n"
" <properties title=\"\"/>\n" " <properties title=\"\"/>\n"
" <friends title=\"\"/>\n" " <friends title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n" " </memberdecl>\n"
" <detaileddescription title=\"\"/>\n" " <detaileddescription title=\"\"/>\n"
" <memberdef>\n" " <memberdef>\n"
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
<collaborationgraph visible="$COLLABORATION_GRAPH"/> <collaborationgraph visible="$COLLABORATION_GRAPH"/>
<allmemberslink visible="yes"/> <allmemberslink visible="yes"/>
<memberdecl> <memberdecl>
<membergroups visible="yes"/>
<nestedclasses visible="yes" title=""/> <nestedclasses visible="yes" title=""/>
<publictypes title=""/> <publictypes title=""/>
<publicslots title=""/> <publicslots title=""/>
...@@ -60,6 +59,7 @@ ...@@ -60,6 +59,7 @@
<privatestaticattributes title=""/> <privatestaticattributes title=""/>
<friends title=""/> <friends title=""/>
<related title="" subtitle=""/> <related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl> </memberdecl>
<detaileddescription title=""/> <detaileddescription title=""/>
<memberdef> <memberdef>
...@@ -82,11 +82,11 @@ ...@@ -82,11 +82,11 @@
<memberdecl> <memberdecl>
<nestednamespaces visible="yes" title=""/> <nestednamespaces visible="yes" title=""/>
<classes visible="yes" title=""/> <classes visible="yes" title=""/>
<membergroups visible="yes"/>
<typedefs title=""/> <typedefs title=""/>
<enums title=""/> <enums title=""/>
<functions title=""/> <functions title=""/>
<variables title=""/> <variables title=""/>
<membergroups visible="yes"/>
</memberdecl> </memberdecl>
<detaileddescription title=""/> <detaileddescription title=""/>
<memberdef> <memberdef>
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
<enums title=""/> <enums title=""/>
<functions title=""/> <functions title=""/>
<variables title=""/> <variables title=""/>
<membergroups visible="yes"/>
</memberdecl> </memberdecl>
<detaileddescription title=""/> <detaileddescription title=""/>
<memberdef> <memberdef>
...@@ -148,6 +149,7 @@ ...@@ -148,6 +149,7 @@
<events title=""/> <events title=""/>
<properties title=""/> <properties title=""/>
<friends title=""/> <friends title=""/>
<membergroups visible="yes"/>
</memberdecl> </memberdecl>
<detaileddescription title=""/> <detaileddescription title=""/>
<memberdef> <memberdef>
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
int main(int argc,char **argv) int main(int argc,char **argv)
{ {
initDoxygen(); initDoxygen();
readConfiguration(argc,argv); readConfiguration(argc,argv);
checkConfiguration(); checkConfiguration();
adjustConfiguration();
parseInput(); parseInput();
generateOutput(); generateOutput();
return 0; return 0;
......
...@@ -304,7 +304,7 @@ void ManGenerator::codify(const char *str) ...@@ -304,7 +304,7 @@ void ManGenerator::codify(const char *str)
{ {
case '\t': spacesToNextTabStop = case '\t': spacesToNextTabStop =
Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE")); Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
t << spaces.left(spacesToNextTabStop); t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop; col+=spacesToNextTabStop;
break; break;
case '\n': t << "\n"; firstCol=TRUE; col=0; break; case '\n': t << "\n"; firstCol=TRUE; col=0; break;
......
...@@ -296,6 +296,27 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al) ...@@ -296,6 +296,27 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al)
ol.docify("> "); ol.docify("> ");
} }
QCString extractDirection(QCString &docs)
{
QRegExp re("\\[[^\\]]+\\]"); // [...]
int l=0;
if (re.match(docs,0,&l)==0)
{
int inPos = docs.find("in", 1,FALSE);
int outPos = docs.find("out",1,FALSE);
bool input = inPos!=-1 && inPos<l;
bool output = outPos!=-1 && outPos<l;
if (input || output) // in,out attributes
{
docs = docs.mid(l); // strip attributes
if (input && output) return "[in,out]";
else if (input) return "[in]";
else if (output) return "[out]";
}
}
return QCString();
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -380,9 +401,9 @@ class MemberDefImpl ...@@ -380,9 +401,9 @@ class MemberDefImpl
QCString cachedResolvedType; QCString cachedResolvedType;
// inbody documentation // inbody documentation
int inbodyLine; //int inbodyLine;
QCString inbodyFile; //QCString inbodyFile;
QCString inbodyDocs; //QCString inbodyDocs;
// documentation inheritance // documentation inheritance
MemberDef *docProvider; MemberDef *docProvider;
...@@ -547,7 +568,7 @@ void MemberDefImpl::init(Definition *def, ...@@ -547,7 +568,7 @@ void MemberDefImpl::init(Definition *def,
docsForDefinition = TRUE; docsForDefinition = TRUE;
isTypedefValCached = FALSE; isTypedefValCached = FALSE;
cachedTypedefValue = 0; cachedTypedefValue = 0;
inbodyLine = -1; //inbodyLine = -1;
implOnly=FALSE; implOnly=FALSE;
groupMember = 0; groupMember = 0;
hasDocumentedParams = FALSE; hasDocumentedParams = FALSE;
...@@ -828,7 +849,9 @@ bool MemberDef::isLinkableInProject() const ...@@ -828,7 +849,9 @@ bool MemberDef::isLinkableInProject() const
//printf("in a namespace but namespace not linkable!\n"); //printf("in a namespace but namespace not linkable!\n");
return FALSE; // in namespace but namespace not linkable return FALSE; // in namespace but namespace not linkable
} }
if (!m_impl->group && !m_impl->nspace && !m_impl->related && !m_impl->classDef && m_impl->fileDef && !m_impl->fileDef->isLinkableInProject()) if (!m_impl->group && !m_impl->nspace &&
!m_impl->related && !m_impl->classDef &&
m_impl->fileDef && !m_impl->fileDef->isLinkableInProject())
{ {
//printf("in a file but file not linkable!\n"); //printf("in a file but file not linkable!\n");
return FALSE; // in file (and not in namespace) but file not linkable return FALSE; // in file (and not in namespace) but file not linkable
...@@ -1548,7 +1571,8 @@ bool MemberDef::isDetailedSectionLinkable() const ...@@ -1548,7 +1571,8 @@ bool MemberDef::isDetailedSectionLinkable() const
bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
{ {
bool groupFilter = getGroupDef()==0 || inGroup; static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES");
bool groupFilter = getGroupDef()==0 || inGroup || separateMemPages;
bool fileFilter = getNamespaceDef()==0 || !inFile; bool fileFilter = getNamespaceDef()==0 || !inFile;
bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter && bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter &&
...@@ -1950,22 +1974,23 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1950,22 +1974,23 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
/* write detailed description */ /* write detailed description */
if (!detailed.isEmpty() || !m_impl->inbodyDocs.isEmpty()) if (!detailed.isEmpty() ||
!inbodyDocumentation().isEmpty())
{ {
ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE); ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE);
if (!m_impl->inbodyDocs.isEmpty()) if (!inbodyDocumentation().isEmpty())
{ {
ol.newParagraph(); ol.newParagraph();
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_impl->inbodyDocs+"\n",TRUE,FALSE); ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE);
} }
} }
else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") || else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
!Config_getBool("BRIEF_MEMBER_DESC"))) !Config_getBool("BRIEF_MEMBER_DESC")))
{ {
if (!m_impl->inbodyDocs.isEmpty()) if (!inbodyDocumentation().isEmpty())
{ {
ol.newParagraph(); ol.newParagraph();
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_impl->inbodyDocs+"\n",TRUE,FALSE); ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE);
} }
} }
...@@ -1975,6 +2000,29 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1975,6 +2000,29 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// defArgList?defArgList->hasDocumentation():-1); // defArgList?defArgList->hasDocumentation():-1);
if (docArgList!=0 && docArgList->hasDocumentation()) if (docArgList!=0 && docArgList->hasDocumentation())
{ {
QCString paramDocs;
ArgumentListIterator ali(*docArgList);
Argument *a;
// convert the parameter documentation into a list of @param commands
for (ali.toFirst();(a=ali.current());++ali)
{
if (a->hasDocumentation())
{
QCString direction = extractDirection(a->docs);
paramDocs+="@param"+direction+" "+a->name+" "+a->docs;
}
}
// feed the result to the documentation parser
ol.parseDoc(
docFile(),docLine(),
getOuterScope()?getOuterScope():container,
this, // memberDef
paramDocs, // docStr
TRUE, // indexWords
FALSE // isExample
);
#if 0 // old, now obsolete way to add parameter documentation
//printf("***** argumentList is documented\n"); //printf("***** argumentList is documented\n");
ol.startParamList(BaseOutputDocInterface::Param,theTranslator->trParameters()+": "); ol.startParamList(BaseOutputDocInterface::Param,theTranslator->trParameters()+": ");
ol.writeDescItem(); ol.writeDescItem();
...@@ -1988,6 +2036,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1988,6 +2036,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startDescTableTitle(); ol.startDescTableTitle();
ol.docify(a->name); ol.docify(a->name);
ol.endDescTableTitle(); ol.endDescTableTitle();
QCString doc = a->docs+"\n";
ol.startDescTableData(); ol.startDescTableData();
ol.parseDoc(docFile(),docLine(), ol.parseDoc(docFile(),docLine(),
getOuterScope()?getOuterScope():container, getOuterScope()?getOuterScope():container,
...@@ -2001,6 +2050,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -2001,6 +2050,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
ol.endDescTable(); ol.endDescTable();
ol.endParamList(); ol.endParamList();
#endif
} }
// For enum, we also write the documented enum values // For enum, we also write the documented enum values
...@@ -2013,6 +2063,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -2013,6 +2063,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
MemberDef *fmd=fmdl->first(); MemberDef *fmd=fmdl->first();
while (fmd) while (fmd)
{ {
//printf("Enum: isLinkable()=%d\n",fmd->isLinkable());
if (fmd->isLinkable()) if (fmd->isLinkable())
{ {
if (first) if (first)
...@@ -2237,7 +2288,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -2237,7 +2288,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write call graph // write call graph
if ((m_impl->hasCallGraph || Config_getBool("CALL_GRAPH")) if ((m_impl->hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT") && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
) )
{ {
DotCallGraph callGraph(this,FALSE); DotCallGraph callGraph(this,FALSE);
...@@ -2253,7 +2304,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -2253,7 +2304,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
} }
if ((m_impl->hasCallerGraph || Config_getBool("CALLER_GRAPH")) if ((m_impl->hasCallerGraph || Config_getBool("CALLER_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT") && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
) )
{ {
DotCallGraph callerGraph(this, TRUE); DotCallGraph callerGraph(this, TRUE);
...@@ -2390,17 +2441,17 @@ bool MemberDef::hasDocumentation() const ...@@ -2390,17 +2441,17 @@ bool MemberDef::hasDocumentation() const
{ {
makeResident(); makeResident();
return Definition::hasDocumentation() || return Definition::hasDocumentation() ||
!m_impl->inbodyDocs.isEmpty() ||
(m_impl->mtype==Enumeration && m_impl->docEnumValues) || // has enum values (m_impl->mtype==Enumeration && m_impl->docEnumValues) || // has enum values
(m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments (m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments
} }
#if 0
bool MemberDef::hasUserDocumentation() const bool MemberDef::hasUserDocumentation() const
{ {
bool hasDocs = Definition::hasUserDocumentation() || bool hasDocs = Definition::hasUserDocumentation();
(m_impl->inbodyDocs && !m_impl->inbodyDocs.isEmpty());
return hasDocs; return hasDocs;
} }
#endif
void MemberDef::setMemberGroup(MemberGroup *grp) void MemberDef::setMemberGroup(MemberGroup *grp)
...@@ -2929,6 +2980,7 @@ bool MemberDef::protectionVisible() const ...@@ -2929,6 +2980,7 @@ bool MemberDef::protectionVisible() const
(m_impl->prot==Package && Config_getBool("EXTRACT_PACKAGE")); (m_impl->prot==Package && Config_getBool("EXTRACT_PACKAGE"));
} }
#if 0
void MemberDef::setInbodyDocumentation(const char *docs, void MemberDef::setInbodyDocumentation(const char *docs,
const char *docFile,int docLine) const char *docFile,int docLine)
{ {
...@@ -2938,6 +2990,7 @@ void MemberDef::setInbodyDocumentation(const char *docs, ...@@ -2938,6 +2990,7 @@ void MemberDef::setInbodyDocumentation(const char *docs,
m_impl->inbodyLine = docLine; m_impl->inbodyLine = docLine;
m_impl->inbodyFile = docFile; m_impl->inbodyFile = docFile;
} }
#endif
bool MemberDef::isObjCMethod() const bool MemberDef::isObjCMethod() const
{ {
...@@ -3380,6 +3433,7 @@ bool MemberDef::hasDocumentedReturnType() const ...@@ -3380,6 +3433,7 @@ bool MemberDef::hasDocumentedReturnType() const
return m_impl->hasDocumentedReturnType; return m_impl->hasDocumentedReturnType;
} }
#if 0
int MemberDef::inbodyLine() const int MemberDef::inbodyLine() const
{ {
makeResident(); makeResident();
...@@ -3397,6 +3451,7 @@ const QCString &MemberDef::inbodyDocumentation() const ...@@ -3397,6 +3451,7 @@ const QCString &MemberDef::inbodyDocumentation() const
makeResident(); makeResident();
return m_impl->inbodyDocs; return m_impl->inbodyDocs;
} }
#endif
ClassDef *MemberDef::relatedAlso() const ClassDef *MemberDef::relatedAlso() const
{ {
...@@ -3842,9 +3897,6 @@ void MemberDef::flushToDisk() const ...@@ -3842,9 +3897,6 @@ void MemberDef::flushToDisk() const
marshalObjPointer (Doxygen::symbolStorage,m_impl->cachedTypedefValue); marshalObjPointer (Doxygen::symbolStorage,m_impl->cachedTypedefValue);
marshalQCString (Doxygen::symbolStorage,m_impl->cachedTypedefTemplSpec); marshalQCString (Doxygen::symbolStorage,m_impl->cachedTypedefTemplSpec);
marshalQCString (Doxygen::symbolStorage,m_impl->cachedResolvedType); marshalQCString (Doxygen::symbolStorage,m_impl->cachedResolvedType);
marshalInt (Doxygen::symbolStorage,m_impl->inbodyLine);
marshalQCString (Doxygen::symbolStorage,m_impl->inbodyFile);
marshalQCString (Doxygen::symbolStorage,m_impl->inbodyDocs);
marshalObjPointer (Doxygen::symbolStorage,m_impl->docProvider); marshalObjPointer (Doxygen::symbolStorage,m_impl->docProvider);
marshalQCString (Doxygen::symbolStorage,m_impl->explicitOutputFileBase); marshalQCString (Doxygen::symbolStorage,m_impl->explicitOutputFileBase);
marshalBool (Doxygen::symbolStorage,m_impl->implOnly); marshalBool (Doxygen::symbolStorage,m_impl->implOnly);
...@@ -3942,9 +3994,6 @@ void MemberDef::loadFromDisk() const ...@@ -3942,9 +3994,6 @@ void MemberDef::loadFromDisk() const
m_impl->cachedTypedefValue = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage); m_impl->cachedTypedefValue = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->cachedTypedefTemplSpec = unmarshalQCString (Doxygen::symbolStorage); m_impl->cachedTypedefTemplSpec = unmarshalQCString (Doxygen::symbolStorage);
m_impl->cachedResolvedType = unmarshalQCString (Doxygen::symbolStorage); m_impl->cachedResolvedType = unmarshalQCString (Doxygen::symbolStorage);
m_impl->inbodyLine = unmarshalInt (Doxygen::symbolStorage);
m_impl->inbodyFile = unmarshalQCString (Doxygen::symbolStorage);
m_impl->inbodyDocs = unmarshalQCString (Doxygen::symbolStorage);
m_impl->docProvider = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage); m_impl->docProvider = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->explicitOutputFileBase = unmarshalQCString (Doxygen::symbolStorage); m_impl->explicitOutputFileBase = unmarshalQCString (Doxygen::symbolStorage);
m_impl->implOnly = unmarshalBool (Doxygen::symbolStorage); m_impl->implOnly = unmarshalBool (Doxygen::symbolStorage);
...@@ -3969,6 +4018,7 @@ void MemberDef::loadFromDisk() const ...@@ -3969,6 +4018,7 @@ void MemberDef::loadFromDisk() const
void MemberDef::makeResident() const void MemberDef::makeResident() const
{ {
if (Doxygen::symbolCache==0) return;
if (m_cacheHandle==-1) // not yet in cache if (m_cacheHandle==-1) // not yet in cache
{ {
MemberDef *victim = 0; MemberDef *victim = 0;
......
...@@ -172,7 +172,7 @@ class MemberDef : public Definition ...@@ -172,7 +172,7 @@ class MemberDef : public Definition
bool isLinkableInProject() const; bool isLinkableInProject() const;
bool isLinkable() const; bool isLinkable() const;
bool hasDocumentation() const; // overrides hasDocumentation in definition.h bool hasDocumentation() const; // overrides hasDocumentation in definition.h
bool hasUserDocumentation() const; // overrides hasUserDocumentation //bool hasUserDocumentation() const; // overrides hasUserDocumentation
bool isBriefSectionVisible() const; bool isBriefSectionVisible() const;
bool isDetailedSectionVisible(bool inGroup,bool inFile) const; bool isDetailedSectionVisible(bool inGroup,bool inFile) const;
bool isDetailedSectionLinkable() const; bool isDetailedSectionLinkable() const;
...@@ -182,9 +182,9 @@ class MemberDef : public Definition ...@@ -182,9 +182,9 @@ class MemberDef : public Definition
MemberDef *reimplements() const; MemberDef *reimplements() const;
LockingPtr<MemberList> reimplementedBy() const; LockingPtr<MemberList> reimplementedBy() const;
int inbodyLine() const; //int inbodyLine() const;
QCString inbodyFile() const; //QCString inbodyFile() const;
const QCString &inbodyDocumentation() const; //const QCString &inbodyDocumentation() const;
ClassDef *relatedAlso() const; ClassDef *relatedAlso() const;
...@@ -269,7 +269,7 @@ class MemberDef : public Definition ...@@ -269,7 +269,7 @@ class MemberDef : public Definition
void insertReimplementedBy(MemberDef *md); void insertReimplementedBy(MemberDef *md);
// in-body documentation // in-body documentation
void setInbodyDocumentation(const char *docs,const char *file,int line); //void setInbodyDocumentation(const char *docs,const char *file,int line);
void setRelatedAlso(ClassDef *cd); void setRelatedAlso(ClassDef *cd);
......
...@@ -217,7 +217,6 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -217,7 +217,6 @@ void MemberList::writePlainDeclarations(OutputList &ol,
} }
case MemberDef::Enumeration: case MemberDef::Enumeration:
{ {
if (first) ol.startMemberList(),first=FALSE;
int enumVars=0; int enumVars=0;
MemberListIterator vmli(*this); MemberListIterator vmli(*this);
MemberDef *vmd; MemberDef *vmd;
...@@ -240,6 +239,8 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -240,6 +239,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
// enum type (i.e. enumVars>0), then we do not show the enum here. // enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here if (enumVars==0) // show enum here
{ {
//printf("Enum!!\n");
if (first) ol.startMemberList(),first=FALSE;
ol.startMemberItem(0); ol.startMemberItem(0);
ol.writeString("enum "); ol.writeString("enum ");
ol.insertMemberAlign(); ol.insertMemberAlign();
...@@ -279,6 +280,8 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -279,6 +280,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
} }
case MemberDef::EnumValue: case MemberDef::EnumValue:
{ {
if (!m_inGroup) return;
printf("EnumValue!\n");
if (first) ol.startMemberList(),first=FALSE; if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
} }
...@@ -360,7 +363,6 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -360,7 +363,6 @@ void MemberList::writeDeclarations(OutputList &ol,
writePlainDeclarations(ol,cd,nd,fd,gd); writePlainDeclarations(ol,cd,nd,fd,gd);
} }
//printf("memberGroupList=%p\n",memberGroupList); //printf("memberGroupList=%p\n",memberGroupList);
if (memberGroupList) if (memberGroupList)
{ {
......
...@@ -414,9 +414,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -414,9 +414,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part ------------------------------- //---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli( QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace)); LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace));
LayoutDocEntry *lde; LayoutDocEntry *lde;
...@@ -503,59 +500,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -503,59 +500,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
} }
} }
#else // old fixed layout
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
//ol.startTextBlock();
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeBriefDescription(ol);
}
//ol.endTextBlock();
startMemberDeclarations(ol);
writeClassDeclarations(ol);
writeNamespaceDeclarations(ol);
writeMemberGroups(ol);
writeMemberDeclarations(ol,MemberList::decDefineMembers,theTranslator->trDefines());
writeMemberDeclarations(ol,MemberList::decTypedefMembers,theTranslator->trTypedefs());
writeMemberDeclarations(ol,MemberList::decEnumMembers,theTranslator->trEnumerations());
writeMemberDeclarations(ol,MemberList::decFuncMembers,
fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
theTranslator->trFunctions());
writeMemberDeclarations(ol,MemberList::decVarMembers,theTranslator->trVariables());
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
startMemberDocumentation(ol);
writeMemberDocumentation(ol,MemberList::docDefineMembers,theTranslator->trDefineDocumentation());
writeMemberDocumentation(ol,MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
writeMemberDocumentation(ol,MemberList::docFuncMembers,fortranOpt?theTranslator->trSubprogramDocumentation():theTranslator->trFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::docVarMembers,theTranslator->trVariableDocumentation());
endMemberDocumentation(ol);
writeAuthorSection(ol);
#endif
//---------------------------------------- end flexible part ------------------------------- //---------------------------------------- end flexible part -------------------------------
endFile(ol); endFile(ol);
......
...@@ -167,7 +167,7 @@ void PageDef::writePageDocumentation(OutputList &ol) ...@@ -167,7 +167,7 @@ void PageDef::writePageDocumentation(OutputList &ol)
docLine(), // startLine docLine(), // startLine
this, // context this, // context
0, // memberdef 0, // memberdef
documentation(), // docStr documentation()+inbodyDocumentation(), // docStr
TRUE, // index words TRUE, // index words
FALSE // not an example FALSE // not an example
); );
......
...@@ -2005,7 +2005,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2005,7 +2005,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCComment,SkipVerbatim>. { <SkipCComment,SkipVerbatim>. {
outputChar(*yytext); outputChar(*yytext);
} }
<CopyCComment>[^*a-z_A-Z]+ { <CopyCComment>[^*a-z_A-Z\n]+ {
g_defLitText+=yytext; g_defLitText+=yytext;
g_defText+=escapeAt(yytext); g_defText+=escapeAt(yytext);
} }
...@@ -2017,7 +2017,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2017,7 +2017,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<CopyCComment>\n { <CopyCComment>\n {
g_yyLineNr++; g_yyLineNr++;
g_defLitText+=yytext; g_defLitText+=yytext;
g_defText+=yytext; g_defText+=' ';
} }
<RemoveCComment>"*/" { BEGIN(g_lastCContext); } <RemoveCComment>"*/" { BEGIN(g_lastCContext); }
<RemoveCComment>"//" <RemoveCComment>"//"
......
...@@ -1754,7 +1754,7 @@ void RTFGenerator::codify(const char *str) ...@@ -1754,7 +1754,7 @@ void RTFGenerator::codify(const char *str)
switch(c) switch(c)
{ {
case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE")); case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
t << spaces.left(spacesToNextTabStop); t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop; col+=spacesToNextTabStop;
break; break;
case '\n': newParagraph(); case '\n': newParagraph();
......
...@@ -2509,7 +2509,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -2509,7 +2509,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
*pCopyRoundGString+=yytext; *pCopyRoundGString+=yytext;
} }
} }
<GCopyRound>[^"'()\n]+ { <GCopyRound>[^"'()\n/]+ {
*pCopyRoundGString+=yytext; *pCopyRoundGString+=yytext;
} }
<GCopyRound>. { <GCopyRound>. {
...@@ -4323,10 +4323,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4323,10 +4323,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->spec |= Entry::Template; current->spec |= Entry::Template;
current->tArgLists->append(al); current->tArgLists->append(al);
currentArgumentList = al; currentArgumentList = al;
//current->name+="<";
templateStr="<"; templateStr="<";
current->name += "<";
fullArgString = templateStr; fullArgString = templateStr;
copyArgString = &current->args; copyArgString = &current->name;
currentArgumentContext = ClassVar; currentArgumentContext = ClassVar;
BEGIN( ReadTempArgs ); BEGIN( ReadTempArgs );
} }
...@@ -4880,12 +4880,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4880,12 +4880,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
//printf("Start doc block at %d\n",yyLineNr); //printf("Start doc block at %d\n",yyLineNr);
removeSlashes=(yytext[1]=='/'); removeSlashes=(yytext[1]=='/');
tmpDocType=-1; tmpDocType=-1;
#if 0
if (YY_START!=SkipCurly)
{
current->doc.resize(0);
}
#endif
if (!current->doc.isEmpty()) if (!current->doc.isEmpty())
{ {
current->doc+="\n\n"; current->doc+="\n\n";
...@@ -4895,16 +4889,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4895,16 +4889,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->docLine = yyLineNr; current->docLine = yyLineNr;
current->docFile = yyFileName; current->docFile = yyFileName;
} }
//
lastDocContext = YY_START; lastDocContext = YY_START;
if (current_root->section & Entry::SCOPE_MASK) if (current_root->section & Entry::SCOPE_MASK)
{ {
current->inside = current_root->name+"::"; current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
} }
docBlockContext = YY_START; docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly; docBlockInBody = YY_START==SkipCurly;
...@@ -4915,16 +4904,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4915,16 +4904,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->briefLine = yyLineNr; current->briefLine = yyLineNr;
current->briefFile = yyFileName; current->briefFile = yyFileName;
} }
#if 0
if (!docBlockInBody)
{
current->doc.resize(0);
if (docBlockAutoBrief)
{
current->brief.resize(0);
}
}
#endif
startCommentBlock(FALSE); startCommentBlock(FALSE);
BEGIN( DocBlock ); BEGIN( DocBlock );
} }
...@@ -4936,10 +4915,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4936,10 +4915,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
if (current_root->section & Entry::SCOPE_MASK) if (current_root->section & Entry::SCOPE_MASK)
{ {
current->inside = current_root->name+"::"; current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
} }
current->docLine = yyLineNr; current->docLine = yyLineNr;
current->docFile = yyFileName; current->docFile = yyFileName;
...@@ -4952,37 +4927,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4952,37 +4927,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->briefLine = yyLineNr; current->briefLine = yyLineNr;
current->briefFile = yyFileName; current->briefFile = yyFileName;
} }
#if 0
if (!docBlockInBody)
{
current->doc.resize(0);
if (docBlockAutoBrief)
{
current->brief.resize(0);
}
}
#endif
startCommentBlock(FALSE); startCommentBlock(FALSE);
BEGIN( DocBlock ); BEGIN( DocBlock );
} }
<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"//!" { <FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"//!" {
#if 0
if (YY_START!=SkipCurly)
{
current->brief.resize(0);
current->briefFile=yyFileName;
current->briefLine=yyLineNr;
}
#endif
tmpDocType=-1; tmpDocType=-1;
lastDocContext = YY_START; lastDocContext = YY_START;
if (current_root->section & Entry::SCOPE_MASK) if (current_root->section & Entry::SCOPE_MASK)
{ {
current->inside = current_root->name+"::"; current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
} }
docBlockContext = YY_START; docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly; docBlockInBody = YY_START==SkipCurly;
...@@ -4992,23 +4945,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4992,23 +4945,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
BEGIN( DocLine ); BEGIN( DocLine );
} }
<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"///"/[^/] { <FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"///"/[^/] {
#if 0
if (YY_START!=SkipCurly)
{
current->brief.resize(0);
current->briefFile=yyFileName;
current->briefLine=yyLineNr;
}
#endif
tmpDocType=-1; tmpDocType=-1;
lastDocContext = YY_START; lastDocContext = YY_START;
if (current_root->section & Entry::SCOPE_MASK) if (current_root->section & Entry::SCOPE_MASK)
{ {
current->inside = current_root->name+"::"; current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
} }
docBlockContext = YY_START; docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly; docBlockInBody = YY_START==SkipCurly;
......
...@@ -393,6 +393,7 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName, ...@@ -393,6 +393,7 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
{ {
MemberNameIterator mni(*mn); MemberNameIterator mni(*mn);
MemberDef *tmd=0; MemberDef *tmd=0;
int minDist=-1;
for (;(tmd=mni.current());++mni) for (;(tmd=mni.current());++mni)
{ {
//printf("Found member %s resScope=%s outerScope=%s mContext=%p\n", //printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
...@@ -400,12 +401,11 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName, ...@@ -400,12 +401,11 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
// tmd->getOuterScope()->name().data(), mContext); // tmd->getOuterScope()->name().data(), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/) if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
{ {
// look if resScope is visible within tmd->getOuterScope() int dist=isAccessibleFrom(resScope,0,tmd);
Definition *d = tmd->getOuterScope(); if (dist!=-1 && (md==0 || dist<minDist))
while (d && d!=resScope) d=d->getOuterScope();
if (d)
{ {
md=tmd; md = tmd;
minDist = dist;
} }
} }
} }
...@@ -771,6 +771,7 @@ bool accessibleViaUsingClass(const SDict<Definition> *cl, ...@@ -771,6 +771,7 @@ bool accessibleViaUsingClass(const SDict<Definition> *cl,
const QCString &explicitScopePart="" const QCString &explicitScopePart=""
) )
{ {
//printf("accessibleViaUsingClass(%p)\n",cl);
if (cl) // see if the class was imported via a using statement if (cl) // see if the class was imported via a using statement
{ {
SDict<Definition>::Iterator cli(*cl); SDict<Definition>::Iterator cli(*cl);
...@@ -2110,6 +2111,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t ...@@ -2110,6 +2111,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t
QCString transcodeCharacterStringToUTF8(const QCString &input) QCString transcodeCharacterStringToUTF8(const QCString &input)
{ {
bool error=FALSE;
static QCString inputEncoding = Config_getString("INPUT_ENCODING"); static QCString inputEncoding = Config_getString("INPUT_ENCODING");
const char *outputEncoding = "UTF-8"; const char *outputEncoding = "UTF-8";
if (inputEncoding.isEmpty() || qstricmp(inputEncoding,outputEncoding)==0) return input; if (inputEncoding.isEmpty() || qstricmp(inputEncoding,outputEncoding)==0) return input;
...@@ -2121,27 +2123,30 @@ QCString transcodeCharacterStringToUTF8(const QCString &input) ...@@ -2121,27 +2123,30 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
{ {
err("Error: unsupported character conversion: '%s'->'%s'\n", err("Error: unsupported character conversion: '%s'->'%s'\n",
inputEncoding.data(),outputEncoding); inputEncoding.data(),outputEncoding);
exit(1); error=TRUE;
} }
size_t iLeft=inputSize; if (!error)
size_t oLeft=outputSize;
const char *inputPtr = input.data();
char *outputPtr = output.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{ {
outputSize-=oLeft; size_t iLeft=inputSize;
output.resize(outputSize+1); size_t oLeft=outputSize;
output.at(outputSize)='\0'; const char *inputPtr = input.data();
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); char *outputPtr = output.data();
} if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
else {
{ outputSize-=oLeft;
err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", output.resize(outputSize+1);
inputEncoding.data(),outputEncoding); output.at(outputSize)='\0';
exit(1); //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
}
else
{
err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n",
inputEncoding.data(),outputEncoding,input.data());
error=TRUE;
}
} }
portable_iconv_close(cd); portable_iconv_close(cd);
return output; return error ? input : output;
} }
/*! reads a file with name \a name and returns it as a string. If \a filter /*! reads a file with name \a name and returns it as a string. If \a filter
...@@ -5440,7 +5445,16 @@ QCString substituteTemplateArgumentsInString( ...@@ -5440,7 +5445,16 @@ QCString substituteTemplateArgumentsInString(
++formAli,actArg=actualArgs->next() ++formAli,actArg=actualArgs->next()
) )
{ {
//printf("formArg->type=%s\n",formArg->type.data()); if (formArg->type.left(6)=="class " && formArg->name.isEmpty())
{
formArg->name = formArg->type.mid(6);
formArg->type = "class";
}
if (formArg->type.left(9)=="typename " && formArg->name.isEmpty())
{
formArg->name = formArg->type.mid(9);
formArg->type = "typename";
}
if (formArg->type=="class" || formArg->type=="typename" || formArg->type.left(8)=="template") if (formArg->type=="class" || formArg->type=="typename" || formArg->type.left(8)=="template")
{ {
//printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n", //printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n",
...@@ -5453,7 +5467,7 @@ QCString substituteTemplateArgumentsInString( ...@@ -5453,7 +5467,7 @@ QCString substituteTemplateArgumentsInString(
result += actArg->type+" "; result += actArg->type+" ";
} }
else // for case where the actual arg is something like "unsigned int" else // for case where the actual arg is something like "unsigned int"
// the "int" part is in actArg->name. // the "int" part is in actArg->name.
{ {
result += actArg->type+" "+actArg->name+" "; result += actArg->type+" "+actArg->name+" ";
} }
...@@ -5481,7 +5495,7 @@ QCString substituteTemplateArgumentsInString( ...@@ -5481,7 +5495,7 @@ QCString substituteTemplateArgumentsInString(
result+=name.right(name.length()-p); result+=name.right(name.length()-p);
//printf(" Inheritance relation %s -> %s\n", //printf(" Inheritance relation %s -> %s\n",
// name.data(),result.data()); // name.data(),result.data());
return result; return result.stripWhiteSpace();
} }
......
...@@ -587,47 +587,57 @@ static void addOneTextLine(QCString& ss ) ...@@ -587,47 +587,57 @@ static void addOneTextLine(QCString& ss )
/* start command character */ /* start command character */
/* -------------- VHDL SECTION -----------------------------------*/ /* -------------- VHDL SECTION -----------------------------------*/
B [ \t] B [ \t]
CR [\r\n] CR [\r\n]
BR [ \t\n\r] BR [ \t\n\r]
LETTER [a-zA-Z_0-9] DIGIT [0-9]
NAME {LETTER}[a-zA-Z0-9_.]* LOWER_CASE_LETTER [a-z]
FUNCNAME [a-zA-Z"][*+\-_a-zA-Z0-9"\/=<>]* UPPER_CASE_LETTER [A-Z]
DIGITS [0-9]+|[0-9]+"."[0-9]+|[0-9]+"#"[0-9_a-fA-F\+\.]+"#" LETTER [a-zA-Z_0-9]
COMMENT "--"[^\n]* SPACE_CHARACTER [ \t]
LABELID [a-z_A-Z][^\;]*";"({B}*{COMMENT})* SPECIAL_CHARACTER [#&'()*+,\-\./:;<=>_|]
PROTO [ (]* OTHER_SPECIAL_CHARACTER [~!$§%?@\[\\\]^{}]
TEXTT "--"[^\/\@\*\#][^\n]* BASIC_GRAPHIC_CHARACTER {UPPER_CASE_LETTER}|{DIGIT}|{SPECIAL_CHARACTER}|{SPACE_CHARACTER}
PROC ("function"|"procedure") GRAPHIC_CHARACTER {BASIC_GRAPHIC_CHARACTER}|{LOWER_CASE_LETTER}|{OTHER_SPECIAL_CHARACTER}
ENDE ({BR}*("end"){BR}*{PROC}*{BR}*[;]{1})
ENDEFF ("if"|"case"|"loop"|"generate"){BR}*[;] NAME {LETTER}[a-zA-Z0-9_.]*
ENDE3 ({BR}*("end"){BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;])|{ENDE} STRING_LITERAL \"{GRAPHIC_CHARACTER}*\"
ENDFUNC {B}*"end"{BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;] FUNCNAME [a-zA-Z"][*+\-_a-zA-Z0-9"\/=<>]*
FUNCIMPURE "impure"|"pure" DIGITS [0-9]+|[0-9]+"."[0-9]+|[0-9]+"#"[0-9_a-fA-F\+\.]+"#"
FUNCPROC ^{B}*{FUNCIMPURE}*{BR}*("function"|"procedure"){B}* COMMENT "--"[^\n]*
ARCHITECTURE ("architecture"){BR}+{NAME}{BR}*("of") LABELID [a-z_A-Z][^\;]*";"({B}*{COMMENT})*
PROTO [ (]*
TEXTT "--"[^\/\@\*\#][^\n]*
PROC ("function"|"procedure")
ENDE ({BR}*("end"){BR}*{PROC}*{BR}*[;]{1})
ENDEFF ("if"|"case"|"loop"|"generate"){BR}*[;]
ENDE3 ({BR}*("end"){BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;])|{ENDE}
ENDFUNC {B}*"end"{BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;]
FUNCIMPURE "impure"|"pure"
FUNCPROC ^{B}*{FUNCIMPURE}*{BR}*("function"|"procedure"){B}*
ARCHITECTURE ("architecture"){BR}+{NAME}{BR}*("of")
/* Removed due to bug 538239 /* Removed due to bug 538239
POST "postponed" POST "postponed"
PROCESS ({BR}*{FUNCNAME}{B}*[:]{BR}*({POST}{BR}+)?("process"){BR}*{PROTO})|("process"){BR}*("("){BR}*{PROTO}|[^a-zA-Z]("process"){CR}|[^a-zA-Z]("process"){BR}+("is") PROCESS ({BR}*{FUNCNAME}{B}*[:]{BR}*({POST}{BR}+)?("process"){BR}*{PROTO})|("process"){BR}*("("){BR}*{PROTO}|[^a-zA-Z]("process"){CR}|[^a-zA-Z]("process"){BR}+("is")
*/ */
PROCESS ({B}*{FUNCNAME}{B}*:{BR}*)?({B}*("postponed"){BR}+)?{B}*("process"){BR}*{PROTO} PROCESS ({B}*{FUNCNAME}{B}*:{BR}*)?({B}*("postponed"){BR}+)?{B}*("process"){BR}*{PROTO}
ENDPROCESS ("end"){BR}*("postponed")*("process"){BR}*{FUNCNAME}*{BR}*[;] ENDPROCESS ("end"){BR}*("postponed")*("process"){BR}*{FUNCNAME}*{BR}*[;]
LIBUSE ^{B}*("use"|"library"){BR}+ LIBUSE ^{B}*("use"|"library"){BR}+
ENTITY ^{B}*("component"|"entity"|"package"){BR}+ ENTITY ^{B}*("component"|"entity"|"package"){BR}+
PBODY ("package"){B}+("body"){BR}+{NAME} PBODY ("package"){B}+("body"){BR}+{NAME}
SHARED ("shared"){BR}+("variable") SHARED ("shared"){BR}+("variable")
SIGTYPES ^{B}*({SHARED}|"alias"|"file"|"group"|"subtype"|"type"|"constant"|"attribute"|"signal"|"units"){BR}+ SIGTYPES ^{B}*({SHARED}|"alias"|"file"|"group"|"subtype"|"type"|"constant"|"attribute"|"signal"|"units"){BR}+
CONFIG ("configuration"){BR}+{NAME}{BR}*("of"){BR}+{NAME}{BR}+"is" CONFIG ("configuration"){BR}+{NAME}{BR}*("of"){BR}+{NAME}{BR}+"is"
ALLTYPESMAP {B}*[_a-zA-ZA_Z0-9.() ]*{B}* ALLTYPESMAP {B}*[_a-zA-ZA_Z0-9.() ]*{B}*
MAPCOMPONENT ({ALLTYPESMAP}{BR}*[:]{BR}*("component"|"configuration")*{ALLTYPESMAP}{BR}*{TEXTT}*{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1}) MAPCOMPONENT ({ALLTYPESMAP}{BR}*[:]{BR}*("component"|"configuration")*{ALLTYPESMAP}{BR}*{TEXTT}*{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
MAPCOMPONENT1 ({ALLTYPESMAP}{BR}*[:]{BR}*("entity"){BR}*{ALLTYPESMAP}{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1}) MAPCOMPONENT1 ({ALLTYPESMAP}{BR}*[:]{BR}*("entity"){BR}*{ALLTYPESMAP}{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
BRACEOPEN [(]{1} BRACEOPEN [(]{1}
BRACECLOSE [)]{1} BRACECLOSE [)]{1}
ALLID [^;()\t ] ALLID [^;()\t ]
%option noyywrap %option noyywrap
...@@ -1470,6 +1480,15 @@ ALLID [^;()\t ] ...@@ -1470,6 +1480,15 @@ ALLID [^;()\t ]
lineCount(); lineCount();
} }
<*>{STRING_LITERAL} {
// Make sure string literals get transfered to the output
// We have to match these because the comment characters (--)
// can exist inside a string literal.
// We shouldn't have to call lineCount because newlines
// are not allowed inside string literals
addText(yytext,yyleng);
}
/* /*
<*>{BR}*"--!"{B}*"@}" { // end group <*>{BR}*"--!"{B}*"@}" { // end group
if (current) if (current)
......
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