summaryrefslogtreecommitdiffstats
path: root/src/defgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-10-19 18:44:40 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-10-20 11:51:24 (GMT)
commitd03e8d9411ab3e983fc3413c147fba1a5e5c9dad (patch)
treed834ff826fdf72e526b3bac2772006583535766c /src/defgen.cpp
parent33b0f4d25dff25b0e50d62eff68155106e88d58d (diff)
downloadDoxygen-d03e8d9411ab3e983fc3413c147fba1a5e5c9dad.zip
Doxygen-d03e8d9411ab3e983fc3413c147fba1a5e5c9dad.tar.gz
Doxygen-d03e8d9411ab3e983fc3413c147fba1a5e5c9dad.tar.bz2
Refactoring: modernize TooltipManager class and source reference lists
- Tooltips are now collected per file instead of globally - Source reference lists now use STL containers
Diffstat (limited to 'src/defgen.cpp')
-rw-r--r--src/defgen.cpp99
1 files changed, 43 insertions, 56 deletions
diff --git a/src/defgen.cpp b/src/defgen.cpp
index b01d438..82f7c26 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -243,71 +243,58 @@ void generateDEFForMember(MemberDef *md,
//printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
- MemberSDict *mdict = md->getReferencesMembers();
- if (mdict)
+ QCString refPrefix = " " + memPrefix + "ref-";
+ auto refList = md->getReferencesMembers();
+ for (const auto &rmd : refList)
{
- MemberSDict::Iterator mdi(*mdict);
- MemberDef *rmd;
- QCString refPrefix = " " + memPrefix + "ref-";
-
- for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
- if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
+ t << memPrefix << "referenceto = {" << endl;
+ t << refPrefix << "id = '"
+ << rmd->getBodyDef()->getOutputFileBase()
+ << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
+ << rmd->anchor() << "';" << endl;
+
+ t << refPrefix << "line = '"
+ << rmd->getStartBodyLine() << "';" << endl;
+
+ QCString scope = rmd->getScopeString();
+ QCString name = rmd->name();
+ if (!scope.isEmpty() && scope!=def->name())
{
- t << memPrefix << "referenceto = {" << endl;
- t << refPrefix << "id = '"
- << rmd->getBodyDef()->getOutputFileBase()
- << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
- << rmd->anchor() << "';" << endl;
-
- t << refPrefix << "line = '"
- << rmd->getStartBodyLine() << "';" << endl;
-
- QCString scope = rmd->getScopeString();
- QCString name = rmd->name();
- if (!scope.isEmpty() && scope!=def->name())
- {
- name.prepend(scope+"::");
- }
-
- t << refPrefix << "name = ";
- writeDEFString(t,name);
- t << ';' << endl << " };" << endl;
+ name.prepend(scope+"::");
}
- } /* for (mdi.toFirst...) */
+
+ t << refPrefix << "name = ";
+ writeDEFString(t,name);
+ t << ';' << endl << " };" << endl;
+ }
}
- mdict = md->getReferencedByMembers();
- if (mdict)
+ auto refByList = md->getReferencedByMembers();
+ for (const auto &rmd : refByList)
{
- MemberSDict::Iterator mdi(*mdict);
- MemberDef *rmd;
- QCString refPrefix = " " + memPrefix + "ref-";
-
- for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
- if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
+ t << memPrefix << "referencedby = {" << endl;
+ t << refPrefix << "id = '"
+ << rmd->getBodyDef()->getOutputFileBase()
+ << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
+ << rmd->anchor() << "';" << endl;
+
+ t << refPrefix << "line = '"
+ << rmd->getStartBodyLine() << "';" << endl;
+
+ QCString scope = rmd->getScopeString();
+ QCString name = rmd->name();
+ if (!scope.isEmpty() && scope!=def->name())
{
- t << memPrefix << "referencedby = {" << endl;
- t << refPrefix << "id = '"
- << rmd->getBodyDef()->getOutputFileBase()
- << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
- << rmd->anchor() << "';" << endl;
-
- t << refPrefix << "line = '"
- << rmd->getStartBodyLine() << "';" << endl;
-
- QCString scope = rmd->getScopeString();
- QCString name = rmd->name();
- if (!scope.isEmpty() && scope!=def->name())
- {
- name.prepend(scope+"::");
- }
-
- t << refPrefix << "name = ";
- writeDEFString(t,name);
- t << ';' << endl << " };" << endl;
+ name.prepend(scope+"::");
}
- } /* for (mdi.toFirst...) */
+
+ t << refPrefix << "name = ";
+ writeDEFString(t,name);
+ t << ';' << endl << " };" << endl;
+ }
}
t << " }; /* " << Prefix << "-member */" << endl;