diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-02-24 18:57:25 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-02-24 18:57:25 (GMT) |
commit | c7bc295f92f56d1dea369663e058933f550a0187 (patch) | |
tree | 81d72027898b1a75221b9ca82b04075277821a9f /src/doxygen.cpp | |
parent | 9793ce49f1d7641854ef0608b34c1dd2d4891a20 (diff) | |
download | Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.zip Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.gz Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.bz2 |
Release-1.2.14-20020224
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 89 |
1 files changed, 88 insertions, 1 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 1168e25..1363348 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -2153,6 +2153,7 @@ static void transferFunctionDocumentation() matchArguments(mdef->argumentList(),mdec->argumentList()) ) /* match found */ { + /* FIX: Always match declaration and definition. FileDef *fdef = mdef->getFileDef(); FileDef *fdec = mdec->getFileDef(); @@ -2161,6 +2162,7 @@ static void transferFunctionDocumentation() fdef==fdec || (fdef!=0 && (!fdef->hasDocumentation() || !fdec->hasDocumentation())) ) + */ { //printf("Found member %s: definition in %s (doc=%d) and declation in %s (doc=%d)\n", // mn->memberName(), @@ -2221,6 +2223,90 @@ static void transferFunctionDocumentation() //---------------------------------------------------------------------- +static void transferFunctionReferences() +{ + MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); + MemberName *mn; + for (;(mn=mnli.current());++mnli) + { + MemberDef *md,*mdef=0,*mdec=0; + MemberNameIterator mni(*mn); + /* find a matching function declaration and definition for this function */ + for (;(md=mni.current());++mni) + { + if (md->isPrototype()) + mdec=md; + else if (md->isVariable() && md->isExternal()) + mdec=md; + + if (md->isFunction() && !md->isStatic() && !md->isPrototype()) + mdef=md; + else if (md->isVariable() && !md->isExternal() && !md->isStatic()) + mdef=md; + } + if (mdef && mdec && + matchArguments(mdef->argumentList(),mdec->argumentList()) + ) /* match found */ + { + MemberSDict *defDict = mdef->getReferencesMembers(); + MemberSDict *decDict = mdec->getReferencesMembers(); + if (defDict) + { + MemberSDict::Iterator msdi(*defDict); + MemberDef *rmd; + for (msdi.toFirst();(rmd=msdi.current());++msdi) + { + if (decDict==0 || decDict->find(rmd->name())==0) + { + mdec->addSourceReferences(rmd); + } + } + } + if (decDict) + { + MemberSDict::Iterator msdi(*decDict); + MemberDef *rmd; + for (msdi.toFirst();(rmd=msdi.current());++msdi) + { + if (defDict==0 || defDict->find(rmd->name())==0) + { + mdef->addSourceReferences(rmd); + } + } + } + + defDict = mdef->getReferencedByMembers(); + decDict = mdec->getReferencedByMembers(); + if (defDict) + { + MemberSDict::Iterator msdi(*defDict); + MemberDef *rmd; + for (msdi.toFirst();(rmd=msdi.current());++msdi) + { + if (decDict==0 || decDict->find(rmd->name())==0) + { + mdec->addSourceReferencedBy(rmd); + } + } + } + if (decDict) + { + MemberSDict::Iterator msdi(*decDict); + MemberDef *rmd; + for (msdi.toFirst();(rmd=msdi.current());++msdi) + { + if (defDict==0 || defDict->find(rmd->name())==0) + { + mdef->addSourceReferencedBy(rmd); + } + } + } + } + } +} + +//---------------------------------------------------------------------- + static void transferRelatedFunctionDocumentation() { // find match between function declaration and definition for @@ -4010,7 +4096,7 @@ static void findMember(Entry *root, warn_cont(" "); if (md->typeString()) { - warn_cont("%s",md->typeString()); + warn_cont("%s ",md->typeString()); } warn_cont("%s::%s%s\n", cd->name().data(), @@ -7198,6 +7284,7 @@ void generateOutput() msg("Generating file sources...\n"); generateFileSources(); + transferFunctionReferences(); msg("Generating file documentation...\n"); generateFileDocs(); |