本文整理汇总了C++中OutputList::endCodeFragment方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputList::endCodeFragment方法的具体用法?C++ OutputList::endCodeFragment怎么用?C++ OutputList::endCodeFragment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputList
的用法示例。
在下文中一共展示了OutputList::endCodeFragment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeSource
void VerilogDocGen::writeSource(MemberDef *mdef,OutputList& ol,QCString & cname)
{
// Definition d=(Definition)mdef;
static bool optVerilog = Config_getBool("OPTIMIZE_OUTPUT_VERILOG");
/*
if(optVerilog){
VerilogDocGen::writeSource(mdef,ol,cname);
return;
}
*/
QCString fdd=mdef->getDefFileExtension();
QCString scope=mdef->getScopeString();
QCString codeFragment=mdef->documentation();
//FileDef *fd=mdef->getFileDef();
FileDef *fd=mdef->getBodyDef();
QCString defFileName;
assert(fd);
QStringList qsl=QStringList::split("\n",codeFragment);
ParserInterface *pIntf = Doxygen::parserManager->getParser(fdd.data());
pIntf->resetCodeParserState();
ol.startParagraph();
ol.startCodeFragment();
ol.endCodeFragment();
ol.endParagraph();
mdef->writeSourceDef(ol,cname);
mdef->writeSourceRefs(ol,cname);
mdef->writeSourceReffedBy(ol,cname);
}
示例2: writeInlineCode
/*! Write code of this definition into the documentation */
void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
{
makeResident();
ol.pushGeneratorState();
//printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
if (Config_getBool("INLINE_SOURCES") &&
m_impl->body && m_impl->body->startLine!=-1 &&
m_impl->body->endLine>=m_impl->body->startLine && m_impl->body->fileDef)
{
QCString codeFragment;
int actualStart=m_impl->body->startLine,actualEnd=m_impl->body->endLine;
if (readCodeFragment(m_impl->body->fileDef->absFilePath(),
actualStart,actualEnd,codeFragment)
)
{
//printf("Adding code fragement '%s' ext='%s'\n",
// codeFragment.data(),m_impl->defFileExt.data());
ParserInterface *pIntf = Doxygen::parserManager->getParser(m_impl->defFileExt);
pIntf->resetCodeParserState();
//printf("Read:\n`%s'\n\n",codeFragment.data());
MemberDef *thisMd = 0;
if (definitionType()==TypeMember) thisMd = (MemberDef *)this;
ol.startCodeFragment();
pIntf->parseCode(ol, // codeOutIntf
scopeName, // scope
codeFragment, // input
FALSE, // isExample
0, // exampleName
m_impl->body->fileDef, // fileDef
actualStart, // startLine
actualEnd, // endLine
TRUE, // inlineFragment
thisMd, // memberDef
FALSE // show line numbers
);
ol.endCodeFragment();
}
}
ol.popGeneratorState();
}
示例3: writeSource
/*! Write a source listing of this file to the output */
void FileDef::writeSource(OutputList &ol)
{
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
QCString title = docname;
if (!fileVersion.isEmpty())
{
title+=(" ("+fileVersion+")");
}
QCString pageTitle = theTranslator->trSourceFile(title);
ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::RTF);
if (!latexSourceCode) ol.disable(OutputGenerator::Latex);
if (Config_getBool("SHOW_DIRECTORIES") && getDirDef())
{
startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,
!generateTreeView,getOutputFileBase());
if (!generateTreeView)
{
getDirDef()->writeNavigationPath(ol);
ol.endQuickIndices();
}
startTitle(ol,getOutputFileBase());
ol.parseText(name());
endTitle(ol,getOutputFileBase(),title);
}
else
{
startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,
!generateTreeView,getOutputFileBase());
startTitle(ol,getSourceFileBase());
ol.parseText(title);
endTitle(ol,getSourceFileBase(),0);
}
ol.startContents();
if (isLinkable())
{
if (latexSourceCode) ol.disable(OutputGenerator::Latex);
ol.startTextLink(getOutputFileBase(),0);
ol.parseText(theTranslator->trGotoDocumentation());
ol.endTextLink();
if (latexSourceCode) ol.enable(OutputGenerator::Latex);
}
ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
pIntf->resetCodeParserState();
ol.startCodeFragment();
pIntf->parseCode(ol,0,
fileToString(absFilePath(),filterSourceFiles,TRUE),
FALSE,0,this
);
ol.endCodeFragment();
ol.endContents();
if (generateTreeView)
{
writeNavigationPath(ol);
endFile(ol,TRUE);
}
else
{
endFile(ol);
}
ol.enableAll();
}