diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-10-10 19:13:27 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-10-10 19:13:27 (GMT) |
commit | 161d3860fa7f0e80edbdb2b3105e9759cada1dbb (patch) | |
tree | a1de4b4e9cdb500ec50176a1d5a70efafc4eb88f /src/code.l | |
parent | deb9b8d40d7ac7d0c576ac9401aaed9e21ccdc58 (diff) | |
download | Doxygen-161d3860fa7f0e80edbdb2b3105e9759cada1dbb.zip Doxygen-161d3860fa7f0e80edbdb2b3105e9759cada1dbb.tar.gz Doxygen-161d3860fa7f0e80edbdb2b3105e9759cada1dbb.tar.bz2 |
Release-1.3.9.1
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 38 |
1 files changed, 29 insertions, 9 deletions
@@ -843,18 +843,18 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, } } -static bool getLink(const char *className, - const char *memberName, - BaseCodeDocInterface &ol, - const char *text=0) +static bool getLinkInScope(const QCString &c, // scope + const QCString &m, // member + const char *memberText, // exact text + BaseCodeDocInterface &ol, + const char *text + ) { MemberDef *md; ClassDef *cd; FileDef *fd; NamespaceDef *nd; GroupDef *gd; - QCString m=removeRedundantWhiteSpace(memberName); - QCString c=className; //printf("Trying `%s'::`%s'\n",c.data(),m.data()); if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) && md->isLinkable()) @@ -894,14 +894,34 @@ static bool getLink(const char *className, writeMultiLineCodeLink(ol,md->getReference(), md->getOutputFileBase(), md->anchor(), - text ? text : memberName); - addToSearchIndex(text ? text : memberName); + text ? text : memberText); + addToSearchIndex(text ? text : memberText); return TRUE; } } return FALSE; } +static bool getLink(const char *className, + const char *memberName, + BaseCodeDocInterface &ol, + const char *text=0) +{ + QCString m=removeRedundantWhiteSpace(memberName); + QCString c=className; + if (!getLinkInScope(c,m,memberName,ol,text)) + { + if (!g_curClassName.isEmpty()) + { + if (!c.isEmpty()) c.prepend("::"); + c.prepend(g_curClassName); + return getLinkInScope(c,m,memberName,ol,text); + } + return FALSE; + } + return TRUE; +} + static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const char *memName) { if (mcd) @@ -1761,7 +1781,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) BEGIN( Body ); } <ClassName,ClassVar>[*&]+ { - g_type=g_curClassName; + g_type=g_curClassName.copy(); g_name.resize(0); g_code->codify(yytext); BEGIN( Body ); // variable of type struct * |