📄 memberlist.cpp
字号:
{ typeDecl.writeString(", "); } if (prevVisible) { typeDecl.disable(OutputGenerator::Man); typeDecl.writeString("\n"); // to prevent too long lines in LaTeX typeDecl.enable(OutputGenerator::Man); enumMemCount++; } } if (numVisibleEnumValues>enumValuesPerLine) { typeDecl.pushGeneratorState(); typeDecl.disableAllBut(OutputGenerator::Html); typeDecl.lineBreak(); typeDecl.popGeneratorState(); } } typeDecl.docify(" }"); md->setEnumDecl(typeDecl); } int enumVars=0; MemberListIterator vmli(*this); MemberDef *vmd; if (name[0]=='@') // anonymous enum => append variables { for ( ; (vmd=vmli.current()) ; ++vmli) { QCString vtype=vmd->typeString(); if ((vtype.find(name))!=-1) { enumVars++; vmd->setAnonymousEnumType(md); } } } // if this is an anoymous enum and there are variable of this // enum type (i.e. enumVars>0), then we do not show the enum here. if (enumVars==0) // show enum here { ol.startMemberItem(0); ol.writeString("enum "); ol.insertMemberAlign(); ol+=typeDecl; // append the enum values. ol.endMemberItem(FALSE); if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); parseDoc(ol, md->getDefFileName(),md->getDefLine(), cd?cd->name().data():0,md->name().data(), md->briefDescription() ); if (md->isDetailedSectionLinkable()) { ol.disableAllBut(OutputGenerator::Html); ol.endEmphasis(); ol.docify(" "); if (md->getGroupDef()!=0 && gd==0) // forward link to group { ol.startTextLink(md->getGroupDef()->getOutputFileBase(), md->anchor()); } else { ol.startTextLink(0,md->anchor()); } parseText(ol,theTranslator->trMore()); ol.endTextLink(); ol.startEmphasis(); ol.enableAll(); } ol.endMemberDescription(); } } md->warnIfUndocumented(); break; } case MemberDef::Friend: {#if 0 //printf("Writing friend `%s'\n",md->name().data()); QCString type=md->typeString(); //printf("Friend: type=%s name=%s\n",type.data(),md->name().data()); bool isFriendClass = type=="friend class"; if (!isFriendClass) {#endif if (first) ol.startMemberList(),first=FALSE; md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);#if 0 } else // isFriendClass // friend is undocumented as a member but it is a class, // so generate a link to the class if that is documented. { ClassDef *cd=getClass(md->name()); if (md->hasDocumentation()) // friend is documented { if (first) ol.startMemberList(),first=FALSE; ol.startMemberItem(0); ol.docify("class "); ol.insertMemberAlign(); ol.writeObjectLink(0,0,md->anchor(),md->name()); ol.endMemberItem(FALSE); } else if (cd && cd->isLinkable()) // class is documented { if (first) ol.startMemberList(),first=FALSE; ol.startMemberItem(0); ol.docify("class "); ol.insertMemberAlign(); ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()); ol.endMemberItem(FALSE); } else if (!Config_getBool("HIDE_UNDOC_MEMBERS")) // no documentation { if (first) ol.startMemberList(),first=FALSE; ol.startMemberItem(0); ol.docify("class "); ol.insertMemberAlign(); ol.startBold(); ol.docify(md->name()); ol.endBold(); ol.endMemberItem(FALSE); } }#endif break; } case MemberDef::EnumValue: break; } } // handle members that are inside anonymous compounds and for which // no variables of the anonymous compound type exist. if (cd) { MemberListIterator mli(*this); for ( ; (md=mli.current()) ; ++mli ) { if (md->fromAnonymousScope() && !md->anonymousDeclShown()) { //printf("anonymous compound members\n"); if (first) ol.startMemberList(),first=FALSE; md->setFromAnonymousScope(FALSE); md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); md->setFromAnonymousScope(TRUE); } } } if (!first) ol.endMemberList(); ol.popGeneratorState(); //printf("----- end writePlainDeclaration() ----\n");}void MemberList::writeDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, const char *title,const char *subtitle /*, bool inGroup,bool countSubGroups*/){ //printf("MemberList::writeDeclaration(title=`%s',subtitle=`%s')\n",title,subtitle); //printf("----- writeDeclaration() ----\n"); countDecMembers(); // count member not in group if (numDecMembers()==0) return; if (title) { ol.startMemberHeader(); parseText(ol,title); ol.endMemberHeader(); } if (subtitle && subtitle[0]!=0) { //printf("subtitle=`%s'\n",subtitle); ol.startMemberSubtitle(); parseDoc(ol,"<generated>",1,0,0,subtitle); ol.endMemberSubtitle(); } writePlainDeclarations(ol,cd,nd,fd,gd); //printf("memberGroupList=%p\n",memberGroupList); if (memberGroupList) { MemberGroupListIterator mgli(*memberGroupList); MemberGroup *mg; while ((mg=mgli.current())) { bool hasHeader=mg->header()!="[NOHEADER]"; ol.startMemberGroupHeader(hasHeader); if (hasHeader) { parseText(ol,mg->header()); } ol.endMemberGroupHeader(); if (!mg->documentation().isEmpty()) { //printf("Member group has docs!\n"); ol.startMemberGroupDocs(); parseDoc(ol,"<generated>",1,0,0,mg->documentation()); ol.endMemberGroupDocs(); } ol.startMemberGroup(); //printf("--- mg->writePlainDeclarations ---\n"); mg->writePlainDeclarations(ol,cd,nd,fd,gd); ol.endMemberGroup(hasHeader); ++mgli; } } //printf("----- end writeDeclaration() ----\n");}void MemberList::writeDocumentation(OutputList &ol, const char *scopeName, Definition *container, const char *title){ //printf("MemberList::writeDocumentation()\n"); countDocMembers(); if (numDocMembers()==0) return; if (title) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,title); ol.endGroupHeader(); } MemberListIterator mli(*this); MemberDef *md; for ( ; (md=mli.current()) ; ++mli) { md->writeDocumentation(this,ol,scopeName,container,m_inGroup); } if (memberGroupList) { //printf("MemberList::writeDocumentation() -- member groups\n"); MemberGroupListIterator mgli(*memberGroupList); MemberGroup *mg; for (;(mg=mgli.current());++mgli) { mg->writeDocumentation(ol,scopeName,container); } }}void MemberList::addMemberGroup(MemberGroup *mg){ if (memberGroupList==0) { memberGroupList=new MemberGroupList; } memberGroupList->append(mg);}void MemberList::addListReferences(Definition *def){ MemberListIterator mli(*this); MemberDef *md; for ( ; (md=mli.current()) ; ++mli) { if (md->getGroupDef()==0 || def->definitionType()==Definition::TypeGroup) { md->addListReference(def); } } if (memberGroupList) { MemberGroupListIterator mgli(*memberGroupList); MemberGroup *mg; for (;(mg=mgli.current());++mgli) { mg->addListReferences(def); } }}//--------------------------------------------------------------------------int MemberSDict::compareItems(GCI item1, GCI item2){ MemberDef *c1=(MemberDef *)item1; MemberDef *c2=(MemberDef *)item2; return stricmp(c1->name(),c2->name());}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -