diff options
Diffstat (limited to 'src/sqlite3gen.cpp')
-rw-r--r-- | src/sqlite3gen.cpp | 88 |
1 files changed, 30 insertions, 58 deletions
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp index 2f72221..bfbe25e 100644 --- a/src/sqlite3gen.cpp +++ b/src/sqlite3gen.cpp @@ -1421,7 +1421,7 @@ QCString getSQLDocBlock(const Definition *scope, fileName, lineNr, const_cast<Definition*>(scope), - dynamic_cast<const MemberDef*>(def), + toMemberDef(def), doc, FALSE, FALSE, @@ -1619,26 +1619,16 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref // + source references // The cross-references in initializers only work when both the src and dst // are defined. - MemberSDict *mdict = md->getReferencesMembers(); - if (mdict!=0) + auto refList = md->getReferencesMembers(); + for (const auto &rmd : refList) { - MemberSDict::IteratorDict mdi(*mdict); - const MemberDef *rmd; - for (mdi.toFirst();(rmd=mdi.current());++mdi) - { - insertMemberReference(md,rmd, "inline"); - } + insertMemberReference(md,rmd, "inline"); } // + source referenced by - mdict = md->getReferencedByMembers(); - if (mdict!=0) + auto refByList = md->getReferencedByMembers(); + for (const auto &rmd : refByList) { - MemberSDict::IteratorDict mdi(*mdict); - const MemberDef *rmd; - for (mdi.toFirst();(rmd=mdi.current());++mdi) - { - insertMemberReference(rmd,md, "inline"); - } + insertMemberReference(rmd,md, "inline"); } return; } @@ -1856,24 +1846,16 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref // + source references // The cross-references in initializers only work when both the src and dst // are defined. - MemberSDict *mdict = md->getReferencesMembers(); - if (mdict!=0) + auto refList = md->getReferencesMembers(); + for (const auto &refmd : refList) { - MemberSDict::IteratorDict mdi(*mdict); - for (mdi.toFirst();(rmd=mdi.current());++mdi) - { - insertMemberReference(md,rmd, "inline"); - } + insertMemberReference(md,refmd, "inline"); } // + source referenced by - mdict = md->getReferencedByMembers(); - if (mdict!=0) + auto refByList = md->getReferencedByMembers(); + for (const auto &refmd : refByList) { - MemberSDict::IteratorDict mdi(*mdict); - for (mdi.toFirst();(rmd=mdi.current());++mdi) - { - insertMemberReference(rmd,md, "inline"); - } + insertMemberReference(refmd,md, "inline"); } } @@ -2012,37 +1994,27 @@ static void generateSqlite3ForClass(const ClassDef *cd) step(compounddef_insert); // + list of direct super classes - if (cd->baseClasses()) + for (const auto &bcd : cd->baseClasses()) { - BaseClassListIterator bcli(*cd->baseClasses()); - const BaseClassDef *bcd; - for (bcli.toFirst();(bcd=bcli.current());++bcli) - { - struct Refid base_refid = insertRefid(bcd->classDef->getOutputFileBase()); - struct Refid derived_refid = insertRefid(cd->getOutputFileBase()); - bindIntParameter(compoundref_insert,":base_rowid", base_refid.rowid); - bindIntParameter(compoundref_insert,":derived_rowid", derived_refid.rowid); - bindIntParameter(compoundref_insert,":prot",bcd->prot); - bindIntParameter(compoundref_insert,":virt",bcd->virt); - step(compoundref_insert); - } + struct Refid base_refid = insertRefid(bcd.classDef->getOutputFileBase()); + struct Refid derived_refid = insertRefid(cd->getOutputFileBase()); + bindIntParameter(compoundref_insert,":base_rowid", base_refid.rowid); + bindIntParameter(compoundref_insert,":derived_rowid", derived_refid.rowid); + bindIntParameter(compoundref_insert,":prot",bcd.prot); + bindIntParameter(compoundref_insert,":virt",bcd.virt); + step(compoundref_insert); } // + list of direct sub classes - if (cd->subClasses()) - { - BaseClassListIterator bcli(*cd->subClasses()); - const BaseClassDef *bcd; - for (bcli.toFirst();(bcd=bcli.current());++bcli) - { - struct Refid derived_refid = insertRefid(bcd->classDef->getOutputFileBase()); - struct Refid base_refid = insertRefid(cd->getOutputFileBase()); - bindIntParameter(compoundref_insert,":base_rowid", base_refid.rowid); - bindIntParameter(compoundref_insert,":derived_rowid", derived_refid.rowid); - bindIntParameter(compoundref_insert,":prot",bcd->prot); - bindIntParameter(compoundref_insert,":virt",bcd->virt); - step(compoundref_insert); - } + for (const auto &bcd : cd->subClasses()) + { + struct Refid derived_refid = insertRefid(bcd.classDef->getOutputFileBase()); + struct Refid base_refid = insertRefid(cd->getOutputFileBase()); + bindIntParameter(compoundref_insert,":base_rowid", base_refid.rowid); + bindIntParameter(compoundref_insert,":derived_rowid", derived_refid.rowid); + bindIntParameter(compoundref_insert,":prot",bcd.prot); + bindIntParameter(compoundref_insert,":virt",bcd.virt); + step(compoundref_insert); } // + list of inner classes |