您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ visitNodes函数代码示例

51自学网 2021-06-03 09:43:08
  C++
这篇教程C++ visitNodes函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中visitNodes函数的典型用法代码示例。如果您正苦于以下问题:C++ visitNodes函数的具体用法?C++ visitNodes怎么用?C++ visitNodes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: visit

void DefaultVisitor::visitDeclarator(DeclaratorAST *node){  visit(node->sub_declarator);  visitNodes(this, node->ptr_ops);  visit(node->id);  visit(node->bit_expression);  visitNodes(this, node->array_dimensions);  visit(node->parameter_declaration_clause);  visit(node->exception_spec);}
开发者ID:FrankLIKE,项目名称:qtd,代码行数:10,


示例2: traverseDir

/* *  traverseDir() *	For use with all FATs outside of the initial root directory on *	12 and 16 bit FAT file systems.  This is a general purpose routine *	that can be used simply to visit all of the nodes in the metadata or *	to find the first instance of something, e.g., the first directory *	entry where the file is marked deleted. * *	Unique Input is: *	startAt *		starting cluster of the directory * *	This is the cluster that is the first one in this directory. *	We read it right away, so we can provide it as data to visitNodes(). *	Note that we cache this cluster as we read it, because it is *	metadata and we cache all metadata.  By doing so, we can *	keep pointers to directory entries for quickly moving around and *	fixing up any problems we find.  Of course if we get a big *	filesystem with a huge amount of metadata we may be hosed, as *	we'll likely run out of memory. * *	I believe in the future this will have to be addressed.  It *	may be possible to do more of the processing of problems *	within directories as they are cached, so that when memory *	runs short we can free cached directories we are already *	finished visiting. * *	The remainder of inputs are described in visitNodes() comments. */voidtraverseDir(int fd, int32_t startAt, int depth, int descend, int operation,    char matchRequired,  struct pcdir **found, int32_t *lastDirCluster,    struct pcdir **dirEnd, char *recordPath, int *pathLen){	ClusterContents dirdata;	int32_t dirdatasize = 0;	if (startAt < FIRST_CLUSTER || startAt > LastCluster)		return;	if (readCluster(fd, startAt, &(dirdata.bytes), &dirdatasize,	    RDCLUST_DO_CACHE) != RDCLUST_GOOD) {		(void) fprintf(stderr,		    gettext("Unable to get more directory entries!/n"));		return;	}	if (operation == PCFS_TRAVERSE_ALL) {		if (Verbose)			(void) fprintf(stderr,			    gettext("Directory traversal enters "			    "allocation unit %d./n"), startAt);	}	visitNodes(fd, startAt, &dirdata, dirdatasize, depth, descend,	    operation, matchRequired, found, lastDirCluster, dirEnd,	    recordPath, pathLen);}
开发者ID:alhazred,项目名称:onarm,代码行数:57,


示例3: visitNodes

void CodeModelFinder::visitName(NameAST *node){  visitNodes(this, node->qualified_names);  if (_M_resolve_policy == ResolveItem)    visit(node->unqualified_name);}
开发者ID:FrankLIKE,项目名称:qtd,代码行数:7,


示例4: traverseFromRoot

/* *  traverseFromRoot() *	For use with 12 and 16 bit FATs that have a root directory outside *	of the file system.  This is a general purpose routine that *	can be used simply to visit all of the nodes in the metadata or *	to find the first instance of something, e.g., the first directory *	entry where the file is marked deleted. * *	Inputs are described in the commentary for visitNodes() above. */voidtraverseFromRoot(int fd, int depth, int descend, int operation,    char matchRequired,  struct pcdir **found, int32_t *lastDirCluster,    struct pcdir **dirEnd, char *recordPath, int *pathLen){	visitNodes(fd, FAKE_ROOTDIR_CLUST, &TheRootDir, RootDirSize, depth,	    descend, operation, matchRequired, found, lastDirCluster, dirEnd,	    recordPath, pathLen);}
开发者ID:alhazred,项目名称:onarm,代码行数:19,


示例5: visitNodes

void TypeCompiler::run(const ListNode< PtrOperatorAST* > *ptr_ops){    visitNodes(this, ptr_ops);    if (isRef) m_realType.setIsRef(true);    int offset = m_realType.pointerDepth();    m_realType.setPointerDepth(offset + pointerDepth.count());    for (int i = 0; i < pointerDepth.count(); i++) {        if (pointerDepth[i])        m_realType.setIsConstPointer(offset + i, true);    }}
开发者ID:BaderSZ,项目名称:qtbindings,代码行数:11,


示例6: name_cc

void DeclaratorCompiler::run(DeclaratorAST *node){  _M_id.clear();  _M_parameters.clear();  _M_array.clear();  _M_function = false;  _M_reference = false;  _M_variadics = false;  _M_indirection = 0;  if (node)    {      NameCompiler name_cc(_M_binder);      DeclaratorAST *decl = node;      while (decl && decl->sub_declarator)        decl = decl->sub_declarator;      Q_ASSERT (decl != 0);      name_cc.run(decl->id);      _M_id = name_cc.name();      _M_function = (node->parameter_declaration_clause != 0);      if (node->parameter_declaration_clause && node->parameter_declaration_clause->ellipsis)        _M_variadics = true;      visitNodes(this, node->ptr_ops);      visit(node->parameter_declaration_clause);      if (const ListNode<ExpressionAST*> *it = node->array_dimensions)        {          it->toFront();          const ListNode<ExpressionAST*> *end = it;          do            {              QString elt;              if (ExpressionAST *expr = it->element)                {                  const Token &start_token = _M_token_stream->token((int) expr->start_token);                  const Token &end_token = _M_token_stream->token((int) expr->end_token);                  elt += QString::fromUtf8(&start_token.text[start_token.position],                                           (int) (end_token.position - start_token.position)).trimmed();                }              _M_array.append (elt);              it = it->next;            }          while (it != end);        }    }}
开发者ID:henryfung01,项目名称:GameCode4,代码行数:54,


示例7: QLatin1String

void NameCompiler::visitUnqualifiedName(UnqualifiedNameAST *node){  QString tmp_name;  if (node->tilde)    tmp_name += QLatin1String("~");  if (node->id)    tmp_name += _M_token_stream->symbol(node->id)->as_string();  if (OperatorFunctionIdAST *op_id = node->operator_id)    {#if defined(__GNUC__)#warning "NameCompiler::visitUnqualifiedName() -- implement me"#endif      if (op_id->op && op_id->op->op)        {          tmp_name += QLatin1String("operator");          tmp_name += decode_operator(op_id->op->op);          if (op_id->op->close)            tmp_name += decode_operator(op_id->op->close);        }      else if (op_id->type_specifier)        {#if defined(__GNUC__)#warning "don't use an hardcoded string as cast' name"#endif          Token const &tk = _M_token_stream->token ((int) op_id->start_token);          Token const &end_tk = _M_token_stream->token ((int) op_id->end_token);          tmp_name += QString::fromLatin1 (&tk.text[tk.position],                                           (int) (end_tk.position - tk.position)).trimmed ();      }    }  _M_name += tmp_name;  if (node->template_arguments)    {      // ### cleanup      _M_name.last() += QLatin1String("<");      visitNodes(this, node->template_arguments);      _M_name.last().truncate(_M_name.last().count() - 1); // remove the last ','      _M_name.last() += QLatin1String(">");    }}
开发者ID:Peiffert,项目名称:CGoGN,代码行数:46,


示例8: visit

void DefaultVisitor::visitQPropertyDeclaration(QPropertyDeclarationAST *node){  visit(node->type);  visitNodes(this, node->ptr_ops);  visit(node->name);  if (node->getter)    visit(node->getter);  if (node->setter)    visit(node->setter);  if (node->resetter)    visit(node->resetter);  if (node->notifier)    visit(node->notifier);  if (node->designableMethod)    visit(node->designableMethod);  if (node->scriptableMethod)    visit(node->scriptableMethod);}
开发者ID:portaloffreedom,项目名称:kdev-golang-plugin,代码行数:19,


示例9: IndexedString

void NameCompiler::visitUnqualifiedName(UnqualifiedNameAST *node){  IndexedString tmp_name;  if (node->id)    tmp_name = m_session->token_stream->token(node->id).symbol();  if (node->tilde)    tmp_name = IndexedString('~' + tmp_name.byteArray());  if (OperatorFunctionIdAST *op_id = node->operator_id)    {#if defined(__GNUC__)      /* FIXME: unimplemented */#endif      static QString operatorString("operator");      QString tmp = operatorString;      if (op_id->op && op_id->op->op)        tmp +=  decode(m_session, op_id->op, true);      else        tmp += QLatin1String("{...cast...}");      tmp_name = IndexedString(tmp);      m_typeSpecifier = op_id->type_specifier;    }  m_currentIdentifier = tmp_name.str();  m_name.push_back(m_currentIdentifier);  if (node->template_arguments)    {      visitNodes(this, node->template_arguments);    }/*else if(node->end_token == node->start_token + 3 && node->id == node->start_token && m_session->token_stream->token(node->id+1).symbol() == KDevelop::IndexedString('<')) {      ///@todo Represent this nicer in the AST      ///It's probably a type-specifier with instantiation of the default-parameter, like "Bla<>".      m_currentIdentifier.appendTemplateIdentifier( IndexedTypeIdentifier() );    }*/}
开发者ID:cran,项目名称:qtbase,代码行数:38,


示例10: visitNodes

void DefaultVisitor::visitTranslationUnit(TranslationUnitAST *node){  visitNodes(this, node->declarations);}
开发者ID:FrankLIKE,项目名称:qtd,代码行数:4,



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


C++ visit_end_struct函数代码示例
C++ visitNode函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。