本文整理汇总了C++中OutputList::pushGeneratorState方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputList::pushGeneratorState方法的具体用法?C++ OutputList::pushGeneratorState怎么用?C++ OutputList::pushGeneratorState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputList
的用法示例。
在下文中一共展示了OutputList::pushGeneratorState方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generateDirDocs
void generateDirDocs(OutputList &ol)
{
DirDef *dir;
DirSDict::Iterator sdi(*Doxygen::directories);
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
ol.pushGeneratorState();
if (!dir->hasDocumentation())
{
ol.disableAllBut(OutputGenerator::Html);
}
dir->writeDocumentation(ol);
ol.popGeneratorState();
}
if (Config_getBool(DIRECTORY_GRAPH))
{
SDict<DirRelation>::Iterator rdi(Doxygen::dirRelations);
DirRelation *dr;
for (rdi.toFirst();(dr=rdi.current());++rdi)
{
dr->writeDocumentation(ol);
}
}
}
示例2: writeSummaryLinks
void NamespaceDef::writeSummaryLinks(OutputList &ol)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace));
LayoutDocEntry *lde;
bool first=TRUE;
for (eli.toFirst();(lde=eli.current());++eli)
{
if ((lde->kind()==LayoutDocEntry::NamespaceClasses && classSDict && classSDict->declVisible()) ||
(lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaceSDict && namespaceSDict->declVisible())
)
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
QCString label = lde->kind()==LayoutDocEntry::NamespaceClasses ? "nested-classes" : "namespaces";
ol.writeSummaryLink(0,label,ls->title,first);
first=FALSE;
}
else if (lde->kind()== LayoutDocEntry::MemberDecl)
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title,first);
first=FALSE;
}
}
}
if (!first)
{
ol.writeString(" </div>\n");
}
ol.popGeneratorState();
}
示例3: writeDeclarations
/** Writes the list of members to the output.
* @param ol Output list to write to
* @param cd non-null if this list is part of class documentation.
* @param nd non-null if this list is part of namespace documentation.
* @param fd non-null if this list is part of file documentation.
* @param gd non-null if this list is part of group documentation.
* @param title Title to use for the member list.
* @param subtitle Sub title to use for the member list.
* @param compoundType Container type for this member list.
* @param showEnumValues Obsolete, always set to FALSE.
* @param showInline if set to TRUE if title is rendered differently
* @param inheritedFrom if not 0, the list is shown inside the
* given class as inherited members, parameter cd points to the
* class containing the members.
* @param lt Type of list that is inherited from.
*/
void MemberList::writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle,
const DefinitionIntf::DefType compoundType,bool showEnumValues,
bool showInline,ClassDef *inheritedFrom,MemberListType lt)
{
(void)showEnumValues; // unused
//printf("----- writeDeclaration() this=%p ---- inheritedFrom=%p\n",this,inheritedFrom);
static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
QCString inheritId;
countDecMembers(/*showEnumValues*/FALSE,gd); // count members shown in this section
Definition *ctx = cd;
if (ctx==0 && nd) ctx = nd;
if (ctx==0 && gd) ctx = gd;
if (ctx==0 && fd) ctx = fd;
//printf("%p: MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d inheritedFrom=%p\n",
// this,title,subtitle,numDecMembers(),inheritedFrom);
int num = numDecMembers();
if (inheritedFrom)
{
//if ( cd && !optimizeVhdl && countInheritableMembers(inheritedFrom)>0 )
if ( cd && !optimizeVhdl && cd->countMembersIncludingGrouped(
m_listType,inheritedFrom,TRUE)>0 )
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
inheritId = substitute(listTypeAsString(lt),"-","_")+"_"+
stripPath(cd->getOutputFileBase());
if (title)
{
ol.writeInheritedSectionTitle(inheritId,cd->getReference(),
cd->getOutputFileBase(),
cd->anchor(),title,cd->displayName());
}
ol.popGeneratorState();
}
}
else if (num>0)
{
if (title)
{
if (showInline)
{
ol.startInlineHeader();
}
else
{
ol.startMemberHeader(listTypeAsString(m_listType));
}
ol.parseText(title);
if (showInline)
{
ol.endInlineHeader();
}
else
{
ol.endMemberHeader();
}
}
if (subtitle)
{
QCString st=subtitle;
st = st.stripWhiteSpace();
if (!st.isEmpty())
{
ol.startMemberSubtitle();
ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,0,FALSE,FALSE);
ol.endMemberSubtitle();
}
}
}
if (num>0)
{
// TODO: Two things need to be worked out for proper VHDL output:
// 1. Signals and types under the group need to be
// formatted to associate them with the group somehow
// indentation, or at the very least, extra space after
// the group is done
// 2. This might need to be repeated below for memberGroupLists
if (optimizeVhdl) // use specific declarations function
//.........这里部分代码省略.........
示例4: writePlainDeclarations
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
//.........这里部分代码省略.........
示例5: writeDocumentation
void PageDef::writeDocumentation(OutputList &ol)
{
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
//outputList->disable(OutputGenerator::Man);
QCString pageName,manPageName;
pageName = escapeCharsInString(name(),FALSE,TRUE);
manPageName = escapeCharsInString(name(),TRUE,TRUE);
//printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data());
ol.pushGeneratorState();
//1.{
if (m_nestingLevel>0
//&& // a sub page
//(Doxygen::mainPage==0 || getOuterScope()!=Doxygen::mainPage) // and not a subpage of the mainpage
)
{
// do not generate sub page output for RTF and LaTeX, as these are
// part of their parent page
ol.disableAll();
ol.enable(OutputGenerator::Man);
ol.enable(OutputGenerator::Html);
}
ol.pushGeneratorState();
//2.{
ol.disableAllBut(OutputGenerator::Man);
startFile(ol,getOutputFileBase(),manPageName,title(),HLI_Pages,!generateTreeView);
ol.enableAll();
ol.disable(OutputGenerator::Man);
startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView);
ol.popGeneratorState();
//2.}
if (!generateTreeView)
{
if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX"))
{
getOuterScope()->writeNavigationPath(ol);
}
ol.endQuickIndices();
}
SectionInfo *si=Doxygen::sectionDict->find(name());
// save old generator state and write title only to Man generator
ol.pushGeneratorState();
//2.{
ol.disableAllBut(OutputGenerator::Man);
ol.startTitleHead(manPageName);
ol.endTitleHead(manPageName, manPageName);
if (si)
{
ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
ol.endSection(si->label,si->type);
}
ol.popGeneratorState();
//2.}
// for Latex the section is already generated as a chapter in the index!
ol.pushGeneratorState();
//2.{
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!title().isEmpty() && !name().isEmpty() && si!=0)
{
//ol.startSection(si->label,si->title,si->type);
startTitle(ol,getOutputFileBase(),this);
ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
//stringToSearchIndex(getOutputFileBase(),
// theTranslator->trPage(TRUE,TRUE)+" "+si->title,
// si->title);
//ol.endSection(si->label,si->type);
endTitle(ol,getOutputFileBase(),name());
}
ol.startContents();
ol.popGeneratorState();
//2.}
if (m_showToc && hasSections())
{
writeToc(ol);
}
writePageDocumentation(ol);
if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX"))
{
ol.endContents();
endFileWithNavPath(getOuterScope(),ol);
}
else
{
endFile(ol);
}
ol.popGeneratorState();
//1.}
//.........这里部分代码省略.........
示例6: writeDocumentation
void PageDef::writeDocumentation(OutputList &ol)
{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
//outputList->disable(OutputGenerator::Man);
QCString pageName,manPageName;
pageName = escapeCharsInString(name(),FALSE,TRUE);
manPageName = escapeCharsInString(name(),TRUE,TRUE);
//printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data());
ol.pushGeneratorState();
//1.{
if (m_nestingLevel>0
//&& // a sub page
//(Doxygen::mainPage==0 || getOuterScope()!=Doxygen::mainPage) // and not a subpage of the mainpage
)
{
// do not generate sub page output for RTF and LaTeX, as these are
// part of their parent page
ol.disableAll();
ol.enable(OutputGenerator::Man);
ol.enable(OutputGenerator::Html);
}
ol.pushGeneratorState();
//2.{
ol.disableAllBut(OutputGenerator::Man);
startFile(ol,getOutputFileBase(),manPageName,title(),HLI_Pages,!generateTreeView);
ol.enableAll();
ol.disable(OutputGenerator::Man);
startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView);
ol.popGeneratorState();
//2.}
if (!generateTreeView)
{
if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
{
getOuterScope()->writeNavigationPath(ol);
}
ol.endQuickIndices();
}
SectionInfo *si=Doxygen::sectionDict->find(name());
// save old generator state and write title only to Man generator
ol.pushGeneratorState();
//2.{
ol.disableAllBut(OutputGenerator::Man);
ol.startTitleHead(manPageName);
ol.endTitleHead(manPageName, manPageName);
if (si)
{
ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
ol.endSection(si->label,si->type);
}
ol.popGeneratorState();
//2.}
// for Latex the section is already generated as a chapter in the index!
ol.pushGeneratorState();
//2.{
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!title().isEmpty() && !name().isEmpty() && si!=0)
{
//ol.startSection(si->label,si->title,si->type);
startTitle(ol,getOutputFileBase(),this);
ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
//stringToSearchIndex(getOutputFileBase(),
// theTranslator->trPage(TRUE,TRUE)+" "+si->title,
// si->title);
//ol.endSection(si->label,si->type);
endTitle(ol,getOutputFileBase(),name());
}
ol.startContents();
ol.popGeneratorState();
//2.}
if (m_showToc && hasSections())
{
writeToc(ol);
}
writeGeneratedFromFile(ol, this->getDefFileName());
writePageDocumentation(ol);
if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
{
ol.endContents();
endFileWithNavPath(getOuterScope(),ol);
}
else
{
endFile(ol);
}
//.........这里部分代码省略.........
示例7: writeDocumentation
/*! Write the documentation page for this file to the file of output
generators \a ol.
*/
void FileDef::writeDocumentation(OutputList &ol)
{
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
//funcList->countDecMembers();
//QCString fn = name();
//if (Config_getBool("FULL_PATH_NAMES"))
//{
// fn.prepend(stripFromPath(getPath().copy()));
//}
//printf("WriteDocumentation diskname=%s\n",diskname.data());
QCString versionTitle;
if (!fileVersion.isEmpty())
{
versionTitle=("("+fileVersion+")");
}
QCString title = docname+versionTitle;
QCString pageTitle=theTranslator->trFileReference(docname);
if (Config_getBool("SHOW_DIRECTORIES") && getDirDef())
{
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView);
if (!generateTreeView)
{
getDirDef()->writeNavigationPath(ol);
ol.endQuickIndices();
}
QCString pageTitleShort=theTranslator->trFileReference(name());
startTitle(ol,getOutputFileBase(),this);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.parseText(pageTitleShort); // Html only
ol.enableAll();
ol.disable(OutputGenerator::Html);
ol.parseText(pageTitle); // other output formats
ol.popGeneratorState();
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),title);
}
else
{
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView);
if (!generateTreeView)
{
ol.endQuickIndices();
}
startTitle(ol,getOutputFileBase(),this);
ol.parseText(pageTitle);
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),title);
}
ol.startContents();
if (!fileVersion.isEmpty())
{
ol.disableAllBut(OutputGenerator::Html);
ol.startProjectNumber();
ol.docify(versionTitle);
ol.endProjectNumber();
ol.enableAll();
}
if (Doxygen::searchIndex)
{
Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase());
Doxygen::searchIndex->addWord(localName(),TRUE);
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"file\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl;
Doxygen::tagFile << " <filename>"
<< convertToXML(getOutputFileBase())
<< "</filename>" << endl;
}
//---------------------------------------- start flexible part -------------------------------
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::File));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
case LayoutDocEntry::BriefDesc:
writeBriefDescription(ol);
break;
case LayoutDocEntry::MemberDeclStart:
startMemberDeclarations(ol);
break;
case LayoutDocEntry::FileIncludes:
//.........这里部分代码省略.........
示例8: _writeSourceRefList
/*! Write a reference to the source code fragments in which this
* definition is used.
*/
void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool /*funcOnly*/)
{
static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
static bool refLinkSource = Config_getBool("REFERENCES_LINK_SOURCE");
ol.pushGeneratorState();
if (members)
{
ol.startParagraph();
ol.parseText(text);
ol.docify(" ");
QCString ldefLine=theTranslator->trWriteList(members->count());
QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen;
// now replace all markers in inheritLine with links to the classes
while ((newIndex=marker.match(ldefLine,index,&matchLen))!=-1)
{
bool ok;
ol.parseText(ldefLine.mid(index,newIndex-index));
uint entryIndex = ldefLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
MemberDef *md=members->at(entryIndex);
if (ok && md)
{
QCString scope=md->getScopeString();
QCString name=md->name();
//printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),scope.data(),scopeName);
if (!scope.isEmpty() && scope!=scopeName)
{
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
name.prepend(scope+".");
}
else
{
name.prepend(scope+"::");
}
}
if (!md->isObjCMethod() &&
(md->isFunction() || md->isSlot() ||
md->isPrototype() || md->isSignal()
)
)
{
name+="()";
}
//Definition *d = md->getOutputFileBase();
//if (d==Doxygen::globalScope) d=md->getBodyDef();
if (sourceBrowser &&
!(md->isLinkable() && !refLinkSource) &&
md->getStartBodyLine()!=-1 &&
md->getBodyDef()
)
{
//printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope);
// for HTML write a real link
ol.pushGeneratorState();
//ol.disableAllBut(OutputGenerator::Html);
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
QCString lineStr,anchorStr;
anchorStr.sprintf("l%05d",md->getStartBodyLine());
//printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data());
ol.writeObjectLink(0,md->getBodyDef()->getSourceFileBase(),anchorStr,name);
ol.popGeneratorState();
// for the other output formats just mention the name
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
ol.docify(name);
ol.popGeneratorState();
}
else if (md->isLinkable() /*&& d && d->isLinkable()*/)
{
// for HTML write a real link
ol.pushGeneratorState();
//ol.disableAllBut(OutputGenerator::Html);
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
//.........这里部分代码省略.........
示例9: writeDocumentation
void MemberList::writeDocumentation(OutputList &ol,
const char *scopeName, Definition *container,
const char *title,bool showEnumValues,bool showInline)
{
//printf("MemberList::writeDocumentation()\n");
countDocMembers(showEnumValues);
if (numDocMembers()==0) return;
if (title)
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
ol.writeRuler();
ol.popGeneratorState();
ol.startGroupHeader(showInline ? 2 : 0);
ol.parseText(title);
ol.endGroupHeader(showInline ? 2 : 0);
}
ol.startMemberDocList();
MemberListIterator mli(*this);
MemberDef *md;
// count the number of overloaded members
QDict<uint> overloadTotalDict(67);
QDict<uint> overloadCountDict(67);
overloadTotalDict.setAutoDelete(TRUE);
overloadCountDict.setAutoDelete(TRUE);
for (mli.toFirst() ; (md=mli.current()) ; ++mli)
{
if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
!(md->isEnumValue() && !showInline))
{
uint *pCount = overloadTotalDict.find(md->name());
if (pCount)
{
(*pCount)++;
}
else
{
overloadTotalDict.insert(md->name(),new uint(1));
overloadCountDict.insert(md->name(),new uint(1));
}
}
}
for (mli.toFirst() ; (md=mli.current()) ; ++mli)
{
if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
!(md->isEnumValue() && !showInline))
{
uint overloadCount = *overloadTotalDict.find(md->name());
uint *pCount = overloadCountDict.find(md->name());
md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,
m_inGroup,showEnumValues,showInline);
(*pCount)++;
}
}
if (memberGroupList)
{
printf("MemberList::writeDocumentation() -- member groups %d\n",memberGroupList->count());
MemberGroupListIterator mgli(*memberGroupList);
MemberGroup *mg;
for (; (mg=mgli.current()); ++mgli)
{
mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline);
}
}
ol.endMemberDocList();
}
示例10: writeDeclaration
void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
const char *header,bool localNames)
{
if (count()>0)
{
ClassSDict::Iterator sdi(*this);
ClassDef *cd=0;
bool found=FALSE;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
if (cd->name().find('@')==-1 &&
(filter==0 || *filter==cd->compoundType())
)
{
bool isLink = cd->isLinkable();
if (isLink ||
(!Config_getBool("HIDE_UNDOC_CLASSES") &&
(!cd->isLocal() || Config_getBool("EXTRACT_LOCAL_CLASSES"))
)
)
{
if (!found)
{
ol.startMemberHeader();
if (header)
{
ol.parseText(header);
}
else
{
ol.parseText(theTranslator->trCompounds());
}
ol.endMemberHeader();
ol.startMemberList();
found=TRUE;
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <class kind=\"" << cd->compoundTypeString()
<< "\">" << convertToXML(cd->name()) << "</class>" << endl;
}
ol.startMemberItem(FALSE);
QCString tmp = cd->compoundTypeString();
QCString cname;
if (localNames)
{
cname = cd->localName();
}
else
{
cname = cd->displayName();
}
ol.writeString(tmp);
ol.writeString(" ");
ol.insertMemberAlign();
if (isLink)
{
ol.writeObjectLink(cd->getReference(),
cd->getOutputFileBase(),
0,
cname
);
}
else
{
ol.startBold();
ol.docify(cname);
ol.endBold();
}
ol.endMemberItem();
if (!cd->briefDescription().isEmpty())
{
ol.startMemberDescription();
ol.parseDoc(cd->briefFile(),cd->briefLine(),cd,0,
cd->briefDescription(),FALSE,FALSE);
if (//(!cd->briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
//!cd->documentation().isEmpty())
cd->isLinkableInProject()
)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
//ol.endEmphasis();
ol.docify(" ");
ol.startTextLink(cd->getOutputFileBase(),"_details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
//ol.startEmphasis();
ol.popGeneratorState();
}
ol.endMemberDescription();
}
}
}
}
if (found) ol.endMemberList();
}
}
示例11: writeSourceDef
/*! Write a reference to the source code defining this definition */
void Definition::writeSourceDef(OutputList &ol,const char *)
{
static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
makeResident();
ol.pushGeneratorState();
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
if (sourceBrowser &&
m_impl->body && m_impl->body->startLine!=-1 && m_impl->body->fileDef)
{
QCString refText = theTranslator->trDefinedAtLineInSourceFile();
int lineMarkerPos = refText.find("@0");
int fileMarkerPos = refText.find("@1");
if (lineMarkerPos!=-1 && fileMarkerPos!=-1) // should always pass this.
{
QCString lineStr,anchorStr;
lineStr.sprintf("%d",m_impl->body->startLine);
anchorStr.sprintf(Htags::useHtags ? "L%d" : "l%05d",m_impl->body->startLine);
ol.startParagraph();
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{
// write text left from linePos marker
ol.parseText(refText.left(lineMarkerPos));
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
// write line link (HTML, LaTeX optionally)
ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(),
anchorStr,lineStr);
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
// write normal text (Man/RTF, Latex optionally)
ol.docify(lineStr);
ol.popGeneratorState();
// write text between markers
ol.parseText(refText.mid(lineMarkerPos+2,
fileMarkerPos-lineMarkerPos-2));
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
// write line link (HTML, LaTeX optionally)
ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(),
0,m_impl->body->fileDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
// write normal text (Man/RTF, Latex optionally)
ol.docify(m_impl->body->fileDef->name());
ol.popGeneratorState();
// write text right from file marker
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2));
}
else // file marker before line marker
{
// write text left from file marker
ol.parseText(refText.left(fileMarkerPos));
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
// write file link (HTML only)
ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(),
0,m_impl->body->fileDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
// write normal text (Latex/Man only)
ol.docify(m_impl->body->fileDef->name());
ol.popGeneratorState();
// write text between markers
ol.parseText(refText.mid(fileMarkerPos+2,
lineMarkerPos-fileMarkerPos-2));
//.........这里部分代码省略.........
示例12: writeDocumentation
void NamespaceDef::writeDocumentation(OutputList &ol)
{
QCString pageTitle;
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
pageTitle = theTranslator->trPackage(displayName());
}
else
{
pageTitle = theTranslator->trNamespaceReference(displayName());
}
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_NamespaceVisible);
if (getOuterScope()!=Doxygen::globalScope)
{
writeNavigationPath(ol);
}
startTitle(ol,getOutputFileBase());
ol.parseText(pageTitle);
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),displayName());
if (Config_getBool("SEARCHENGINE"))
{
Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase());
Doxygen::searchIndex->addWord(localName(),TRUE);
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"namespace\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
}
ol.startTextBlock();
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDocumentation(ol);
ol.newParagraph();
}
else if (!briefDescription().isEmpty())
{
ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.enableAll();
ol.disableAllBut(OutputGenerator::Man);
ol.newParagraph();
ol.popGeneratorState();
}
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.enable(OutputGenerator::Man);
ol.writeSynopsis();
ol.endTextBlock();
ol.startMemberSections();
classSDict->writeDeclaration(ol,0,0,TRUE);
namespaceSDict->writeDeclaration(ol,TRUE);
/* write user defined member groups */
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeDeclarations(ol,0,this,0,0);
}
//allMemberList.writeDeclarations(ol,0,this,0,0,0,0);
decDefineMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trDefines(),0);
decProtoMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trFuncProtos(),0);
decTypedefMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trTypedefs(),0);
decEnumMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trEnumerations(),0);
decFuncMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trFunctions(),0);
decVarMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trVariables(),0);
ol.endMemberSections();
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDocumentation(ol);
}
writeMemberDocumentation(ol);
// write Author section (Man only)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
//.........这里部分代码省略.........
示例13: writeDocumentation
void GroupDef::writeDocumentation(OutputList &ol)
{
ol.pushGeneratorState();
startFile(ol,getOutputFileBase(),name(),title);
startTitle(ol,getOutputFileBase());
ol.parseText(title);
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),title);
if (Config_getBool("SEARCHENGINE"))
{
Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase());
static QRegExp we("[a-zA-Z_][a-zA-Z_0-9]*");
int i=0,p=0,l=0;
while ((i=we.match(title,p,&l))!=-1) // foreach word in the title
{
Doxygen::searchIndex->addWord(title.mid(i,l),TRUE);
p=i+l;
}
}
if (Config_getBool("HAVE_DOT") && Config_getBool("GROUP_GRAPHS") )
{
DotGroupCollaboration graph(this);
if (!graph.isTrivial())
{
msg("Generating dependency graph for group %s\n",qualifiedName().data());
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.startGroupCollaboration();
ol.parseText(theTranslator->trCollaborationDiagram(title));
ol.endGroupCollaboration(graph);
ol.popGeneratorState();
}
}
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDocumentation(ol);
ol.newParagraph();
}
else if (!briefDescription().isEmpty())
{
ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
ol.startTextLink(0,"_details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.enableAll();
ol.disableAllBut(OutputGenerator::Man);
ol.newParagraph();
ol.popGeneratorState();
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"group\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <title>" << convertToXML(title) << "</title>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
}
ol.startMemberSections();
// write list of files
if (fileList->count()>0)
{
ol.startMemberHeader();
ol.parseText(theTranslator->trFile(TRUE,FALSE));
ol.endMemberHeader();
ol.startMemberList();
FileDef *fd=fileList->first();
while (fd)
{
ol.startMemberItem(0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE);
ol.endMemberDescription();
ol.newParagraph();
}
fd=fileList->next();
}
ol.endMemberList();
}
//.........这里部分代码省略.........
示例14: writePlainDeclarations
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);
//.........这里部分代码省略.........
示例15: writeFileList
void DirDef::writeFileList(OutputList &ol)
{
int numFiles = 0;
QListIterator<FileDef> it(*m_fileList);
FileDef *fd;
for (it.toFirst();(fd=it.current());++it)
{
if (fd->hasDocumentation())
{
numFiles++;
}
}
// write file list
if (numFiles>0)
{
ol.startMemberHeader("files");
ol.parseText(theTranslator->trFile(TRUE,FALSE));
ol.endMemberHeader();
ol.startMemberList();
QListIterator<FileDef> it(*m_fileList);
FileDef *fd;
for (;(fd=it.current());++it)
{
if (fd->hasDocumentation())
{
ol.startMemberDeclaration();
ol.startMemberItem(fd->getOutputFileBase(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
if (fd->isLinkable())
{
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
}
else
{
ol.startBold();
ol.docify(fd->name());
ol.endBold();
}
if (fd->generateSourceFile())
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
ol.startTextLink(fd->includeName(),0);
ol.docify("[");
ol.parseText(theTranslator->trCode());
ol.docify("]");
ol.endTextLink();
ol.popGeneratorState();
}
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(fd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
0, // exampleName
TRUE, // single line
TRUE // link from index
);
ol.endMemberDescription();
}
ol.endMemberDeclaration(0,0);
}
}
ol.endMemberList();
}
}