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


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

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


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

示例1: if

static QCString node2URL(FTVNode *n,bool overruleFile=FALSE,bool srcLink=FALSE)
{
    QCString url = n->file;
    if (!url.isEmpty() && url.at(0)=='!')  // relative URL
    {
        // remove leading !
        url = url.mid(1);
    }
    else if (!url.isEmpty() && url.at(0)=='^') // absolute URL
    {
        // skip, keep ^ in the output
    }
    else // local file (with optional anchor)
    {
        if (overruleFile && n->def && n->def->definitionType()==Definition::TypeFile)
        {
            FileDef *fd = (FileDef*)n->def;
            if (srcLink)
            {
                url = fd->getSourceFileBase();
            }
            else
            {
                url = fd->getOutputFileBase();
            }
        }
        url+=Doxygen::htmlFileExtension;
        if (!n->anchor.isEmpty()) url+="#"+n->anchor;
    }
    return url;
}
开发者ID:LianYangCn,项目名称:doxygen,代码行数:31,代码来源:ftvhelp.cpp

示例2: getExtension

static QCString getExtension()
{
  /*
   * [.][nuber][rest]
   * in case of . missing, just ignore it
   * in case number missing, just place a 3 in front of it
   */
  QCString ext = Config_getString("MAN_EXTENSION");
  if (ext.isEmpty())
  {
    ext = "3"; 
  }
  else
  {
    if (ext.at(0)=='.')
    {
      if (ext.length()==1)
      {
        ext = "3"; 
      }
      else // strip .
      {
        ext = ext.mid(1);
      }
    }
    if (ext.at(0)<'0' || ext.at(0)>'9')
    {
      ext.prepend("3");
    }
  }
  return ext;
}
开发者ID:AmesianX,项目名称:doxygen,代码行数:32,代码来源:mangen.cpp

示例3: _setBriefDescription

void Definition::_setBriefDescription(const char *b,const char *briefFile,int briefLine)
{
  static QCString outputLanguage = "English";
  static bool needsDot = outputLanguage!="Japanese" && 
                         outputLanguage!="Chinese" &&
                         outputLanguage!="Korean";
  QCString brief = b;
  brief = brief.stripWhiteSpace();
  if (brief.isEmpty()) return;
  int bl = brief.length();
  if (bl>0 && needsDot) // add punctuation if needed
  {
    int c = brief.at(bl-1);
    switch(c)
    {
      case '.': case '!': case '?': case '>': case ':': case ')': break;
      default: 
        if (uni_isupper(brief.at(0)) && !lastCharIsMultibyte(brief)) brief+='.'; 
        break;
    }
  }

  if (!_docsAlreadyAdded(brief,m_impl->briefSignatures))
  {
    if (m_impl->brief && !m_impl->brief->doc.isEmpty())
    {
       //printf("adding to details\n");
       _setDocumentation(brief,briefFile,briefLine,FALSE,TRUE);
    }
    else
    {
      //fprintf(stderr,"Definition::setBriefDescription(%s,%s,%d)\n",b,briefFile,briefLine);
      if (m_impl->brief==0)
      {
        m_impl->brief = new BriefInfo;
      }
      m_impl->brief->doc=brief;
      if (briefLine!=-1)
      {
        m_impl->brief->file = briefFile;
        m_impl->brief->line = briefLine;
      }
      else
      {
        m_impl->brief->file = briefFile;
        m_impl->brief->line = 1;
      }
    }
  }
  else
  {
    //printf("do nothing!\n");
  }
}
开发者ID:kevinoupeng,项目名称:mydg,代码行数:54,代码来源:definition.cpp

示例4: CommentData

 CommentData(const QCString & f, const int l, const QCString & t) :
     isJavaStyle(false),
     isQtStyle(false),
     line(l),
     fileName(f)
 {
     isJavaStyle = t.length()>0 && t.at(0)=='*';
     isQtStyle = t.length()>0 && t.at(0)=='!';
     shouldIgnore = (!isJavaStyle && !isQtStyle);
     associateWithPrevious = (t.length()>1 && t.at(1)=='<');
     if (associateWithPrevious)
     { text = t.mid(2); }
     else
     { text = t.mid(1); }
 }
开发者ID:Exarchiasghost,项目名称:doxygen,代码行数:15,代码来源:dbusxmlscanner.cpp

示例5: compat_fromOldIndexString

//--- For compatability with old index files
void KMMsgInfo::compat_fromOldIndexString(const QCString& str, bool toUtf8)
{
    char *start, *offset;

    if(!kd)
        kd = new KMMsgInfoPrivate;
    kd->modifiers = KMMsgInfoPrivate::ALL_SET;
    kd->xmark   = str.mid(33, 3).stripWhiteSpace();
    kd->folderOffset = str.mid(2,9).toULong();
    kd->msgSize = str.mid(12,9).toULong();
    kd->date = (time_t)str.mid(22,10).toULong();
    mStatus = (KMMsgStatus)str.at(0);
    if (toUtf8) {
        kd->subject = str.mid(37, 100).stripWhiteSpace();
        kd->from = str.mid(138, 50).stripWhiteSpace();
        kd->to = str.mid(189, 50).stripWhiteSpace();
    } else {
        start = offset = str.data() + 37;
        while (*start == ' ' && start - offset < 100) start++;
        kd->subject = QString::fromUtf8(str.mid(start - str.data(),
            100 - (start - offset)), 100 - (start - offset));
        start = offset = str.data() + 138;
        while (*start == ' ' && start - offset < 50) start++;
        kd->from = QString::fromUtf8(str.mid(start - str.data(),
            50 - (start - offset)), 50 - (start - offset));
        start = offset = str.data() + 189;
        while (*start == ' ' && start - offset < 50) start++;
        kd->to = QString::fromUtf8(str.mid(start - str.data(),
            50 - (start - offset)), 50 - (start - offset));
    }
    kd->replyToIdMD5 = str.mid(240, 22).stripWhiteSpace();
    kd->msgIdMD5 = str.mid(263, 22).stripWhiteSpace();
    mDirty = false;
}
开发者ID:,项目名称:,代码行数:35,代码来源:

示例6: getContents

QCString OutputGenerator::getContents() const
{
  QCString s;
  s.resize(a.size()+1);
  memcpy(s.data(),a.data(),a.size());
  s.at(a.size())='\0';
  return s;
}
开发者ID:tch-opensrc,项目名称:TC72XX_LxG1.0.10mp5_OpenSrc,代码行数:8,代码来源:outputgen.cpp

示例7: matchExcludedSymbols

static bool matchExcludedSymbols(const char *name)
{
  static QStrList &exclSyms = Config_getList("EXCLUDE_SYMBOLS");
  if (exclSyms.count()==0) return FALSE; // nothing specified
  const char *pat = exclSyms.first();
  QCString symName = name;
  while (pat)
  {
    QCString pattern = pat;
    bool forceStart=FALSE;
    bool forceEnd=FALSE;
    if (pattern.at(0)=='^') 
      pattern=pattern.mid(1),forceStart=TRUE;
    if (pattern.at(pattern.length()-1)=='$') 
      pattern=pattern.left(pattern.length()-1),forceEnd=TRUE;
    if (pattern.find('*')!=-1) // wildcard mode
    {
      QRegExp re(substitute(pattern,"*",".*"),TRUE);
      int i,pl;
      i = re.match(symName,0,&pl);
      //printf("  %d = re.match(%s) pattern=%s\n",i,symName.data(),pattern.data());
      if (i!=-1) // wildcard match
      {
        int sl=symName.length();
        // check if it is a whole word match
        if ((i==0     || pattern.at(0)=='*'    || (!isId(symName.at(i-1))  && !forceStart)) &&
            (i+pl==sl || pattern.at(i+pl)=='*' || (!isId(symName.at(i+pl)) && !forceEnd))
           )
        {
          //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i);
          return TRUE;
        }
      }
    }
    else if (!pattern.isEmpty()) // match words
    {
      int i = symName.find(pattern);
      if (i!=-1) // we have a match!
      {
        int pl=pattern.length();
        int sl=symName.length();
        // check if it is a whole word match
        if ((i==0     || (!isId(symName.at(i-1))  && !forceStart)) &&
            (i+pl==sl || (!isId(symName.at(i+pl)) && !forceEnd))
           )
        {
          //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i);
          return TRUE; 
        }
      }
    }
    pat = exclSyms.next();
  }
  //printf("--> name=%s: no match\n",name);
  return FALSE;
}
开发者ID:jscipione,项目名称:Doxygen_Haiku,代码行数:56,代码来源:definition.cpp

示例8: visit

void HtmlDocVisitor::visit(DocFormula *f)
{
  if (m_hide) return;
  bool bDisplay = !f->isInline();
  if (bDisplay) 
  {
    forceEndParagraph(f);
    m_t << "<p class=\"formulaDsp\">" << endl;
  }

  if (Config_getBool("USE_MATHJAX"))
  {
    QCString text = f->text();
    bool closeInline = FALSE;
    if (!bDisplay && !text.isEmpty() && text.at(0)=='$' && 
                      text.at(text.length()-1)=='$')
    {
      closeInline=TRUE;
      text = text.mid(1,text.length()-2);
      m_t << "\\(";
    }
    m_t << convertToHtml(text);
    if (closeInline)
    {
      m_t << "\\)";
    }
  }
  else
  {
    m_t << "<img class=\"formula" 
      << (bDisplay ? "Dsp" : "Inl");
    m_t << "\" alt=\"";
    filterQuotedCdataAttr(f->text());
    m_t << "\"";
    /// @todo cache image dimensions on formula generation and give height/width
    /// for faster preloading and better rendering of the page
    m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";

  }
  if (bDisplay)
  {
    m_t << endl << "</p>" << endl;
    forceStartParagraph(f);
  }
}
开发者ID:,项目名称:,代码行数:45,代码来源:

示例9: update

void cTextField::update() {
	// Extract the portion of the string we're going to work on
	QCString substring = text_.right(text_.length() - leftOffset_);
	
	if (password_) {
		for (unsigned int i = 0; i < substring.length(); ++i) {
			substring.at(i) = '*';
		}
	}

	// XXXXX TODO: These surfaces in general are too long. 
	// Make sure the text is cropped after X pixels

	if (!surfaces[0]) {
		surfaces[0] = AsciiFonts->buildText(font_, substring, hue_, false, ALIGN_LEFT, hueAll_);
		/*if (selection_ != 0) {
			drawSelection(surfaces[0]);
		}*/
	}

	if (!surfaces[1] && mouseOverHue_ != -1) {
		surfaces[1] = AsciiFonts->buildText(font_, substring, mouseOverHue_, false, ALIGN_LEFT, hueAll_);
		/*if (selection_ != 0) {
			drawSelection(surfaces[1]);
		}*/
	}

	if (!surfaces[1] && focusHue_ != -1) {
		surfaces[1] = AsciiFonts->buildText(font_, substring, focusHue_, false, ALIGN_LEFT, hueAll_);
		/*if (selection_ != 0) {
			drawSelection(surfaces[2]);
		}*/
	}

	if (!surfaces[2] && focusHue_ != -1) {
		surfaces[2] = AsciiFonts->buildText(font_, substring, focusHue_, false, ALIGN_LEFT, hueAll_);
		/*if (selection_ != 0) {
			drawSelection(surfaces[2]);
		}*/
	}

	if (!surfaces[2] && mouseOverHue_ != -1) {
		surfaces[2] = AsciiFonts->buildText(font_, substring, mouseOverHue_, false, ALIGN_LEFT, hueAll_);
		/*if (selection_ != 0) {
			drawSelection(surfaces[2]);
		}*/
	}

	dirty = false;
}
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:50,代码来源:textfield.cpp

示例10: legalName

QCString legalName(QCString s)
{
  for (unsigned index = 0; index != s.length(); index += 1) {
    char c = s.at(index);
    
    if ((c != '_') && 
	!((c >= 'a') && (c <= 'z')) &&
        !((c >= 'A') && (c <= 'Z')) &&
	!((c >= '0') && (c <= '9'))) {
      s.replace(index, 1, "__");
      index += 1;
    }
  }

  return s;
}
开发者ID:gregsmirnov,项目名称:bouml,代码行数:16,代码来源:util.cpp

示例11: parseDoc

void OutputList::parseDoc(const char *fileName,int startLine,
                          Definition *ctx,MemberDef * md,
                          const QCString &docStr,bool indexWords,
                          bool isExample,const char *exampleName,
                          bool singleLine,bool linkFromIndex)
{
    int count=0;
    if (docStr.isEmpty()) return;

    OutputGenerator *og=outputs->first();
    while (og)
    {
        if (og->isEnabled()) count++;
        og=outputs->next();
    }
    if (count==0) return; // no output formats enabled.

    DocNode *root=0;
    if (docStr.at(docStr.length()-1)=='\n')
    {
        root = validatingParseDoc(fileName,startLine,
                                  ctx,md,docStr,indexWords,isExample,exampleName,
                                  singleLine,linkFromIndex);
    }
    else
    {
        root = validatingParseDoc(fileName,startLine,
                                  ctx,md,docStr+"\n",indexWords,isExample,exampleName,
                                  singleLine,linkFromIndex);
    }

    og=outputs->first();
    while (og)
    {
        //printf("og->printDoc(extension=%s)\n",
        //    ctx?ctx->getDefFileExtension().data():"<null>");
        if (og->isEnabled()) og->printDoc(root,ctx?ctx->getDefFileExtension():QCString(""));
        og=outputs->next();
    }

    delete root;
}
开发者ID:tuxdna,项目名称:Doxygen,代码行数:42,代码来源:outputlist.cpp

示例12: replaceSelection

void cTextField::replaceSelection(const QCString &replacement) {
	// Delete the selection, reposition caret_, then reinsert
	if (selection_ != 0) {
		if (selection_ < 0) {
			setCaret(caret_ + selection_); // Place the caret at the start of the selection
			selection_ = - selection_;
		}
		for (int i = 0; i < selection_ && caret_ < text_.length(); ++i) {
			text_.remove(caret_, 1);
		}
		selection_ = 0;
		invalidateText();
	}

	// Insert text at the caret
	int i;
	for (i = 0; i < (int)replacement.length() && text_.length() + 1 <= maxLength_; ++i) {
		text_.insert(caret_ + i, replacement.at(i));
	}
	setCaret(caret_ + i);
}
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:21,代码来源:textfield.cpp

示例13: writeTooltips

void TooltipManager::writeTooltips(CodeOutputInterface &ol)
{
  QDictIterator<Definition> di(p->tooltipInfo);
  Definition *d;
  for (di.toFirst();(d=di.current());++di)
  {
    DocLinkInfo docInfo;
    docInfo.name   = d->qualifiedName();
    docInfo.ref    = d->getReference();
    docInfo.url    = d->getOutputFileBase();
    docInfo.anchor = d->anchor();
    SourceLinkInfo defInfo;
    if (d->getBodyDef() && d->getStartBodyLine()!=-1)
    {
      defInfo.file    = d->getBodyDef()->name();
      defInfo.line    = d->getStartBodyLine();
      defInfo.url     = d->getSourceFileBase();
      defInfo.anchor  = d->getSourceAnchor();
    }
    SourceLinkInfo declInfo; // TODO: fill in...
    QCString decl;
    if (d->definitionType()==Definition::TypeMember)
    {
      MemberDef *md = (MemberDef*)d;
      decl = md->declaration();
      if (!decl.isEmpty() && decl.at(0)=='@') // hide enum values
      {
        decl.resize(0);
      }
    }
    ol.writeTooltip(di.currentKey(),                 // id
                    docInfo,                         // symName
                    decl,                            // decl
                    d->briefDescriptionAsTooltip(),  // desc
                    defInfo,
                    declInfo
                   );
  }
}
开发者ID:Beachy13,项目名称:doxygen,代码行数:39,代码来源:tooltip.cpp

示例14: addContentsItem

void Qhp::addContentsItem(bool /*isDir*/, const char * name, 
                          const char * /*ref*/, const char * file, 
                          const char *anchor, bool /* separateIndex */,
                          bool /* addToNavIndex */,
                          Definition * /*def*/)
{
  //printf("Qhp::addContentsItem(%s) %d\n",name,m_sectionLevel);
  // Backup difference before modification

  QCString f = file;
  if (!f.isEmpty() && f.at(0)=='^') return; // absolute URL not supported

  int diff = m_prevSectionLevel - m_sectionLevel;

  handlePrevSection();
  setPrevSection(name, f, anchor, m_sectionLevel);

  // Close sections as needed
  //printf("Qhp::addContentsItem() closing %d sections\n",diff);
  for (; diff > 0; diff--)
  {
    m_toc.close("section");
  }
}
开发者ID:fjtc,项目名称:doxygen,代码行数:24,代码来源:qhp.cpp

示例15: if

static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
{
  // + declaration/definition arg lists
  // + reimplements
  // + reimplementedBy
  // + exceptions
  // + const/volatile specifiers
  // - examples
  // + source definition
  // + source references
  // + source referenced by
  // - body code
  // + template arguments
  //     (templateArguments(), definitionTemplateParameterLists())
  // - call graph

  // enum values are written as part of the enum
  if (md->memberType()==MemberType_EnumValue) return;
  if (md->isHidden()) return;
  //if (md->name().at(0)=='@') return; // anonymous member

  // group members are only visible in their group
  //if (def->definitionType()!=Definition::TypeGroup && md->getGroupDef()) return;
  QCString memType;
#if 0
  // member
  idx = sqlite3_bind_parameter_index(stmt, ":refid");
  sqlite3_bind_text(stmt, idx, memberOutputFileBase(md).data(),-1,SQLITE_TRANSIENT);

  idx = sqlite3_bind_parameter_index(stmt,":kind");
  sqlite3_bind_int(stmt, idx, md->memberType());

  idx = sqlite3_bind_parameter_index(stmt, ":name");
  sqlite3_bind_text(stmt, idx, md->name().data(),-1,SQLITE_TRANSIENT);
#endif
  // memberdef
  bindTextParameter(i_s_memberdef,":refid",md->anchor());
  bindIntParameter(i_s_memberdef,":kind",md->memberType());
  bindIntParameter(i_s_memberdef,":prot",md->protection());
  bindIntParameter(i_s_memberdef,":static",md->isStatic());

  bool isFunc=FALSE;
  switch (md->memberType())
  {
    case MemberType_Function: // fall through
    case MemberType_Signal:   // fall through
    case MemberType_Friend:   // fall through
    case MemberType_DCOP:     // fall through
    case MemberType_Slot:        
      isFunc=TRUE; 
      break;
    default: 
      break;
  }
  if (isFunc)
  {
    LockingPtr<ArgumentList> al = md->argumentList();
    if (al!=0 && al->constSpecifier) 
    {
      bindIntParameter(i_s_memberdef,":const",al->constSpecifier);
    }

    bindIntParameter(i_s_memberdef,":explicit",md->isExplicit());
    bindIntParameter(i_s_memberdef,":inline",md->isInline());
    bindIntParameter(i_s_memberdef,":final",md->isFinal());
    bindIntParameter(i_s_memberdef,":sealed",md->isSealed());
    bindIntParameter(i_s_memberdef,":new",md->isNew());
    bindIntParameter(i_s_memberdef,":optional",md->isOptional());
    bindIntParameter(i_s_memberdef,":required",md->isRequired());
    bindIntParameter(i_s_memberdef,":virt",md->virtualness());
  }
  // place in the arguments and linkify the arguments

  if (md->memberType() == MemberType_Variable)
  {
    bindIntParameter(i_s_memberdef,":mutable",md->isMutable());
    bindIntParameter(i_s_memberdef,":initonly",md->isInitonly());
  }
  else if (md->memberType() == MemberType_Property)
  {
    bindIntParameter(i_s_memberdef,":readable",md->isReadable());
    bindIntParameter(i_s_memberdef,":writable",md->isWritable());
    bindIntParameter(i_s_memberdef,":gettable",md->isGettable());
    bindIntParameter(i_s_memberdef,":settable",md->isSettable());

    if (md->isAssign() || md->isCopy() || md->isRetain())
    {
      int accessor = md->isAssign() ? md->isAssign() :
          (md->isCopy() ? md->isCopy() : md->isRetain()) ;

      bindIntParameter(i_s_memberdef,":accessor",accessor);
    }
  }
  else if (md->memberType() == MemberType_Event)
  {
    bindIntParameter(i_s_memberdef,":addable",md->isAddable());
    bindIntParameter(i_s_memberdef,":removable",md->isRemovable());
    bindIntParameter(i_s_memberdef,":raisable",md->isRaisable());
  }

//.........这里部分代码省略.........
开发者ID:adei-kit,项目名称:kitcube-tools,代码行数:101,代码来源:sqlite3gen.cpp


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