void GroupDef::writeBriefDescription(OutputList &ol) { if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC)) { DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.writeString(" \n"); ol.enable(OutputGenerator::RTF); if (Config_getBool(REPEAT_BRIEF) || !documentation().isEmpty() ) { ol.disableAllBut(OutputGenerator::Html); ol.startTextLink(0,"details"); ol.parseText(theTranslator->trMore()); ol.endTextLink(); } ol.popGeneratorState(); ol.endParagraph(); } delete rootNode; } }
void NamespaceDef::writeBriefDescription(OutputList &ol) { if (hasBriefDescription()) { DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.writeString(" \n"); ol.enable(OutputGenerator::RTF); if (hasDetailedDescription()) { ol.disableAllBut(OutputGenerator::Html); ol.startTextLink(0,"details"); ol.parseText(theTranslator->trMore()); ol.endTextLink(); } ol.popGeneratorState(); ol.endParagraph(); } delete rootNode; // FIXME:PARA //ol.pushGeneratorState(); //ol.disable(OutputGenerator::RTF); //ol.newParagraph(); //ol.popGeneratorState(); } ol.writeSynopsis(); }
void MemberList::writePlainDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd, GroupDef *gd, const DefinitionIntf::DefType compoundType, ClassDef *inheritedFrom,const char *inheritId ) { //printf("----- writePlainDeclaration() ----\n"); countDecMembers(); if (numDecMembers()==0) { //printf(" --> no members!\n"); return; // no members in this list } //printf(" --> writePlainDeclaration() numDecMembers()=%d\n", // numDecMembers()); ol.pushGeneratorState(); bool first=TRUE; MemberDef *md; MemberListIterator mli(*this); for ( ; (md=mli.current()); ++mli ) { //printf(">>> Member `%s' type=%d visible=%d\n", // md->name().data(),md->memberType(),md->isBriefSectionVisible()); if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) && md->isBriefSectionVisible()) { //printf(">>> rendering\n"); switch(md->memberType()) { case MemberType_Define: // fall through //case MemberType_Prototype: // fall through case MemberType_Typedef: // fall through case MemberType_Variable: // fall through case MemberType_Function: // fall through case MemberType_Signal: // fall through case MemberType_Slot: // fall through case MemberType_DCOP: // fall through case MemberType_Property: // fall through case MemberType_Interface: // fall through case MemberType_Service: // fall through case MemberType_Event: { if (first) ol.startMemberList(),first=FALSE; md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId); break; } case MemberType_Enumeration: { int enumVars=0; MemberListIterator vmli(*this); MemberDef *vmd; QCString name(md->name()); int i=name.findRev("::"); if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?) 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 anonymous enum and there are variables of this // enum type (i.e. enumVars>0), then we do not show the enum here. if (enumVars==0) // show enum here { //printf("Enum!!\n"); if (first) { ol.startMemberList(); first=FALSE; } ol.startMemberDeclaration(); ol.startMemberItem(md->anchor(),0,inheritId); bool detailsLinkable = md->isDetailedSectionLinkable(); if (!detailsLinkable) { ol.startDoxyAnchor(md->getOutputFileBase(),0,md->anchor(),md->name(),QCString()); } ol.writeString("enum "); ol.insertMemberAlign(); md->writeEnumDeclaration(ol,cd,nd,fd,gd,compoundType); if (!detailsLinkable) { ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor()); } ol.endMemberItem(); if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { DocRoot *rootNode = validatingParseDoc( md->briefFile(),md->briefLine(), cd,md, md->briefDescription(), TRUE,FALSE,0,TRUE,FALSE ); if (rootNode && !rootNode->isEmpty()) { ol.startMemberDescription(md->anchor()); ol.writeDoc(rootNode,cd,md); if (md->isDetailedSectionLinkable()) { ol.disableAllBut(OutputGenerator::Html); ol.docify(" "); ol.startTextLink(md->getOutputFileBase(), md->anchor()); ol.parseText(theTranslator->trMore()); ol.endTextLink(); ol.enableAll(); } ol.endMemberDescription(); } delete rootNode; } ol.endMemberDeclaration(md->anchor(),inheritId); } md->warnIfUndocumented(); break; } case MemberType_Friend: if (inheritedFrom==0) { if (first) { ol.startMemberList(); first=FALSE; } md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId); break; } case MemberType_EnumValue: { if (m_inGroup) { //printf("EnumValue!\n"); if (first) ol.startMemberList(),first=FALSE; md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId); } } 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()) { md->setFromAnonymousScope(FALSE); //printf("anonymous compound members\n"); if (md->isBriefSectionVisible()) { if (first) { ol.startMemberList(); first=FALSE; } md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType); } md->setFromAnonymousScope(TRUE); } } } if (!first) { ol.endMemberList(); } ol.popGeneratorState(); //printf("----- end writePlainDeclaration() ----\n"); }
void MemberList::writePlainDeclarations(OutputList &ol, const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd, const GroupDef *gd,const ClassDef *inheritedFrom,const char *inheritId ) const { //printf("----- writePlainDeclaration() ----\n"); static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS); if (numDecMembers()==-1) { err("MemberList::numDecMembers()==-1, so the members of this list have not been counted. Please report as a bug.\n"); abort(); } if (numDecMembers()<=numDecEnumValues()) { //printf(" --> no members!\n"); return; // no members in this list } //printf(" --> writePlainDeclaration() numDecMembers()=%d\n", // numDecMembers()); ol.pushGeneratorState(); bool first=TRUE; const MemberDef *md; MemberListIterator mli(*this); for ( ; (md=mli.current()); ++mli ) { //printf(">>> Member `%s' type=%d visible=%d\n", // md->name().data(),md->memberType(),md->isBriefSectionVisible()); if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) && md->isBriefSectionVisible()) { //printf(">>> rendering\n"); switch(md->memberType()) { case MemberType_Define: // fall through //case MemberType_Prototype: // fall through case MemberType_Typedef: // fall through case MemberType_Variable: // fall through case MemberType_Function: // fall through case MemberType_Signal: // fall through case MemberType_Slot: // fall through case MemberType_DCOP: // fall through case MemberType_Property: // fall through case MemberType_Interface: // fall through case MemberType_Service: // fall through case MemberType_Sequence: // fall through case MemberType_Dictionary: // fall through case MemberType_Event: { if (first) ol.startMemberList(),first=FALSE; md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); break; } case MemberType_Enumeration: { // if this is an anonymous enum and there are variables of this // enum type (i.e. enumVars>0), then we do not show the enum here. if (countEnumValues(md)==0) // show enum here { //printf("Enum!!\n"); if (first) { ol.startMemberList(); first=FALSE; } ol.startMemberDeclaration(); ol.startMemberItem(md->anchor(),0,inheritId); bool detailsLinkable = md->isDetailedSectionLinkable(); if (!detailsLinkable) { ol.startDoxyAnchor(md->getOutputFileBase(),0,md->anchor(),md->name(),QCString()); } if (md->isSliceLocal()) { ol.writeString("local "); } ol.writeString("enum "); ol.insertMemberAlign(); md->writeEnumDeclaration(ol,cd,nd,fd,gd); if (!detailsLinkable) { ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor()); } ol.endMemberItem(); if (!md->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC)) { DocRoot *rootNode = validatingParseDoc( md->briefFile(),md->briefLine(), cd,md, md->briefDescription(), TRUE,FALSE,0,TRUE,FALSE ); if (rootNode && !rootNode->isEmpty()) { ol.startMemberDescription(md->anchor()); ol.writeDoc(rootNode,cd,md); if (md->isDetailedSectionLinkable()) { ol.disableAllBut(OutputGenerator::Html); ol.docify(" "); ol.startTextLink(md->getOutputFileBase(), md->anchor()); ol.parseText(theTranslator->trMore()); ol.endTextLink(); ol.enableAll(); } ol.endMemberDescription(); } delete rootNode; } ol.endMemberDeclaration(md->anchor(),inheritId); } md->warnIfUndocumented(); break; } case MemberType_Friend: if (inheritedFrom==0) { if (first) { ol.startMemberList(); first=FALSE; } md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); break; } case MemberType_EnumValue: { if (m_inGroup) { //printf("EnumValue!\n"); if (first) ol.startMemberList(),first=FALSE; md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); } } 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()) { md->setFromAnonymousScope(FALSE); //printf("anonymous compound members\n"); if (md->isBriefSectionVisible()) { if (first) { ol.startMemberList(); first=FALSE; } md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); } md->setFromAnonymousScope(TRUE); } } } if (!first) { ol.endMemberList(); } ol.popGeneratorState(); //printf("----- end writePlainDeclaration() ----\n"); }