当前位置: 首页>>代码示例>>C++>>正文


C++ convertToXML函数代码示例

本文整理汇总了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();
  }
}
开发者ID:tuxdna,项目名称:Doxygen,代码行数:33,代码来源:groupdef.cpp

示例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;
  }
}
开发者ID:dnjsflagh1,项目名称:code,代码行数:29,代码来源:diagram.cpp

示例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;
    }
  }
}
开发者ID:augsod,项目名称:doxygen-uno,代码行数:28,代码来源:docsets.cpp

示例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();
    }
  }
}
开发者ID:tuxdna,项目名称:Doxygen,代码行数:29,代码来源:groupdef.cpp

示例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;
}
开发者ID:bithium,项目名称:doxygen,代码行数:46,代码来源:dirdef.cpp

示例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;
      }
    }
  }
}
开发者ID:Distrotech,项目名称:doxygen,代码行数:44,代码来源:docsets.cpp

示例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;
}
开发者ID:Distrotech,项目名称:doxygen,代码行数:43,代码来源:docsets.cpp

示例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;
   }
}
开发者ID:klemens-morgenstern,项目名称:doxypress,代码行数:53,代码来源:eclipsehelp.cpp

示例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();
  }
}
开发者ID:drxaero,项目名称:doxygen,代码行数:52,代码来源:groupdef.cpp

示例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 << ">";
}
开发者ID:vscosta,项目名称:doxygen-yap,代码行数:38,代码来源:xmldocvisitor.cpp

示例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()) << ">";
  }
}
开发者ID:BackupTheBerlios,项目名称:doxverilog-svn,代码行数:14,代码来源:htmldocvisitor.cpp

示例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;
  }
}
开发者ID:BlazesRus,项目名称:doxygen,代码行数:23,代码来源:pagedef.cpp

示例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;
}
开发者ID:adei-kit,项目名称:kitcube-tools,代码行数:44,代码来源:sqlite3gen.cpp

示例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();
  }
}
开发者ID:terceiro,项目名称:doxyparse,代码行数:41,代码来源:dirdef.cpp

示例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;
      }
    }
  }
}
开发者ID:kevinoupeng,项目名称:mydg,代码行数:23,代码来源:definition.cpp


注:本文中的convertToXML函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。