本文整理汇总了C++中convertToXML函数的典型用法代码示例。如果您正苦于以下问题:C++ convertToXML函数的具体用法?C++ convertToXML怎么用?C++ convertToXML使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convertToXML函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
void GroupDef::writeDirs(OutputList &ol,const QCString &title)
{
// write list of directories
if (dirList->count()>0)
{
ol.startMemberHeader("dirs");
ol.parseText(title);
ol.endMemberHeader();
ol.startMemberList();
DirDef *dd=dirList->first();
while (dd)
{
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE));
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
ol.endMemberItem();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription(dd->getOutputFileBase());
ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
ol.endMemberDescription();
}
dd=dirList->next();
}
ol.endMemberList();
}
}
示例2: writeMapArea
static void writeMapArea(FTextStream &t,ClassDef *cd,QCString relPath,
int x,int y,int w,int h)
{
if (cd->isLinkable())
{
QCString ref=cd->getReference();
t << "<area ";
if (!ref.isEmpty())
{
t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
}
t << "href=\"";
t << externalRef(relPath,ref,TRUE);
t << cd->getOutputFileBase() << Doxygen::htmlFileExtension;
if (!cd->anchor().isEmpty())
{
t << "#" << cd->anchor();
}
t << "\" ";
QCString tooltip = cd->briefDescriptionAsTooltip();
if (!tooltip.isEmpty())
{
t << "title=\"" << tooltip << "\" ";
}
t << "alt=\"" << convertToXML(cd->displayName());
t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
t << (x+w) << "," << (y+h) << "\"/>" << endl;
}
}
示例3: indent
void DocSets::addContentsItem(bool isDir,
const char *name,
const char *ref,
const char *file,
const char *anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
Definition * /*def*/)
{
(void)isDir;
if (file && ref==0)
{
if (!m_firstNode.at(m_dc-1))
{
m_nts << indent() << " </Node>" << endl;
}
m_firstNode.at(m_dc-1)=FALSE;
m_nts << indent() << " <Node>" << endl;
m_nts << indent() << " <Name>" << convertToXML(name) << "</Name>" << endl;
m_nts << indent() << " <Path>";
m_nts << file << Doxygen::htmlFileExtension;
m_nts << "</Path>" << endl;
if (anchor)
{
m_nts << indent() << " <Anchor>" << anchor << "</Anchor>" << endl;
}
}
}
示例4: pdi
void GroupDef::writePageDocumentation(OutputList &ol)
{
PageDef *pd=0;
PageSDict::Iterator pdi(*pageDict);
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
if (!pd->isReference())
{
QCString pageName = pd->getOutputFileBase();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl;
}
SectionInfo *si=0;
if (!pd->title().isEmpty() && !pd->name().isEmpty() &&
(si=Doxygen::sectionDict[pd->name()])!=0)
{
ol.startSection(si->label,si->title,SectionInfo::Subsection);
ol.docify(si->title);
ol.endSection(si->label,SectionInfo::Subsection);
}
ol.startTextBlock();
ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE,0,TRUE,FALSE);
ol.endTextBlock();
}
}
}
示例5: convertToXML
void DirDef::writeTagFile(FTextStream &tagFile)
{
tagFile << " <compound kind=\"dir\">" << endl;
tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl;
tagFile << " <path>" << convertToXML(name()) << "</path>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Directory));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
case LayoutDocEntry::DirSubDirs:
{
if (m_subdirs.count()>0)
{
DirDef *dd;
QListIterator<DirDef> it(m_subdirs);
for (;(dd=it.current());++it)
{
tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
}
}
break;
case LayoutDocEntry::DirFiles:
{
if (m_fileList->count()>0)
{
QListIterator<FileDef> it(*m_fileList);
FileDef *fd;
for (;(fd=it.current());++it)
{
tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
}
}
break;
default:
break;
}
}
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
示例6: indent
void DocSets::addContentsItem(bool isDir,
const char *name,
const char *ref,
const char *file,
const char *anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
Definition * /*def*/)
{
(void)isDir;
//printf("DocSets::addContentsItem(%s) m_dc=%d\n",name,m_dc);
if (ref==0)
{
if (!m_firstNode.at(m_dc-1))
{
m_nts << indent() << " </Node>" << endl;
}
m_firstNode.at(m_dc-1)=FALSE;
m_nts << indent() << " <Node>" << endl;
m_nts << indent() << " <Name>" << convertToXML(name) << "</Name>" << endl;
if (file && file[0]=='^') // URL marker
{
m_nts << indent() << " <URL>" << convertToXML(&file[1])
<< "</URL>" << endl;
}
else // relative file
{
m_nts << indent() << " <Path>";
if (file && file[0]=='!') // user specified file
{
m_nts << convertToXML(&file[1]);
}
else if (file) // doxygen generated file
{
m_nts << file << Doxygen::htmlFileExtension;
}
m_nts << "</Path>" << endl;
if (file && anchor)
{
m_nts << indent() << " <Anchor>" << anchor << "</Anchor>" << endl;
}
}
}
}
示例7: convertToXML
void DocSets::writeToken(FTextStream &t,
const Definition *d,
const QCString &type,
const QCString &lang,
const char *scope,
const char *anchor,
const char *decl)
{
t << " <Token>" << endl;
t << " <TokenIdentifier>" << endl;
QCString name = d->name();
if (name.right(2)=="-p") name=name.left(name.length()-2);
t << " <Name>" << convertToXML(name) << "</Name>" << endl;
if (!lang.isEmpty())
{
t << " <APILanguage>" << lang << "</APILanguage>" << endl;
}
if (!type.isEmpty())
{
t << " <Type>" << type << "</Type>" << endl;
}
if (scope)
{
t << " <Scope>" << convertToXML(scope) << "</Scope>" << endl;
}
t << " </TokenIdentifier>" << endl;
t << " <Path>" << d->getOutputFileBase()
<< Doxygen::htmlFileExtension << "</Path>" << endl;
if (anchor)
{
t << " <Anchor>" << anchor << "</Anchor>" << endl;
}
QCString tooltip = d->briefDescriptionAsTooltip();
if (!tooltip.isEmpty())
{
t << " <Abstract>" << convertToXML(tooltip) << "</Abstract>" << endl;
}
if (decl)
{
t << " <DeclaredIn>" << convertToXML(decl) << "</DeclaredIn>" << endl;
}
t << " </Token>" << endl;
}
示例8: closedTag
/*!
* \brief Add an item to the content
*
* @param isDir Flag whether the argument \a file is a directory or a file entry
* @param name Name of the item
* @param ref URL of the item
* @param file Name of a file which the item is defined in (without extension)
* @param anchor Name of an anchor of the item.
* @param separateIndex not used.
* @param addToNavIndex not used.
* @param def not used.
*/
void EclipseHelp::addContentsItem(bool, const QString &name, const QString &, const QString &file, const QString &anchor,
bool, bool, QSharedPointer<Definition>)
{
// -- write the topic tag
closedTag();
if (! file.isEmpty() ) {
switch (file[0].unicode()) { // check for special markers (user defined URLs)
case '^':
// URL not supported by eclipse toc.xml
break;
case '!':
indent();
m_tocstream << "<topic label=\"" << convertToXML(name) << "\"";
m_tocstream << " href=\"" << convertToXML(m_pathprefix) << file.mid(1) << "\"";
m_endtag = true;
break;
default:
indent();
m_tocstream << "<topic label=\"" << convertToXML(name) << "\"";
m_tocstream << " href=\"" << convertToXML(m_pathprefix)
<< file << Doxy_Globals::htmlFileExtension;
if (! anchor.isEmpty()) {
m_tocstream << "#" << anchor;
}
m_tocstream << "\"";
m_endtag = true;
break;
}
} else {
indent();
m_tocstream << "<topic label=\"" << convertToXML(name) << "\"";
m_endtag = true;
}
}
示例9: it
void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
{
// write list of groups
int count=0;
if (groupList->count()>0)
{
QListIterator<GroupDef> it(*groupList);
GroupDef *gd;
for (;(gd=it.current());++it)
{
if (gd->isVisible()) count++;
}
}
if (count>0)
{
ol.startMemberHeader("groups");
ol.parseText(title);
ol.endMemberHeader();
ol.startMemberList();
if (Config_getBool("SORT_GROUP_NAMES"))
{
groupList->sort();
}
QListIterator<GroupDef> it(*groupList);
GroupDef *gd;
for (;(gd=it.current());++it)
{
if (gd->isVisible())
{
ol.startMemberDeclaration();
ol.startMemberItem(gd->getOutputFileBase(),0);
//ol.docify(theTranslator->trGroup(FALSE,TRUE));
//ol.docify(" ");
ol.insertMemberAlign();
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
}
ol.endMemberItem();
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription(gd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
ol.endMemberDescription();
}
ol.endMemberDeclaration(0,0);
}
}
ol.endMemberList();
}
}
示例10: visitPreStart
static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption,
XmlDocVisitor *parent, QList<DocNode> children,
const QCString &name, bool writeType, DocImage::Type type, const QCString &width,
const QCString &height)
{
t << "<" << cmd;
if (writeType)
{
t << " type=\"";
switch(type)
{
case DocImage::Html: t << "html"; break;
case DocImage::Latex: t << "latex"; break;
case DocImage::Rtf: t << "rtf"; break;
case DocImage::DocBook: t << "docbook"; break;
}
t << "\"";
}
if (!name.isEmpty())
{
t << " name=\"" << name << "\"";
}
if (!width.isEmpty())
{
t << " width=\"" << convertToXML(width) << "\"";
}
if (!height.isEmpty())
{
t << " height=\"" << convertToXML(height) << "\"";
}
if (doCaption)
{
t << " caption=\"";
visitCaption(parent, children);
t << "\"";
}
t << ">";
}
示例11: writeObfuscatedMailAddress
void HtmlDocVisitor::visitPre(DocHRef *href)
{
if (m_hide) return;
if (href->url().left(7)=="mailto:")
{
writeObfuscatedMailAddress(href->url().mid(7));
}
else
{
QCString url = correctURL(href->url(),href->relPath());
m_t << "<a href=\"" << convertToXML(url) << "\""
<< htmlAttribsToString(href->attribs()) << ">";
}
}
示例12: name
void PageDef::writeTagFile(FTextStream &tagFile)
{
bool found = name()=="citelist";
QDictIterator<RefList> rli(*Doxygen::xrefLists);
RefList *rl;
for (rli.toFirst();(rl=rli.current()) && !found;++rli)
{
if (rl->listName()==name())
{
found=TRUE;
break;
}
}
if (!found) // not one of the generated related pages
{
tagFile << " <compound kind=\"page\">" << endl;
tagFile << " <name>" << name() << "</name>" << endl;
tagFile << " <title>" << convertToXML(title()) << "</title>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl;
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
}
示例13: generateSqlite3Section
static void generateSqlite3Section(sqlite3*db,
Definition *d,
MemberList *ml,const char * /*kind*/,const char * /*header*/=0,
const char * /*documentation*/=0)
{
if (ml==0) return;
MemberListIterator mli(*ml);
MemberDef *md;
int count=0;
for (mli.toFirst();(md=mli.current());++mli)
{
// namespace members are also inserted in the file scope, but
// to prevent this duplication in the XML output, we filter those here.
if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
{
count++;
}
}
if (count==0) return; // empty list
#if 0
t << " <sectiondef kind=\"" << kind << "\">" << endl;
if (header)
{
t << " <header>" << convertToXML(header) << "</header>" << endl;
}
if (documentation)
{
t << " <description>";
writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
t << "</description>" << endl;
}
#endif
for (mli.toFirst();(md=mli.current());++mli)
{
// namespace members are also inserted in the file scope, but
// to prevent this duplication in the XML output, we filter those here.
//if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
{
generateSqlite3ForMember(db,md,d);
}
}
//t << " </sectiondef>" << endl;
}
示例14: while
void DirDef::writeSubDirList(OutputList &ol)
{
// write subdir list
if (m_subdirs.count()>0)
{
ol.startMemberHeader();
ol.parseText(theTranslator->trDir(TRUE,FALSE));
ol.endMemberHeader();
ol.startMemberList();
DirDef *dd=m_subdirs.first();
while (dd)
{
ol.startMemberItem(0);
ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
ol.endMemberItem();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startParagraph();
ol.startMemberDescription();
ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
0, // exampleName
FALSE, // single line
TRUE // link from index
);
ol.endMemberDescription();
ol.endParagraph();
}
dd=m_subdirs.next();
}
ol.endMemberList();
}
}
示例15: sdi
void Definition::writeDocAnchorsToTagFile(FTextStream &tagFile)
{
if (m_impl->sectionDict)
{
//printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionDict->count());
SDict<SectionInfo>::Iterator sdi(*m_impl->sectionDict);
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
if (!si->generated)
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) tagFile << " ";
tagFile << " <docanchor file=\"" << si->fileName << "\"";
if (!si->title.isEmpty())
{
tagFile << " title=\"" << convertToXML(si->title) << "\"";
}
tagFile << ">" << si->label << "</docanchor>" << endl;
}
}
}
}