Commit e2bafacf authored by dimitri's avatar dimitri

Release-1.4.4

parent 97589008
DOXYGEN Version 1.4.3-20050707 DOXYGEN Version 1.4.4
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 (07 July 2005) Dimitri van Heesch (20 July 2005)
DOXYGEN Version 1.4.3_20050707 DOXYGEN Version 1.4.4
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) (07 July 2005) Dimitri van Heesch (dimitri@stack.nl) (20 July 2005)
1.4.3-20050707 1.4.4
Makefile Makefile
metrics.pro metrics.pro
Makefile.metrics
obj
Makefile Makefile
doxmlparser.pro doxmlparser.pro
Makefile.doxmlparser
Makefile Makefile
xmlparse.pro xmlparse.pro
Makefile.xmlparse
#! /bin/sh #!/bin/sh
# #
# $Id$ # $Id$
# #
......
...@@ -26,7 +26,7 @@ Version: $(VERSION) ...@@ -26,7 +26,7 @@ Version: $(VERSION)
\endif \endif
<h2>Introduction</h2> <h2>Introduction</h2>
Doxygen is a documentation system for C++, C, Java, Objective-C, IDL Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL
(Corba and Microsoft flavors) and to some extent PHP, C#, and D. (Corba and Microsoft flavors) and to some extent PHP, C#, and D.
It can help you in three ways: It can help you in three ways:
......
...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other ...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile). configuration file (with default name and known as Doxyfile).
Currently (version 1.4.3-20050623), 31 languages Currently (version 1.4.4), 31 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
...@@ -120,7 +120,7 @@ when the translator was updated. ...@@ -120,7 +120,7 @@ when the translator was updated.
<td>French</td> <td>French</td>
<td>Xavier Outhier</td> <td>Xavier Outhier</td>
<td>xouthier at yahoo dot fr</td> <td>xouthier at yahoo dot fr</td>
<td>1.4.1</td> <td>up-to-date</td>
</tr> </tr>
<tr bgcolor="#ffffff"> <tr bgcolor="#ffffff">
<td>German</td> <td>German</td>
...@@ -288,7 +288,7 @@ when the translator was updated. ...@@ -288,7 +288,7 @@ when the translator was updated.
\hline \hline
Finnish & Olli Korhonen & {\tt\tiny olli.korhonen lost@cyberspace} & obsolete \\ Finnish & Olli Korhonen & {\tt\tiny olli.korhonen lost@cyberspace} & obsolete \\
\hline \hline
French & Xavier Outhier & {\tt\tiny xouthier@yahoo.fr} & 1.4.1 \\ French & Xavier Outhier & {\tt\tiny xouthier@yahoo.fr} & up-to-date \\
\hline \hline
German & Jens Seidel & {\tt\tiny jensseidel@users.sf.net} & up-to-date \\ German & Jens Seidel & {\tt\tiny jensseidel@users.sf.net} & up-to-date \\
\hline \hline
......
(1.4.3-20050623) (1.4.4)
Doxygen supports the following 31 languages (sorted alphabetically): Doxygen supports the following 31 languages (sorted alphabetically):
...@@ -8,7 +8,7 @@ German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean ...@@ -8,7 +8,7 @@ German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean
(+En), Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, (+En), Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
Of them, 16 translators are up-to-date, 15 translators are based on Of them, 17 translators are up-to-date, 14 translators are based on
some adapter class, and 2 are English based. some adapter class, and 2 are English based.
---------------------------------------------------------------------- ----------------------------------------------------------------------
...@@ -24,6 +24,7 @@ still may be some details listed even for them: ...@@ -24,6 +24,7 @@ still may be some details listed even for them:
TranslatorCzech TranslatorCzech
TranslatorDutch -- Remove the obsolete methods (never used). TranslatorDutch -- Remove the obsolete methods (never used).
TranslatorEnglish -- Remove the obsolete methods (never used). TranslatorEnglish -- Remove the obsolete methods (never used).
TranslatorFrench -- Remove the obsolete methods (never used).
TranslatorGerman TranslatorGerman
TranslatorHungarian TranslatorHungarian
TranslatorIndonesian -- Remove the obsolete methods (never used). TranslatorIndonesian -- Remove the obsolete methods (never used).
...@@ -43,7 +44,6 @@ must be implemented to become up-to-date: ...@@ -43,7 +44,6 @@ must be implemented to become up-to-date:
TranslatorUkrainian 1.4.1 1 method to implement TranslatorUkrainian 1.4.1 1 method to implement
TranslatorSerbian 1.4.1 1 method to implement TranslatorSerbian 1.4.1 1 method to implement
TranslatorRomanian 1.4.1 1 method to implement TranslatorRomanian 1.4.1 1 method to implement
TranslatorFrench 1.4.1 1 method to implement
TranslatorChinese 1.4.1 1 method to implement TranslatorChinese 1.4.1 1 method to implement
TranslatorNorwegian 1.3.9 7 methods to implement TranslatorNorwegian 1.3.9 7 methods to implement
TranslatorJapanese 1.3.9 7 methods to implement TranslatorJapanese 1.3.9 7 methods to implement
...@@ -312,14 +312,10 @@ TranslatorFinnish (TranslatorEnglish) 95 methods to implement ...@@ -312,14 +312,10 @@ TranslatorFinnish (TranslatorEnglish) 95 methods to implement
QCString trNoDescriptionAvailable() QCString trNoDescriptionAvailable()
TranslatorFrench (TranslatorAdapter_1_4_1) 1 method to implement TranslatorFrench (Translator)
---------------- ----------------
Implements 191 of the required methods. Implements 192 of the required methods.
Missing methods (should be implemented):
virtual QCString trOverloadText()
Obsolete methods (should be removed, never used): Obsolete methods (should be removed, never used):
......
...@@ -20,3 +20,6 @@ doxytag.cpp ...@@ -20,3 +20,6 @@ doxytag.cpp
pre.cpp pre.cpp
scanner.cpp scanner.cpp
version.cpp version.cpp
commentscan.cpp
pycode.cpp
pyscanner.cpp
...@@ -2389,6 +2389,7 @@ void ClassDef::mergeCategory(ClassDef *category) ...@@ -2389,6 +2389,7 @@ void ClassDef::mergeCategory(ClassDef *category)
void ClassDef::addUsedClass(ClassDef *cd,const char *accessName) void ClassDef::addUsedClass(ClassDef *cd,const char *accessName)
{ {
//printf("%s::addUsedClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
if (m_usesImplClassDict==0) if (m_usesImplClassDict==0)
{ {
m_usesImplClassDict = new UsesClassDict(17); m_usesImplClassDict = new UsesClassDict(17);
......
...@@ -106,6 +106,7 @@ CommandMap cmdMap[] = ...@@ -106,6 +106,7 @@ CommandMap cmdMap[] =
{ "manonly", CMD_MANONLY }, { "manonly", CMD_MANONLY },
{ "endmanonly", CMD_ENDMANONLY }, { "endmanonly", CMD_ENDMANONLY },
{ "includelineno", CMD_INCWITHLINES }, { "includelineno", CMD_INCWITHLINES },
{ "inheritdoc", CMD_INHERITDOC },
{ 0, 0 } { 0, 0 }
}; };
......
...@@ -36,9 +36,9 @@ enum CommandType ...@@ -36,9 +36,9 @@ enum CommandType
CMD_AMP = 2, CMD_AMP = 2,
CMD_ANCHOR = 3, CMD_ANCHOR = 3,
CMD_AT = 4, CMD_AT = 4,
CMD_ATTENTION = 5 | SIMPLESECT_BIT, CMD_ATTENTION = 5 | SIMPLESECT_BIT,
CMD_AUTHOR = 6 | SIMPLESECT_BIT, CMD_AUTHOR = 6 | SIMPLESECT_BIT,
CMD_AUTHORS = 7 | SIMPLESECT_BIT, CMD_AUTHORS = 7 | SIMPLESECT_BIT,
CMD_BOLD = 8, CMD_BOLD = 8,
CMD_BSLASH = 9, CMD_BSLASH = 9,
CMD_CODE = 10, CMD_CODE = 10,
...@@ -106,7 +106,8 @@ enum CommandType ...@@ -106,7 +106,8 @@ enum CommandType
CMD_ENDDOT = 72, CMD_ENDDOT = 72,
CMD_MANONLY = 73, CMD_MANONLY = 73,
CMD_ENDMANONLY = 74, CMD_ENDMANONLY = 74,
CMD_INCWITHLINES = 75 CMD_INCWITHLINES = 75,
CMD_INHERITDOC = 76
}; };
enum HtmlTagType enum HtmlTagType
......
...@@ -320,18 +320,29 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -320,18 +320,29 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
BEGIN(CComment); BEGIN(CComment);
} }
<CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code")/[ \r\t\n] { /* start of a verbatim block */ <CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f$"|"f[")/[ \r\t\n] { /* start of a verbatim block */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
g_blockName=&yytext[1]; if (yytext[2]=='[')
{
g_blockName="f]";
}
else
{
g_blockName=&yytext[1];
}
g_lastCommentContext = YY_START; g_lastCommentContext = YY_START;
BEGIN(Verbatim); BEGIN(Verbatim);
} }
<Scan>. { /* any other character */ <Scan>. { /* any other character */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode") { /* end of verbatim block */ <Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]") { /* end of verbatim block */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
if (&yytext[4]==g_blockName) if (yytext[1]=='f') // end of formula
{
BEGIN(g_lastCommentContext);
}
else if (&yytext[4]==g_blockName)
{ {
BEGIN(g_lastCommentContext); BEGIN(g_lastCommentContext);
} }
......
...@@ -21,16 +21,51 @@ ...@@ -21,16 +21,51 @@
class ParserInterface; class ParserInterface;
int parseCommentBlock(/* in */ ParserInterface *parser, /** @file
/* in */ Entry *curEntry, * @brief Interface for the comment block parser */
/* in */ const QCString &comment,
/* in */ const QCString &fileName, /** Invokes the comment block parser with the request to parse a
/* in */ int lineNr, * single comment block.
/* in */ bool isBrief, * @param[in] parser The language parse that invoked this function.
/* in */ bool isJavaDocStyle, * The comment block parse may invoke
/* in,out */ Protection &prot, * ParserInterface::parsePrototype() in order to parse
/* in,out */ int &position, * the argument of a @@fn command.
/* out */ bool &newEntryNeeded * @param[in] curEntry The Entry to which the comment block belongs.
* Any information (like documentation) that is found in
* the comment block will be stored in this entry.
* @param[in] comment A string representing the actual comment block.
* Note that leading *'s are already stripped from the comment block.
* @param[in] fileName The name of the file in which the comment is found.
* Mainly used for producing warnings.
* @param[in] lineNr The line number at which the comment block was found.
* @param[in] isBrief TRUE iff this comment block represents a brief description.
* @param[in] isJavaDocStyle TRUE iff this comment block is in "JavaDoc" style.
* This means that it starts as a brief description until the end of
* the sentences is found and then proceeds as a detailed description.
* @param[in,out] prot The protection level in which this comment block was
* found. Commands in the comment block may override this.
* @param[in,out] position The character position within \a comment where the
* comment block starts. Typically used in case the comment block
* contains multiple structural commands.
* @param[out] newEntryNeeded Boolean that is TRUE if the comment block parser
* finds that a the comment block finishes the entry and a new one
* needs to be started.
* @returns TRUE if the comment requires further processing. The
* parameter \a newEntryNeeded will typically be true in this case and
* \a position will indicate the offset inside the \a comment string
* where to proceed parsing. FALSE indicates no further processing is
* needed.
*/
bool parseCommentBlock(ParserInterface *parser,
Entry *curEntry,
const QCString &comment,
const QCString &fileName,
int lineNr,
bool isBrief,
bool isJavaDocStyle,
Protection &prot,
int &position,
bool &newEntryNeeded
); );
void groupEnterFile(const char *file,int line); void groupEnterFile(const char *file,int line);
......
...@@ -332,6 +332,8 @@ static int braceCount; ...@@ -332,6 +332,8 @@ static int braceCount;
static bool insidePre; static bool insidePre;
static bool parseMore; static bool parseMore;
static int g_commentCount;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static QStack<Grouping> g_autoGroupStack; static QStack<Grouping> g_autoGroupStack;
...@@ -909,8 +911,9 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-] ...@@ -909,8 +911,9 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]
addOutput(yytext); addOutput(yytext);
setOutput(OutputDoc); setOutput(OutputDoc);
} }
else else if (!current->brief.stripWhiteSpace().isEmpty())
{ { // only go to the detailed description if we have
// found some brief description and not just whitespace
setOutput(OutputDoc); setOutput(OutputDoc);
addOutput(yytext); addOutput(yytext);
} }
...@@ -1422,13 +1425,24 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-] ...@@ -1422,13 +1425,24 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]
BEGIN(Comment); BEGIN(Comment);
} }
} }
<FormatBlock>[^ \@\\\n]* { // some word <FormatBlock>[^ \@\*\/\\\n]* { // some word
addOutput(yytext); addOutput(yytext);
} }
<FormatBlock>{DOCNL} { // new line <FormatBlock>{DOCNL} { // new line
if (*yytext=='\n') yyLineNr++; if (*yytext=='\n') yyLineNr++;
addOutput('\n'); addOutput('\n');
} }
<FormatBlock>"/*" { // start of a C-comment
g_commentCount++;
}
<FormatBlock>"*/" { // end of a C-comment
g_commentCount--;
if (g_commentCount<0 && blockName!="verbatim")
{
warn(yyFileName,yyLineNr,
"Warning: found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data());
}
}
<FormatBlock>. { <FormatBlock>. {
addOutput(*yytext); addOutput(*yytext);
} }
...@@ -1883,6 +1897,7 @@ static bool handleName(const QCString &) ...@@ -1883,6 +1897,7 @@ static bool handleName(const QCString &)
bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC); bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC);
g_memberGroupHeader.resize(0); g_memberGroupHeader.resize(0);
BEGIN( NameParam ); BEGIN( NameParam );
closeGroup(current,yyFileName,yyLineNr);
return stop; return stop;
} }
...@@ -1979,6 +1994,7 @@ static bool handleFormatBlock(const QCString &s) ...@@ -1979,6 +1994,7 @@ static bool handleFormatBlock(const QCString &s)
addOutput("@"+s+" "); addOutput("@"+s+" ");
//printf("handleFormatBlock(%s)\n",s.data()); //printf("handleFormatBlock(%s)\n",s.data());
blockName=s; blockName=s;
g_commentCount=0;
BEGIN(FormatBlock); BEGIN(FormatBlock);
return FALSE; return FALSE;
} }
...@@ -2218,6 +2234,12 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, ...@@ -2218,6 +2234,12 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
current->doc="\n\n"; current->doc="\n\n";
} }
if (current->section==Entry::MEMBERGRP_SEC &&
g_memberGroupId==DOX_NOGROUP) // @name section but no group started yet
{
openGroup(current,yyFileName,yyLineNr);
}
Debug::print(Debug::CommentScan,0,"CommentScanner\n%s:%d\n" Debug::print(Debug::CommentScan,0,"CommentScanner\n%s:%d\n"
"input=[%s]\nbrief=[%s]\ndocs=[%s]\n------------\n", "input=[%s]\nbrief=[%s]\ndocs=[%s]\n------------\n",
fileName.data(),lineNr,comment.data(), fileName.data(),lineNr,comment.data(),
...@@ -2249,10 +2271,13 @@ void groupEnterFile(const char *,int) ...@@ -2249,10 +2271,13 @@ void groupEnterFile(const char *,int)
void groupLeaveFile(const char *fileName,int line) void groupLeaveFile(const char *fileName,int line)
{ {
if (g_memberGroupId!=DOX_NOGROUP) //if (g_memberGroupId!=DOX_NOGROUP)
{ //{
warn(fileName,line,"Warning: end of file while inside a member group\n"); // warn(fileName,line,"Warning: end of file while inside a member group\n");
} //}
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);
g_memberGroupDocs.resize(0);
if (!g_autoGroupStack.isEmpty()) if (!g_autoGroupStack.isEmpty())
{ {
warn(fileName,line,"Warning: end of file while inside a group\n"); warn(fileName,line,"Warning: end of file while inside a group\n");
...@@ -2270,12 +2295,12 @@ void groupEnterCompound(const char *fileName,int line,const char *name) ...@@ -2270,12 +2295,12 @@ void groupEnterCompound(const char *fileName,int line,const char *name)
g_memberGroupDocs.resize(0); g_memberGroupDocs.resize(0);
} }
void groupLeaveCompound(const char *fileName,int line,const char *name) void groupLeaveCompound(const char *,int,const char *)
{ {
if (g_memberGroupId!=DOX_NOGROUP) //if (g_memberGroupId!=DOX_NOGROUP)
{ //{
warn(fileName,line,"Warning: end of compound %s while inside a member group\n",name); // warn(fileName,line,"Warning: end of compound %s while inside a member group\n",name);
} //}
g_memberGroupId=DOX_NOGROUP; g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0); g_memberGroupRelates.resize(0);
g_memberGroupDocs.resize(0); g_memberGroupDocs.resize(0);
...@@ -2284,7 +2309,8 @@ void groupLeaveCompound(const char *fileName,int line,const char *name) ...@@ -2284,7 +2309,8 @@ void groupLeaveCompound(const char *fileName,int line,const char *name)
void closeGroup(Entry *e,const char *fileName,int) void closeGroup(Entry *e,const char *fileName,int)
{ {
//printf("%s:%d: closeGroup()\n",fileName,line); //printf("==> closeGroup(name=%s,sec=%x) g_autoGroupStack=%d\n",
// e->name.data(),e->section,g_autoGroupStack.count());
if (g_memberGroupId!=DOX_NOGROUP) // end of member group if (g_memberGroupId!=DOX_NOGROUP) // end of member group
{ {
MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId); MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId);
...@@ -2301,34 +2327,39 @@ void closeGroup(Entry *e,const char *fileName,int) ...@@ -2301,34 +2327,39 @@ void closeGroup(Entry *e,const char *fileName,int)
} }
else if (!g_autoGroupStack.isEmpty()) // end of auto group else if (!g_autoGroupStack.isEmpty()) // end of auto group
{ {
delete g_autoGroupStack.pop(); Grouping *grp = g_autoGroupStack.pop();
e->groups->removeLast();
delete grp;
} }
} }
void openGroup(Entry *e,const char *fileName,int line) void openGroup(Entry *e,const char *,int)
{ {
//printf("%s:%d: openGroup(sec=%x)\n",fileName,line,e->section); //printf("==> openGroup(name=%s,sec=%x)\n",e->name.data(),e->section);
if (e->section==Entry::GROUPDOC_SEC) // auto group if (e->section==Entry::GROUPDOC_SEC) // auto group
{ {
g_autoGroupStack.push(new Grouping(e->name,e->groupingPri())); g_autoGroupStack.push(new Grouping(e->name,e->groupingPri()));
} }
else // start of a member group else // start of a member group
{ {
if (g_memberGroupId!=DOX_NOGROUP) if (g_memberGroupId==DOX_NOGROUP) // no group started yet
{ {
warn(fileName,line,"Warning: member groups cannot be nested. Ending current group!\n"); static int curGroupId=0;
closeGroup(e,fileName,line); g_memberGroupId = curGroupId++;
} //printf("new group id=%d header=%s\n",g_memberGroupId,g_memberGroupHeader.data());
static int curGroupId=0;
g_memberGroupId = curGroupId++;
//printf("new group id=%d header=%s\n",g_memberGroupId,g_memberGroupHeader.data());
MemberGroupInfo *info = new MemberGroupInfo; MemberGroupInfo *info = new MemberGroupInfo;
info->header = g_memberGroupHeader.stripWhiteSpace(); info->header = g_memberGroupHeader.stripWhiteSpace();
Doxygen::memGrpInfoDict.insert(g_memberGroupId,info); Doxygen::memGrpInfoDict.insert(g_memberGroupId,info);
g_memberGroupRelates = e->relates; g_memberGroupRelates = e->relates;
e->mGrpId = g_memberGroupId; e->mGrpId = g_memberGroupId;
}
//else
//{
// warn(fileName,line,"Warning: member groups cannot be nested. Ending current group!\n");
// closeGroup(e,fileName,line);
//}
} }
} }
...@@ -2338,7 +2369,7 @@ void initGroupInfo(Entry *e) ...@@ -2338,7 +2369,7 @@ void initGroupInfo(Entry *e)
e->relates = g_memberGroupRelates; e->relates = g_memberGroupRelates;
if (!g_autoGroupStack.isEmpty()) if (!g_autoGroupStack.isEmpty())
{ {
//printf("Appending group %s\n",autoGroupStack.top()->groupname.data()); //printf("Appending group %s to %s\n",g_autoGroupStack.top()->groupname.data(),e->name.data());
e->groups->append(new Grouping(*g_autoGroupStack.top())); e->groups->append(new Grouping(*g_autoGroupStack.top()));
} }
} }
......
...@@ -48,6 +48,8 @@ static int yyread(char *buf,int max_size) ...@@ -48,6 +48,8 @@ static int yyread(char *buf,int max_size)
%} %}
CONSTSUFFIX ([uU][lL]?[lL]?)|(lL][lL]?[uU]?)
%option nounput %option nounput
%% %%
...@@ -80,13 +82,13 @@ static int yyread(char *buf,int max_size) ...@@ -80,13 +82,13 @@ static int yyread(char *buf,int max_size)
g_strToken=yytext; g_strToken=yytext;
return TOK_CHARACTER; return TOK_CHARACTER;
} }
0[0-7]*[uUlL]* { g_strToken=yytext; 0[0-7]*{CONSTSUFFIX}? { g_strToken=yytext;
return TOK_OCTALINT; return TOK_OCTALINT;
} }
[1-9][0-9]*[uUlL]* { g_strToken=yytext; [1-9][0-9]*{CONSTSUFFIX}? { g_strToken=yytext;
return TOK_DECIMALINT; return TOK_DECIMALINT;
} }
(0x|0X)[0-9a-fA-F]+[uUlL]* { g_strToken=yytext+2; (0x|0X)[0-9a-fA-F]+{CONSTSUFFIX}? { g_strToken=yytext+2;
return TOK_HEXADECIMALINT; return TOK_HEXADECIMALINT;
} }
(([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+))([eE]([\-\+])?[0-9]+)?([fFlL])? { (([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+))([eE]([\-\+])?[0-9]+)?([fFlL])? {
......
...@@ -336,6 +336,10 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -336,6 +336,10 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
<ReadFuncArgType,ReadFuncArgPtr>. { <ReadFuncArgType,ReadFuncArgPtr>. {
g_curArgTypeName+=*yytext; g_curArgTypeName+=*yytext;
} }
<ReadFuncArgDef,CopyArgString>"->"|">="|">>" {
g_curArgDefValue+=yytext;
}
<ReadFuncArgDef,CopyArgString>. { <ReadFuncArgDef,CopyArgString>. {
g_curArgDefValue+=*yytext; g_curArgDefValue+=*yytext;
} }
......
...@@ -1623,7 +1623,7 @@ void DocCopy::parse() ...@@ -1623,7 +1623,7 @@ void DocCopy::parse()
g_nodeStack.clear(); g_nodeStack.clear();
g_copyStack.append(def); g_copyStack.append(def);
internalValidatingParseDoc(this,m_children,doc); internalValidatingParseDoc(this,m_children,doc);
ASSERT(g_copyStack.remove(def)); g_copyStack.remove(def);
ASSERT(g_styleStack.isEmpty()); ASSERT(g_styleStack.isEmpty());
ASSERT(g_nodeStack.isEmpty()); ASSERT(g_nodeStack.isEmpty());
docParserPopContext(); docParserPopContext();
...@@ -4043,6 +4043,31 @@ int DocPara::handleStartCode() ...@@ -4043,6 +4043,31 @@ int DocPara::handleStartCode()
return retval; return retval;
} }
void DocPara::handleInheritDoc()
{
if (g_memberDef) // inheriting docs from a member
{
MemberDef *reMd = g_memberDef->reimplements();
if (reMd) // member from which was inherited.
{
MemberDef *thisMd = g_memberDef;
//printf("{InheritDocs:%s=>%s}\n",g_memberDef->qualifiedName().data(),reMd->qualifiedName().data());
docParserPushContext();
g_context=reMd->getOuterScope()->name();
g_memberDef=reMd;
g_styleStack.clear();
g_nodeStack.clear();
g_copyStack.append(reMd);
internalValidatingParseDoc(this,m_children,reMd->briefDescription());
internalValidatingParseDoc(this,m_children,reMd->documentation());
g_copyStack.remove(reMd);
docParserPopContext();
g_memberDef = thisMd;
}
}
}
int DocPara::handleCommand(const QString &cmdName) int DocPara::handleCommand(const QString &cmdName)
{ {
DBG(("handleCommand(%s)\n",cmdName.data())); DBG(("handleCommand(%s)\n",cmdName.data()));
...@@ -4392,6 +4417,9 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -4392,6 +4417,9 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_INTERNALREF: case CMD_INTERNALREF:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break; break;
case CMD_INHERITDOC:
handleInheritDoc();
break;
default: default:
// we should not get here! // we should not get here!
ASSERT(0); ASSERT(0);
...@@ -5576,7 +5604,8 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -5576,7 +5604,8 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_fileName = fileName; g_fileName = fileName;
g_relPath = (!linkFromIndex && ctx) ? g_relPath = (!linkFromIndex && ctx) ?
relativePathToRoot(ctx->getOutputFileBase()) : QString(""); QString(relativePathToRoot(ctx->getOutputFileBase())) :
QString("");
//printf("ctx->name=%s relPath=%s\n",ctx->name().data(),g_relPath.data()); //printf("ctx->name=%s relPath=%s\n",ctx->name().data(),g_relPath.data());
g_memberDef = md; g_memberDef = md;
g_nodeStack.clear(); g_nodeStack.clear();
......
...@@ -977,10 +977,10 @@ class DocPara : public CompAccept<DocPara>, public DocNode ...@@ -977,10 +977,10 @@ class DocPara : public CompAccept<DocPara>, public DocNode
void handleLink(const QString &cmdName,bool isJavaLink); void handleLink(const QString &cmdName,bool isJavaLink);
void handleRef(const QString &cmdName); void handleRef(const QString &cmdName);
void handleSection(const QString &cmdName); void handleSection(const QString &cmdName);
void handleInheritDoc();
int handleStartCode(); int handleStartCode();
int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level); int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level);
bool injectToken(int tok,const QString &tokText); bool injectToken(int tok,const QString &tokText);
//int handleLanguageSwitch();
private: private:
DocNode *m_parent; DocNode *m_parent;
......
...@@ -408,6 +408,10 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*({ID}(":")?){FUNCARG}? ...@@ -408,6 +408,10 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*({ID}(":")?){FUNCARG}?
g_token->name = "javalink"; g_token->name = "javalink";
return TK_COMMAND; return TK_COMMAND;
} }
<St_Para>"{"{BLANK}*"@inheritDoc"{BLANK}*"}" {
g_token->name = "inheritdoc";
return TK_COMMAND;
}
<St_Para>{SPCMD3} { <St_Para>{SPCMD3} {
g_token->name = "form"; g_token->name = "form";
bool ok; bool ok;
......
...@@ -1173,9 +1173,6 @@ static void findUsingDirectives(Entry *root) ...@@ -1173,9 +1173,6 @@ static void findUsingDirectives(Entry *root)
gd->addNamespace(nd); gd->addNamespace(nd);
} }
bool ambig;
// file definition containing the namespace nd
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// insert the namespace in the file definition // insert the namespace in the file definition
if (fd) if (fd)
{ {
...@@ -1492,7 +1489,7 @@ static MemberDef *addVariableToClass( ...@@ -1492,7 +1489,7 @@ static MemberDef *addVariableToClass(
prot,Normal,root->stat,related, prot,Normal,root->stat,related,
mtype,0,0); mtype,0,0);
md->setTagInfo(root->tagInfo); md->setTagInfo(root->tagInfo);
md->setMemberClass(cd); md->setMemberClass(cd); // also sets outer scope (i.e. getOuterScope())
//md->setDefFile(root->fileName); //md->setDefFile(root->fileName);
//md->setDefLine(root->startLine); //md->setDefLine(root->startLine);
md->setDocumentation(root->doc,root->docFile,root->docLine); md->setDocumentation(root->doc,root->docFile,root->docLine);
...@@ -1670,7 +1667,7 @@ static MemberDef *addVariableToFile( ...@@ -1670,7 +1667,7 @@ static MemberDef *addVariableToFile(
md->setDefinition(def); md->setDefinition(def);
md->enableCallGraph(root->callGraph); md->enableCallGraph(root->callGraph);
md->setExplicitExternal(root->explicitExternal); md->setExplicitExternal(root->explicitExternal);
md->setOuterScope(fd); //md->setOuterScope(fd);
if (!root->explicitExternal) if (!root->explicitExternal)
{ {
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
...@@ -3184,21 +3181,17 @@ static void findUsedClassesForClass(Entry *root, ...@@ -3184,21 +3181,17 @@ static void findUsedClassesForClass(Entry *root,
type = substituteTemplateArgumentsInString(type,formalArgs,actualArgs); type = substituteTemplateArgumentsInString(type,formalArgs,actualArgs);
} }
QCString typeName = resolveTypeDef(masterCd,usedClassName);
//printf("*** Found resolved class %s for %s\n",typeName.data(),usedClassName.data());
if (!typeName.isEmpty()) // if we could resolve the typedef, use
// the result as the class name.
{
usedClassName=typeName;
}
//printf(" template substitution gives=%s\n",type.data()); //printf(" template substitution gives=%s\n",type.data());
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec)!=-1) while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec)!=-1)
{ {
//printf(" found used class %s\n",usedClassName.data()); // find the type (if any) that matches usedClassName
// the name could be a type definition, resolve it ClassDef *typeCd = getResolvedClass(masterCd,masterCd->getFileDef(),usedClassName);
//QCString typeName = resolveTypeDef(masterCd,usedClassName); //printf("====> usedClassName=%s -> typeCd=%s\n",
// usedClassName.data(),typeCd?typeCd->name().data():"<none>");
if (typeCd)
{
usedClassName = typeCd->name();
}
int sp=usedClassName.find('<'); int sp=usedClassName.find('<');
if (sp==-1) sp=0; if (sp==-1) sp=0;
...@@ -4033,14 +4026,14 @@ static void addMemberDocs(Entry *root, ...@@ -4033,14 +4026,14 @@ static void addMemberDocs(Entry *root,
if (al) if (al)
{ {
//printf("merging arguments (1) docs=%d\n",root->doc.isEmpty()); //printf("merging arguments (1) docs=%d\n",root->doc.isEmpty());
if (!root->doc.isEmpty()) if ((!root->doc.isEmpty() || !root->proto))
{ {
mergeArguments(md->argumentList(),al,TRUE); mergeArguments(md->argumentList(),al,TRUE);
} }
} }
else else
{ {
if ( !root->doc.isEmpty() && if ( (!root->doc.isEmpty() || !root->proto) &&
matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(), matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(),
rscope,rfd,root->argList, rscope,rfd,root->argList,
TRUE TRUE
...@@ -4704,9 +4697,10 @@ static void findMember(Entry *root, ...@@ -4704,9 +4697,10 @@ static void findMember(Entry *root,
ClassDef *cd=md->getClassDef(); ClassDef *cd=md->getClassDef();
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"3. member definition found, " "3. member definition found, "
"scope needed=`%s' scope=`%s' args=`%s'\n", "scope needed=`%s' scope=`%s' args=`%s' fileName=%s\n",
scopeName.data(),cd ? cd->name().data() : "<none>", scopeName.data(),cd ? cd->name().data() : "<none>",
md->argsString()); md->argsString(),
root->fileName.data());
//printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data()); //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data());
bool ambig; bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
...@@ -7624,6 +7618,9 @@ static void expandAliases() ...@@ -7624,6 +7618,9 @@ static void expandAliases()
for (adi.toFirst();(s=adi.current());++adi) for (adi.toFirst();(s=adi.current());++adi)
{ {
aliasesProcessed.clear(); aliasesProcessed.clear();
// avoid expanding this command recursively
aliasesProcessed.insert(adi.currentKey(),(void *)0x8);
// expand embedded commands
*s = expandAliasesRec(*s); *s = expandAliasesRec(*s);
} }
} }
......
...@@ -1641,6 +1641,12 @@ void HtmlGenerator::writeSearchPage() ...@@ -1641,6 +1641,12 @@ void HtmlGenerator::writeSearchPage()
{ {
writeDefaultQuickLinks(t,TRUE,HLI_Search,""); writeDefaultQuickLinks(t,TRUE,HLI_Search,"");
} }
else
{
t << "<div class=\"qindex\">\n";
t << " <form class=\"search\" action=\"search.php\" "
<< "method=\"get\">\n";
}
t << "\n<?php\n\n"; t << "\n<?php\n\n";
t << "function search_results()\n"; t << "function search_results()\n";
......
...@@ -652,10 +652,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int ...@@ -652,10 +652,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
// result.data(),expr.mid(pos,len).data()); // result.data(),expr.mid(pos,len).data());
return TRUE; return TRUE;
} }
else return FALSE;
{
return FALSE;
}
} }
...@@ -2297,6 +2294,7 @@ void preprocessFile(const char *fileName,BufStr &output) ...@@ -2297,6 +2294,7 @@ void preprocessFile(const char *fileName,BufStr &output)
else else
{ {
QCString cmd = inputFilter+" \""+fileName+"\""; QCString cmd = inputFilter+" \""+fileName+"\"";
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data());
preYYin = popen(cmd,"r"); preYYin = popen(cmd,"r");
if (!preYYin) if (!preYYin)
{ {
......
...@@ -561,7 +561,7 @@ void RTFDocVisitor::visitPost(DocPara *p) ...@@ -561,7 +561,7 @@ void RTFDocVisitor::visitPost(DocPara *p)
if (m_hide) return; if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n"); DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n");
if (!p->isLast() && // omit <p> for last paragraph if (!p->isLast() && // omit <p> for last paragraph
!(p->parent() && // and for parameter sections !(p->parent() && // and for parameters & sections
p->parent()->kind()==DocNode::Kind_ParamSect p->parent()->kind()==DocNode::Kind_ParamSect
) )
) )
...@@ -728,7 +728,7 @@ void RTFDocVisitor::visitPost(DocSection *) ...@@ -728,7 +728,7 @@ void RTFDocVisitor::visitPost(DocSection *)
{ {
if (m_hide) return; if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n"); DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n");
m_t << "}" << endl; // end section m_t << "\\par}" << endl; // end section
m_lastIsPara=TRUE; m_lastIsPara=TRUE;
} }
......
...@@ -1869,7 +1869,6 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -1869,7 +1869,6 @@ IDLATTR ("["[^\]]*"]"){BN}*
} }
} }
<FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}".*|"/*"([!*]?){B}*{CMD}"}".*"*/" { <FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}".*|"/*"([!*]?){B}*{CMD}"}".*"*/" {
//handleGroupEndCommand();
closeGroup(current,yyFileName,yyLineNr); closeGroup(current,yyFileName,yyLineNr);
} }
<FindMembers>"=" { <FindMembers>"=" {
...@@ -2929,16 +2928,13 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -2929,16 +2928,13 @@ IDLATTR ("["[^\]]*"]"){BN}*
} }
} }
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>\' { <ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>\' {
*copyArgString+=yytext;
fullArgString+=yytext;
if (insidePHP) if (insidePHP)
{ {
lastCopyArgStringContext=YY_START; lastCopyArgStringContext=YY_START;
BEGIN(CopyArgPHPString); BEGIN(CopyArgPHPString);
} }
else
{
*copyArgString+=yytext;
fullArgString+=yytext;
}
} }
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSharp>\n { <ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSharp>\n {
yyLineNr++; yyLineNr++;
......
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
* | - translator_fr.h now conforms exactly to translator_en.h * | - translator_fr.h now conforms exactly to translator_en.h
* | (try: gvim -d translator_en.h translator_fr.h) * | (try: gvim -d translator_en.h translator_fr.h)
* -------------+------------------------------------------------------------ * -------------+------------------------------------------------------------
* 2005-07-12 | Update for new since 1.4.1
* -------------+------------------------------------------------------------
*/ */
#ifndef TRANSLATOR_FR_H #ifndef TRANSLATOR_FR_H
#define TRANSLATOR_FR_H #define TRANSLATOR_FR_H
...@@ -85,7 +87,7 @@ ...@@ -85,7 +87,7 @@
// Translator class (by the local maintainer) when the localized // Translator class (by the local maintainer) when the localized
// translator is made up-to-date again. // translator is made up-to-date again.
class TranslatorFrench : public TranslatorAdapter_1_4_1 class TranslatorFrench : public Translator
{ {
public: public:
...@@ -1650,6 +1652,20 @@ class TranslatorFrench : public TranslatorAdapter_1_4_1 ...@@ -1650,6 +1652,20 @@ class TranslatorFrench : public TranslatorAdapter_1_4_1
return result; return result;
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.4.1
//////////////////////////////////////////////////////////////////////////
/*! This text is added to the documentation when the \\overload command
* is used for a overloaded function.
*/
virtual QCString trOverloadText()
{
return "Ceci est une fonction membre surchargée, "
"proposée par commodité. Elle diffère de la fonction "
"çi-dessus uniquement par le(s) argument(s) qu'elle accepte.";
}
}; };
#endif #endif
...@@ -1053,6 +1053,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1053,6 +1053,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
(fileScope->getUsedClasses() && (fileScope->getUsedClasses() &&
fileScope->getUsedClasses()->count()>0)) fileScope->getUsedClasses()->count()>0))
); );
//printf("hasUsingStatements=%d\n",hasUsingStatements);
// Since it is often the case that the same name is searched in the same // Since it is often the case that the same name is searched in the same
// scope over an over again (especially for the linked source code generation) // scope over an over again (especially for the linked source code generation)
// we use a cache to collect previous results. This is possible since the // we use a cache to collect previous results. This is possible since the
...@@ -1062,7 +1063,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1062,7 +1063,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
int scopeNameLen = scope->name().length()+1; int scopeNameLen = scope->name().length()+1;
int nameLen = name.length()+1; int nameLen = name.length()+1;
int explicitPartLen = explicitScopePart.length(); int explicitPartLen = explicitScopePart.length();
int fileScopeLen = hasUsingStatements ? 1+fileScope->name().length() : 0; int fileScopeLen = hasUsingStatements ? 1+fileScope->absFilePath().length() : 0;
// below is a more efficient coding of // below is a more efficient coding of
// QCString key=scope->name()+"+"+name+"+"+explicitScopePart; // QCString key=scope->name()+"+"+name+"+"+explicitScopePart;
...@@ -1084,7 +1085,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1084,7 +1085,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
// below is a more efficient coding of // below is a more efficient coding of
// key+="+"+fileScope->name(); // key+="+"+fileScope->name();
*p++='+'; *p++='+';
qstrcpy(p,fileScope->name()); qstrcpy(p,fileScope->absFilePath());
p+=fileScopeLen-1; p+=fileScopeLen-1;
} }
*p='\0'; *p='\0';
...@@ -1097,7 +1098,8 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1097,7 +1098,8 @@ ClassDef *getResolvedClassRec(Definition *scope,
if (pTypeDef) *pTypeDef=pval->typeDef; if (pTypeDef) *pTypeDef=pval->typeDef;
//printf("] cachedMatch=%s\n", //printf("] cachedMatch=%s\n",
// pval->classDef?pval->classDef->name().data():"<none>"); // pval->classDef?pval->classDef->name().data():"<none>");
//if (pTemplSpec) printf("templSpec=%s\n",pTemplSpec->data()); //if (pTemplSpec)
// printf("templSpec=%s\n",pTemplSpec->data());
return pval->classDef; return pval->classDef;
} }
else // not found yet; we already add a 0 to avoid the possibility of else // not found yet; we already add a 0 to avoid the possibility of
...@@ -1235,7 +1237,8 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1235,7 +1237,8 @@ ClassDef *getResolvedClassRec(Definition *scope,
} }
//printf("] bestMatch=%s distance=%d\n", //printf("] bestMatch=%s distance=%d\n",
// bestMatch?bestMatch->name().data():"<none>",minDistance); // bestMatch?bestMatch->name().data():"<none>",minDistance);
//if (pTemplSpec) printf("templSpec=%s\n",pTemplSpec->data()); //if (pTemplSpec)
// printf("templSpec=%s\n",pTemplSpec->data());
return bestMatch; return bestMatch;
} }
...@@ -2660,6 +2663,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ...@@ -2660,6 +2663,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
#endif #endif
#if 0
static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templSpec) static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templSpec)
{ {
ASSERT(symbol!=0); ASSERT(symbol!=0);
...@@ -2671,7 +2675,7 @@ static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templ ...@@ -2671,7 +2675,7 @@ static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templ
ClassDef *cd = newResolveTypedef(fs,(MemberDef*)symbol,&md,&templSpec); ClassDef *cd = newResolveTypedef(fs,(MemberDef*)symbol,&md,&templSpec);
if (cd) if (cd)
{ {
return cd->qualifiedNameWithTemplateParameters(); return cd->qualifiedName()+templSpec;
} }
else if (md) else if (md)
{ {
...@@ -2680,14 +2684,28 @@ static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templ ...@@ -2680,14 +2684,28 @@ static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templ
} }
return symbol->qualifiedName(); return symbol->qualifiedName();
} }
#endif
static QCString stripDeclKeywords(const QCString &s)
{
int i=s.find(" class ");
if (i!=-1) return s.left(i)+s.mid(i+6);
i=s.find(" typename ");
if (i!=-1) return s.left(i)+s.mid(i+9);
i=s.find(" union ");
if (i!=-1) return s.left(i)+s.mid(i+6);
i=s.find(" struct ");
if (i!=-1) return s.left(i)+s.mid(i+7);
return s;
}
static QCString getCanonicalTypeForIdentifier( static QCString getCanonicalTypeForIdentifier(
Definition *d,FileDef *fs,const QCString &word, Definition *d,FileDef *fs,const QCString &word,
QCString *tSpec) QCString *tSpec)
{ {
QCString symName,scope,result,templSpec,tmpName; QCString symName,scope,result,templSpec,tmpName;
DefinitionList *defList=0; //DefinitionList *defList=0;
if (tSpec) templSpec = *tSpec; if (tSpec) templSpec = stripDeclKeywords(*tSpec);
if (word.findRev("::")!=-1 && !(tmpName=stripScope(word)).isEmpty()) if (word.findRev("::")!=-1 && !(tmpName=stripScope(word)).isEmpty())
{ {
...@@ -2698,10 +2716,12 @@ static QCString getCanonicalTypeForIdentifier( ...@@ -2698,10 +2716,12 @@ static QCString getCanonicalTypeForIdentifier(
symName=word; symName=word;
} }
#if 0 // I've commented this out because it leads to obscure errors
// while not gaining much w.r.t. speed.
if (!symName.isEmpty() && !templSpec.isEmpty() && if (!symName.isEmpty() && !templSpec.isEmpty() &&
(defList=Doxygen::symbolMap->find(symName+templSpec)) && (defList=Doxygen::symbolMap->find(symName+templSpec)) &&
defList->count()==1) // word without scope but with template specs defList->count()==1) // word without scope but with template specs
// is a unique symbol in the symbol map // is a unique symbol in the symbol map
{ {
QCString ts; QCString ts;
result = resolveSymbolName(fs,defList->first(),ts); result = resolveSymbolName(fs,defList->first(),ts);
...@@ -2710,24 +2730,33 @@ static QCString getCanonicalTypeForIdentifier( ...@@ -2710,24 +2730,33 @@ static QCString getCanonicalTypeForIdentifier(
else if (!symName.isEmpty() && else if (!symName.isEmpty() &&
(defList=Doxygen::symbolMap->find(symName)) && (defList=Doxygen::symbolMap->find(symName)) &&
defList->count()==1) // word without scope is a defList->count()==1) // word without scope is a
// unique symbol in the symbol map // unique symbol in the symbol map
{ {
QCString ts; QCString ts;
//printf("unique symName=%s\n",symName.data()); //printf("unique symName=%s templSpec=%s\n",symName.data(),templSpec.data());
result = resolveSymbolName(fs,defList->first(),ts)+templSpec; result = resolveSymbolName(fs,defList->first(),ts)+templSpec;
//printf("result=%s ts=%s\n",result.data(),ts.data());
if (tSpec) *tSpec="";
} }
else // symbol not unique, try to find the one in the right scope else // symbol not unique, try to find the one in the right scope
#endif
{ {
ClassDef *cd = 0; ClassDef *cd = 0;
MemberDef *mType = 0; MemberDef *mType = 0;
QCString ts;
if (!templSpec.isEmpty()) if (!templSpec.isEmpty())
{ {
cd = getResolvedClass(d,fs,word+templSpec,&mType,0,TRUE); cd = getResolvedClass(d,fs,word+templSpec,&mType,&ts,TRUE);
if (cd && tSpec) *tSpec=""; if (cd && tSpec) *tSpec="";
} }
if (cd==0) if (cd==0)
{ {
cd = getResolvedClass(d,fs,word,&mType,0,TRUE); cd = getResolvedClass(d,fs,word,&mType,&ts,TRUE);
}
if (!ts.isEmpty() && templSpec.isEmpty())
{
templSpec = stripDeclKeywords(ts);
} }
//printf("symbol=%s word=%s cd=%s d=%s fs=%s\n", //printf("symbol=%s word=%s cd=%s d=%s fs=%s\n",
// symName.data(), // symName.data(),
...@@ -2737,7 +2766,7 @@ static QCString getCanonicalTypeForIdentifier( ...@@ -2737,7 +2766,7 @@ static QCString getCanonicalTypeForIdentifier(
// fs?fs->name().data():"<none>" // fs?fs->name().data():"<none>"
// ); // );
//printf(">>>> word '%s' => '%s'\n",(word+templSpec).data(),cd?cd->qualifiedNameWithTemplateParameters().data():"<none>"); //printf(">>>> word '%s' => '%s' templSpec=%s ts=%s\n",(word+templSpec).data(),cd?cd->qualifiedNameWithTemplateParameters().data():"<none>",templSpec.data(),ts.data());
if (cd) // known type if (cd) // known type
{ {
//result = cd->qualifiedNameWithTemplateParameters(); //result = cd->qualifiedNameWithTemplateParameters();
...@@ -2828,7 +2857,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a ...@@ -2828,7 +2857,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
pp=p; pp=p;
} }
canType += type.right(type.length()-pp); canType += type.right(type.length()-pp);
//printf("result = %s->%s\n",type.data(),canType.data()); //printf("extractCanonicalType = %s->%s\n",type.data(),canType.data());
return removeRedundantWhiteSpace(canType); return removeRedundantWhiteSpace(canType);
} }
...@@ -2855,11 +2884,13 @@ static bool matchArgument2( ...@@ -2855,11 +2884,13 @@ static bool matchArgument2(
{ // case "unsigned int" <-> "unsigned int i" { // case "unsigned int" <-> "unsigned int i"
srcA->type+=sSrcName; srcA->type+=sSrcName;
srcA->name=""; srcA->name="";
srcA->canType=""; // invalidate cached type value
} }
else if (sDstName==srcA->type.right(sDstName.length())) else if (sDstName==srcA->type.right(sDstName.length()))
{ // case "unsigned int i" <-> "unsigned int" { // case "unsigned int i" <-> "unsigned int"
dstA->type+=sDstName; dstA->type+=sDstName;
dstA->name=""; dstA->name="";
dstA->canType=""; // invalidate cached type value
} }
if (srcA->canType.isEmpty()) if (srcA->canType.isEmpty())
...@@ -3094,11 +3125,9 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr ...@@ -3094,11 +3125,9 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
dstA->docs = srcA->docs.copy(); dstA->docs = srcA->docs.copy();
} }
//printf("Merge argument `%s|%s' `%s|%s'\n", //printf("Merge argument `%s|%s' `%s|%s'\n",
// srcA->type.data(),srcA->name.data(), // srcA->type.data(),srcA->name.data(),
// dstA->type.data(),dstA->name.data()); // dstA->type.data(),dstA->name.data());
} }
//printf("result mergeArguments `%s|%s', `%s|%s'\n",
// argListToString(srcAl).data(),argListToString(dstAl).data());
} }
/*! /*!
......
...@@ -17,7 +17,7 @@ TMAKE_CFLAGS_SHLIB = -fPIC ...@@ -17,7 +17,7 @@ TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
TMAKE_CXX = c++ TMAKE_CXX = c++
TMAKE_CXXFLAGS = $$TMAKE_CFLAGS -D__FreeBSD__ TMAKE_CXXFLAGS = $$TMAKE_CFLAGS -D__FreeBSD__=6
TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
......
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