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
...@@ -576,14 +576,19 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -576,14 +576,19 @@ doxygen. Unrecognized commands are treated as normal text.
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
Click <a href="$(DOXYGEN_DOCDIR)/examples/manual/html/index.html">here</a> Click <a href="$(DOXYGEN_DOCDIR)/examples/manual/html/index.html">here</a>
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,10 +284,6 @@ QCString ClassDef::displayName() const ...@@ -285,10 +284,6 @@ QCString ClassDef::displayName() const
{ {
n = VhdlDocGen::getClassName(this); n = VhdlDocGen::getClassName(this);
} }
else if (hideScopeNames)
{
n=m_impl->className;
}
else 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,8 +2998,11 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( ...@@ -3154,8 +2998,11 @@ 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;
if (!hideScopeNames)
{
Definition *d=getOuterScope(); Definition *d=getOuterScope();
if (d) if (d)
{ {
...@@ -3177,7 +3024,8 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( ...@@ -3177,7 +3024,8 @@ QCString ClassDef::qualifiedNameWithTemplateParameters(
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 {
if (!g_inRoseComment)
{
REJECT;
}
else
{
replaceComment(0); replaceComment(0);
g_readLineCtx=YY_START; g_readLineCtx=YY_START;
BEGIN(ReadLine); BEGIN(ReadLine);
} }
}
<SComment>\n[ \t]*"//##"/.*\n { <SComment>\n[ \t]*"//##"/.*\n {
if (!g_inRoseComment)
{
REJECT;
}
else
{
replaceComment(1); replaceComment(1);
g_readLineCtx=YY_START; g_readLineCtx=YY_START;
BEGIN(ReadLine); 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
......
...@@ -59,6 +59,7 @@ class DefinitionImpl ...@@ -59,6 +59,7 @@ class DefinitionImpl
GroupList *partOfGroups; GroupList *partOfGroups;
DocInfo *details; // not exported DocInfo *details; // not exported
DocInfo *inbodyDocs; // not exported
BriefInfo *brief; // not exported BriefInfo *brief; // not exported
BodyInfo *body; // not exported BodyInfo *body; // not exported
QCString docSignatures; QCString docSignatures;
...@@ -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,
...@@ -124,12 +126,13 @@ void DefinitionImpl::init(const char *df,int dl, ...@@ -124,12 +126,13 @@ void DefinitionImpl::init(const char *df,int dl,
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;
xrefListItems = 0;
hidden = FALSE; hidden = FALSE;
isArtificial = 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
...@@ -905,6 +913,7 @@ bool Definition::hasDocumentation() const ...@@ -905,6 +913,7 @@ bool Definition::hasDocumentation() const
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)
...@@ -917,7 +926,8 @@ bool Definition::hasUserDocumentation() const ...@@ -917,7 +926,8 @@ 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()+"$"+
......
This diff is collapsed.
...@@ -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,6 +513,7 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) ...@@ -513,6 +513,7 @@ 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"))
...@@ -532,13 +533,18 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) ...@@ -532,13 +533,18 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.writeString("\n\n"); ol.writeString("\n\n");
ol.popGeneratorState(); ol.popGeneratorState();
} }
}
// write detailed documentation // write detailed documentation
if (!documentation().isEmpty()) if (!documentation().isEmpty())
{ {
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);
......
This diff is collapsed.
...@@ -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,8 +2123,10 @@ QCString transcodeCharacterStringToUTF8(const QCString &input) ...@@ -2121,8 +2123,10 @@ 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;
} }
if (!error)
{
size_t iLeft=inputSize; size_t iLeft=inputSize;
size_t oLeft=outputSize; size_t oLeft=outputSize;
const char *inputPtr = input.data(); const char *inputPtr = input.data();
...@@ -2136,12 +2140,13 @@ QCString transcodeCharacterStringToUTF8(const QCString &input) ...@@ -2136,12 +2140,13 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
} }
else else
{ {
err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n",
inputEncoding.data(),outputEncoding); inputEncoding.data(),outputEncoding,input.data());
exit(1); 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",
...@@ -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();
} }
......
...@@ -590,8 +590,18 @@ static void addOneTextLine(QCString& ss ) ...@@ -590,8 +590,18 @@ static void addOneTextLine(QCString& ss )
B [ \t] B [ \t]
CR [\r\n] CR [\r\n]
BR [ \t\n\r] BR [ \t\n\r]
DIGIT [0-9]
LOWER_CASE_LETTER [a-z]
UPPER_CASE_LETTER [A-Z]
LETTER [a-zA-Z_0-9] LETTER [a-zA-Z_0-9]
SPACE_CHARACTER [ \t]
SPECIAL_CHARACTER [#&'()*+,\-\./:;<=>_|]
OTHER_SPECIAL_CHARACTER [~!$§%?@\[\\\]^{}]
BASIC_GRAPHIC_CHARACTER {UPPER_CASE_LETTER}|{DIGIT}|{SPECIAL_CHARACTER}|{SPACE_CHARACTER}
GRAPHIC_CHARACTER {BASIC_GRAPHIC_CHARACTER}|{LOWER_CASE_LETTER}|{OTHER_SPECIAL_CHARACTER}
NAME {LETTER}[a-zA-Z0-9_.]* NAME {LETTER}[a-zA-Z0-9_.]*
STRING_LITERAL \"{GRAPHIC_CHARACTER}*\"
FUNCNAME [a-zA-Z"][*+\-_a-zA-Z0-9"\/=<>]* FUNCNAME [a-zA-Z"][*+\-_a-zA-Z0-9"\/=<>]*
DIGITS [0-9]+|[0-9]+"."[0-9]+|[0-9]+"#"[0-9_a-fA-F\+\.]+"#" DIGITS [0-9]+|[0-9]+"."[0-9]+|[0-9]+"#"[0-9_a-fA-F\+\.]+"#"
COMMENT "--"[^\n]* COMMENT "--"[^\n]*
...@@ -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