1 /****************************************************************************** |
1 /****************************************************************************** |
2 * |
2 * |
3 * |
3 * |
4 * |
4 * |
5 * Copyright (C) 1997-2008 by Dimitri van Heesch. |
5 * Copyright (C) 1997-2010 by Dimitri van Heesch. |
6 * |
6 * |
7 * Permission to use, copy, modify, and distribute this software and its |
7 * Permission to use, copy, modify, and distribute this software and its |
8 * documentation under the terms of the GNU General Public License is hereby |
8 * documentation under the terms of the GNU General Public License is hereby |
9 * granted. No representations are made about the suitability of this software |
9 * granted. No representations are made about the suitability of this software |
10 * for any purpose. It is provided "as is" without express or implied warranty. |
10 * for any purpose. It is provided "as is" without express or implied warranty. |
377 void ClassDef::internalInsertMember(MemberDef *md, |
377 void ClassDef::internalInsertMember(MemberDef *md, |
378 Protection prot, |
378 Protection prot, |
379 bool addToAllList |
379 bool addToAllList |
380 ) |
380 ) |
381 { |
381 { |
382 //printf("%p:insertInternalMember(%s) isHidden()=%d\n", this, md->name().data(),md->isHidden()); |
382 //printf("insertInternalMember(%s) isHidden()=%d\n",md->name().data(),md->isHidden()); |
383 if (md->isHidden()) return; |
383 if (md->isHidden()) return; |
384 |
384 |
385 if (!isReference()) |
385 if (!isReference()) |
386 { |
386 { |
387 static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); |
387 static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); |
1377 ol.endGroupHeader(); |
1377 ol.endGroupHeader(); |
1378 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); |
1378 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); |
1379 ol.popGeneratorState(); |
1379 ol.popGeneratorState(); |
1380 } |
1380 } |
1381 |
1381 |
|
1382 |
|
1383 void ClassDef::writeSummaryLinks(OutputList &ol) |
|
1384 { |
|
1385 ol.pushGeneratorState(); |
|
1386 ol.disableAllBut(OutputGenerator::Html); |
|
1387 QListIterator<LayoutDocEntry> eli( |
|
1388 LayoutDocManager::instance().docEntries(LayoutDocManager::Class)); |
|
1389 LayoutDocEntry *lde; |
|
1390 bool first=TRUE; |
|
1391 for (eli.toFirst();(lde=eli.current());++eli) |
|
1392 { |
|
1393 if (lde->kind()==LayoutDocEntry::ClassNestedClasses && |
|
1394 m_impl->innerClasses && |
|
1395 m_impl->innerClasses->declVisible() |
|
1396 ) |
|
1397 { |
|
1398 LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; |
|
1399 writeSummaryLink(ol,"nested-classes",ls->title,first); |
|
1400 } |
|
1401 else if (lde->kind()== LayoutDocEntry::MemberDecl) |
|
1402 { |
|
1403 LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; |
|
1404 MemberList * ml = getMemberList(lmd->type); |
|
1405 if (ml && ml->declVisible()) |
|
1406 { |
|
1407 writeSummaryLink(ol,ml->listTypeAsString(),lmd->title,first); |
|
1408 } |
|
1409 } |
|
1410 } |
|
1411 if (!first) |
|
1412 { |
|
1413 ol.writeString(" </div>\n"); |
|
1414 } |
|
1415 ol.popGeneratorState(); |
|
1416 } |
|
1417 |
1382 // write all documentation for this class |
1418 // write all documentation for this class |
1383 void ClassDef::writeDocumentation(OutputList &ol) |
1419 void ClassDef::writeDocumentation(OutputList &ol) |
1384 { |
1420 { |
1385 static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); |
1421 static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); |
1386 static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); |
1422 static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); |
1411 if (getOuterScope()!=Doxygen::globalScope) |
1447 if (getOuterScope()!=Doxygen::globalScope) |
1412 { |
1448 { |
1413 writeNavigationPath(ol); |
1449 writeNavigationPath(ol); |
1414 } |
1450 } |
1415 ol.endQuickIndices(); |
1451 ol.endQuickIndices(); |
1416 ol.startContents(); |
1452 |
1417 startTitle(ol,getOutputFileBase()); |
1453 startTitle(ol,getOutputFileBase(),this); |
1418 ol.parseText(pageTitle); |
1454 ol.parseText(pageTitle); |
1419 addGroupListToTitle(ol,this); |
1455 addGroupListToTitle(ol,this); |
1420 endTitle(ol,getOutputFileBase(),name()); |
1456 endTitle(ol,getOutputFileBase(),name()); |
|
1457 ol.startContents(); |
1421 |
1458 |
1422 { |
1459 { |
1423 ol.pushGeneratorState(); |
1460 ol.pushGeneratorState(); |
1424 ol.disableAllBut(OutputGenerator::Html); |
1461 ol.disableAllBut(OutputGenerator::Html); |
1425 ol.writeString("<!-- doxytag: class=\""); |
1462 ol.writeString("<!-- doxytag: class=\""); |
1686 startFile(ol,memListFile,memListFile, |
1723 startFile(ol,memListFile,memListFile, |
1687 theTranslator->trMemberList(),HLI_ClassVisible); |
1724 theTranslator->trMemberList(),HLI_ClassVisible); |
1688 startTitle(ol,0); |
1725 startTitle(ol,0); |
1689 ol.parseText(displayName()+" "+theTranslator->trMemberList()); |
1726 ol.parseText(displayName()+" "+theTranslator->trMemberList()); |
1690 endTitle(ol,0,0); |
1727 endTitle(ol,0,0); |
|
1728 ol.startContents(); |
1691 ol.parseText(theTranslator->trThisIsTheListOfAllMembers()); |
1729 ol.parseText(theTranslator->trThisIsTheListOfAllMembers()); |
1692 ol.writeObjectLink(getReference(),getOutputFileBase(),0,displayName()); |
1730 ol.writeObjectLink(getReference(),getOutputFileBase(),0,displayName()); |
1693 ol.parseText(theTranslator->trIncludingInheritedMembers()); |
1731 ol.parseText(theTranslator->trIncludingInheritedMembers()); |
1694 |
1732 |
1695 //ol.startItemList(); |
1733 //ol.startItemList(); |
3246 void ClassDef::addMemberToList(MemberList::ListType lt,MemberDef *md,bool isBrief) |
3284 void ClassDef::addMemberToList(MemberList::ListType lt,MemberDef *md,bool isBrief) |
3247 { |
3285 { |
3248 static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); |
3286 static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); |
3249 static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); |
3287 static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); |
3250 MemberList *ml = createMemberList(lt); |
3288 MemberList *ml = createMemberList(lt); |
3251 /* |
|
3252 if (Config_getBool("PREPROCESS_INCLUDES")) { |
|
3253 // If we are preprocessing the #included files we might have seen |
|
3254 // this member more than once so we |
|
3255 // only add a member where one did not exist before |
|
3256 MemberListIterator mli(*ml); |
|
3257 MemberDef *cmd; |
|
3258 for (mli.toFirst(); (cmd = mli.current()); ++mli) { |
|
3259 if (strcmp(md->declaration(), cmd->declaration()) == 0) { |
|
3260 //if (md->anchor() == cmd->anchor()) { |
|
3261 printf("ClassDef::addMemberToList() rejecting duplicate %d \"%s::%s\"\n", md->memberType(), name().data(), md->declaration() ? md->declaration() : ""); |
|
3262 // TODO: Delete md to avoid memory leak??? |
|
3263 // But some callers still use md after it has been inserted... |
|
3264 return; |
|
3265 } |
|
3266 } |
|
3267 } |
|
3268 printf("ClassDef::addMemberToList() adding %d, \"%s::%s\"\n", md->memberType(), name().data(), md->declaration() ? md->declaration() : ""); |
|
3269 */ |
|
3270 if (( isBrief && sortBriefDocs ) || |
3289 if (( isBrief && sortBriefDocs ) || |
3271 (!isBrief && sortMemberDocs) |
3290 (!isBrief && sortMemberDocs) |
3272 ) |
3291 ) |
3273 ml->inSort(md); |
3292 ml->inSort(md); |
3274 else |
3293 else |