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


C++ QCString::right方法代码示例

本文整理汇总了C++中QCString::right方法的典型用法代码示例。如果您正苦于以下问题:C++ QCString::right方法的具体用法?C++ QCString::right怎么用?C++ QCString::right使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QCString的用法示例。


在下文中一共展示了QCString::right方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: parse

void FixedFormParser::parse(const QString &fileName)
{
    QFile f(QFile::encodeName(fileName));
    if (!f.open(IO_ReadOnly))
        return;
    QTextStream stream(&f);

    m_file = m_model->create<FileModel>();
    m_file->setName( fileName );

    QCString line;
    int lineNum=0, startLineNum=0;
    while (!stream.atEnd()) {
        ++lineNum;
        QCString str = stream.readLine().local8Bit();
        if (!str.isEmpty() && QCString("*Cc#!").find(str[0]) != -1)
            continue;
        // Continuation line
        if (str.length() > 6 && str.left(5) == "     " && str[5] != ' ') {
            line += str.right(str.length()-6);
            continue;
        }
        // An initial or invalid line. We don't care
        // about validity
        process(line, fileName, startLineNum);
        line = str.right(str.length()-6);
        startLineNum = lineNum-1;
    }
    process(line, fileName, startLineNum);

    f.close();

    m_model->addFile( m_file );
}
开发者ID:serghei,项目名称:kde3-kdevelop,代码行数:34,代码来源:fixedformparser.cpp

示例2: getListOfBibFiles

static QCString getListOfBibFiles(const QCString &sep,bool stripExtension)
{
  QCString result;
  QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
  const char *bibdata = citeDataList.first();
  while (bibdata)
  {
    int i;
    QCString bibFile = bibdata;
    if (stripExtension && bibFile.right(4)==".bib")
    {
      bibFile = bibFile.left(bibFile.length()-4);
    }
    if (stripExtension && (i=bibFile.findRev('/'))!=-1)
    {
      bibFile = bibFile.mid(i+1);
    }
    if (!bibFile.isEmpty())
    {
      result+=bibFile;
      bibdata = citeDataList.next();
      if (bibdata)
      {
        result+=sep;
      }
    }
    else
    {
      bibdata = citeDataList.next();
    }
  }
  return result;
}
开发者ID:Ductapemaster,项目名称:doxverilog,代码行数:33,代码来源:cite.cpp

示例3: clean

void CiteDict::clean()
{
  // clean
  QDir thisDir;
  QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
  const char *bibdata = citeDataList.first();
  while (bibdata)
  {
    QCString bibFile = bibdata;
    if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
    if (!bibFile.isEmpty()) thisDir.remove(m_baseFileName+"_"+bibFile);
    bibdata = citeDataList.next();
  }

  thisDir.remove(m_baseFileName + ".aux");
  thisDir.remove(m_baseFileName + ".bbl");
  thisDir.remove(m_baseFileName + ".blg");
  thisDir.remove(m_baseFileName + ".tmp");
  thisDir.remove(m_baseFileName + ".bst");

  QCString &outputDirectory = Config_getString("OUTPUT_DIRECTORY");
  if (outputDirectory.isEmpty()) 
  {
    outputDirectory=QDir::currentDirPath();
  }
  QDir d(outputDirectory);
  d.rmdir("bib");
}
开发者ID:jscipione,项目名称:Doxygen_Haiku,代码行数:28,代码来源:cite.cpp

示例4: startDoxyAnchor

void ManGenerator::startDoxyAnchor(const char *,const char *manName,
                                   const char *, const char *name,
                                   const char *)
{
    // something to be done?
    if( !Config_getBool("MAN_LINKS") ) 
    {
	return; // no
    }

    // the name of the link file is derived from the name of the anchor:
    // - truncate after an (optional) ::
    QCString baseName = name;
    int i=baseName.findRev("::");
    if (i!=-1) baseName=baseName.right(baseName.length()-i-2);

    //printf("Converting man link '%s'->'%s'->'%s'\n",
    //       name,baseName.data(),buildFileName(baseName).data());
    
    // - remove dangerous characters and append suffix, then add dir prefix
    QCString fileName=dir+"/"+buildFileName( baseName );
    QFile linkfile( fileName );
    // - only create file if it doesn't exist already
    if ( !linkfile.open( IO_ReadOnly ) ) 
    {
	if ( linkfile.open( IO_WriteOnly ) ) 
        {
	      FTextStream linkstream;
	      linkstream.setDevice(&linkfile);
	      //linkstream.setEncoding(QTextStream::UnicodeUTF8);
	      linkstream << ".so " << getSubdir() << "/" << buildFileName( manName ) << endl;
	}
    }
    linkfile.close();
}
开发者ID:AmesianX,项目名称:doxygen,代码行数:35,代码来源:mangen.cpp

示例5: startDoxyAnchor

void ManGenerator::startDoxyAnchor(const char *,const char *manName,
                                   const char *, const char *name,
                                   const char *)
{
    // something to be done?
    if( !Config_getBool("MAN_LINKS") ) 
    {
	return; // no
    }

    // the name of the link file is derived from the name of the anchor:
    // - truncate after an (optional) ::
    QCString baseName = name;
    int i=baseName.findRev(':');
    if (i!=-1) baseName=baseName.right(baseName.length()-i-1);
    
    // - remove dangerous characters and append suffix, then add dir prefix
    QCString fileName=dir+"/"+buildFileName( baseName );
    QFile linkfile( fileName );
    // - only create file if it doesn't exist already
    if ( !linkfile.open( IO_ReadOnly ) ) 
    {
	if ( linkfile.open( IO_WriteOnly ) ) 
        {
	      QTextStream linkstream;
	      linkstream.setDevice(&linkfile);
#if QT_VERSION >= 200
	      linkstream.setEncoding(QTextStream::Latin1);
#endif
	      linkstream << ".so man" << getExtension() << "/" << buildFileName( manName ) << endl;
	}
    }
    linkfile.close();
}
开发者ID:tch-opensrc,项目名称:TC72XX_LxG1.7.1mp1_OpenSrc,代码行数:34,代码来源:mangen.cpp

示例6: oneLineComment

void VhdlParser::oneLineComment(QCString qcs)
{
  bool isEndCode=qcs.contains("\\endcode");

  int index = qcs.find("\\code");
  if (isEndCode)
  {
    int end = inputString.find(qcs.data(),iCodeLen);
    makeInlineDoc(end);
  }
  else if (index > 0)
  {
    // assert(false);
    strComment=qcs;
    startCodeBlock(index);
    strComment.resize(0);
  }

  if (!isEndCode && index==-1)
  {
    int j=qcs.find("--!");
    qcs=qcs.right(qcs.length()-3-j);
    if (!checkMultiComment(qcs,iDocLine))
    {
      handleCommentBlock(qcs,TRUE);
    }
  }
}
开发者ID:CosmicFish,项目名称:CosmicFish,代码行数:28,代码来源:vhdljjparser.cpp

示例7: writeDetailedDescription

void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
  if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || 
      !documentation().isEmpty() ||
      (Config_getBool("SOURCE_BROWSER") && getStartBodyLine()!=-1 && getBodyDef())
     )
  {
    ol.pushGeneratorState();
      ol.disable(OutputGenerator::Html);
      ol.writeRuler();
    ol.popGeneratorState();
    ol.pushGeneratorState();
      ol.disableAllBut(OutputGenerator::Html);
      ol.writeAnchor(0,"details"); 
    ol.popGeneratorState();
    ol.startGroupHeader();
    ol.parseText(title);
    ol.endGroupHeader();

    ol.startTextBlock();
    if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
    {
      ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
    }
    if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && 
        !documentation().isEmpty())
    {
      ol.pushGeneratorState();
        ol.disable(OutputGenerator::Man);
        ol.disable(OutputGenerator::RTF);
        // ol.newParagraph(); // FIXME:PARA
        ol.enableAll();
        ol.disableAllBut(OutputGenerator::Man);
        ol.writeString("\n\n");
      ol.popGeneratorState();
    }
    if (!documentation().isEmpty())
    {
      ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
    }
    //printf("Writing source ref for file %s\n",name().data());
    if (Config_getBool("SOURCE_BROWSER")) 
    {
      ol.startParagraph();
      QCString refText = theTranslator->trDefinedInSourceFile();
      int fileMarkerPos = refText.find("@0");
      if (fileMarkerPos!=-1) // should always pass this.
      {
        ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1
        ol.writeObjectLink(0,getSourceFileBase(),
            0,name());
        ol.parseText(refText.right(
              refText.length()-fileMarkerPos-2)); // text right from marker 2
      }
      ol.endParagraph();
    }
    ol.endTextBlock();
  }
}
开发者ID:,项目名称:,代码行数:59,代码来源:

示例8: writeAux

bool CiteDict::writeAux()
{
  //msg("..writing aux file\n");
  QCString auxFileName(m_baseFileName + ".aux");
  QFile auxFile(auxFileName);
  if (!auxFile.open(IO_WriteOnly)) 
    // point it to something valid, because warn() relies on it
  {
    err("Error opening file %s for output\n", auxFileName.data()); 
    return FALSE;
  }
  FTextStream t(&auxFile);

  QDictIterator<CiteInfo> cdi(m_entries);
  for (CiteInfo *ci = 0; (ci=cdi.current()); ++cdi)
  {
    t << "\\citation{" << ci->label << "}\n";
  }

  t << "\\bibstyle{" << m_baseFileName << "}\n";

  t << "\\bibdata{";
  QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
  const char *bibdata = citeDataList.first();
  while (bibdata)
  {
    QCString bibFile = bibdata;
    if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
    if (!bibFile.isEmpty())
    {
      QFileInfo fi(bibFile);
      if (fi.exists())
      {
        if (!copyFile(bibFile,m_baseFileName+"_"+bibFile))
        {
          return FALSE;
        }
        t << m_baseFileName+"_"+bibFile;
        bibdata = citeDataList.next();
        if (bibdata)
        {
          t << ",";
        }
      }
      else
      {
        err("The file %s specified at CITE_BIB_FILES could not be read!\n",bibdata);
        return FALSE;
      }
    }
    else
    {
      bibdata = citeDataList.next();
    }
  }
  t << "}\n";
  return TRUE;
}
开发者ID:jscipione,项目名称:Doxygen_Haiku,代码行数:58,代码来源:cite.cpp

示例9: getListOfBibFiles

static QCString getListOfBibFiles(const QCString &sep,bool namesOnly)
{
  QCString result;
  QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
  const char *bibdata = citeDataList.first();
  while (bibdata)
  {
    int i;
    QCString bibFile = bibdata;
    if (namesOnly && bibFile.right(4)==".bib") // strip extension
    {
      bibFile = bibFile.left(bibFile.length()-4);
    }
    else
    {
      if (!namesOnly && bibFile.right(4)!=".bib") bibFile += ".bib";
    }
    if ((i=bibFile.findRev('/'))!=-1) // strip path
    {
      bibFile = bibFile.mid(i+1);
    }
    if (!bibFile.isEmpty())
    {
      if (namesOnly) // bare names
      {
        result+=bibFile;
      }
      else // add quotes for paths with spaces
      {
        result+="\""+bibFile+"\""; 
      }
      bibdata = citeDataList.next();
      if (bibdata)
      {
        result+=sep;
      }
    }
    else
    {
      bibdata = citeDataList.next();
    }
  }
  return result;
}
开发者ID:CN-Sean,项目名称:doxygen,代码行数:44,代码来源:cite.cpp

示例10: stripWord

//----------------------------------------------------------------------------
// strips w from s iff s starts with w
static bool stripWord(QCString &s,QCString w)
{
  bool success=FALSE;
  if (s.left(w.length())==w) 
  {
    success=TRUE;
    s=s.right(s.length()-w.length());
  }
  return success;
}
开发者ID:kevinoupeng,项目名称:mydg,代码行数:12,代码来源:definition.cpp

示例11: setEncoding

void FileIn::setEncoding(QCString s) {
  if (s.left(3).lower() == "utf") {
    if (s.right(1) != "8") {
      UmlCom::trace("sorry, in the UTF encoding, only UTF-8 is managed");
      throw 0;
    }
    else
      _utf8 = TRUE;
  }
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例12: visitPre

void LatexDocVisitor::visitPre(DocImage *img)
{
    if (img->type()==DocImage::Latex)
    {
        if (m_hide) return;
        QCString gfxName = img->name();
        if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
        {
            gfxName=gfxName.left(gfxName.length()-4);
        }

        visitPreStart(m_t,img->hasCaption(), gfxName, img->width(),  img->height());
    }
    else // other format -> skip
    {
        pushEnabled();
        m_hide=TRUE;
    }
}
开发者ID:LianYangCn,项目名称:doxygen,代码行数:19,代码来源:latexdocvisitor.cpp

示例13: stripPath

static QCString stripPath(const QCString &s)
{
  int i=s.findRev('/');
  if (i!=-1)
  {
    return s.right(s.length()-i-1);
  }
  else
  {
    return s;
  }
}
开发者ID:kaos,项目名称:doxygen,代码行数:12,代码来源:tagreader.cpp

示例14: label

QCString DiagramItem::label() const
{
  QCString result;
  if (!templSpec.isEmpty())
  {
    // we use classDef->name() here and not diplayName() in order
    // to get the name used in the inheritance relation.
    QCString n = classDef->name();
    if (n.right(2)=="-g" || n.right(2)=="-p")
    {
      n = n.left(n.length()-2);
    }
    result=insertTemplateSpecifierInScope(n,templSpec);
  }
  else
  {
    result=classDef->displayName();
  }
  if (Config_getBool("HIDE_SCOPE_NAMES")) result=stripScope(result);
  return result;
}
开发者ID:augsod,项目名称:doxygen-uno,代码行数:21,代码来源:diagram.cpp

示例15: writePathFragment

void Definition::writePathFragment(OutputList &ol) const
{
  makeResident();
  if (m_impl->outerScope && m_impl->outerScope!=Doxygen::globalScope)
  {
    m_impl->outerScope->writePathFragment(ol);
  }
  ol.writeString("      <li class=\"navelem\">");
  if (isLinkable())
  {
    if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle())
    {
      ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const GroupDef*)this)->groupTitle());
    }
    else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty())
    {
      ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const PageDef*)this)->title());
    }
    else if (definitionType()==Definition::TypeClass)
    {
      QCString name = m_impl->localName;
      if (name.right(2)=="-p" || name.right(2)=="-g")
      {
        name = name.left(name.length()-2);
      }
      ol.writeObjectLink(getReference(),getOutputFileBase(),0,name);
    }
    else
    {
      ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_impl->localName);
    }
  }
  else
  {
    ol.startBold();
    ol.docify(m_impl->localName);
    ol.endBold();
  }
  ol.writeString("      </li>\n");
}
开发者ID:jscipione,项目名称:Doxygen_Haiku,代码行数:40,代码来源:definition.cpp


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