int ast_visitor_tmpl_module_inst::visit_scope (UTL_Scope *node) { for (UTL_ScopeActiveIterator si (node, UTL_Scope::IK_decls); !si.is_done (); si.next ()) { AST_Decl *d = si.item (); if (d == 0) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ast_visitor_tmpl_module_inst::") ACE_TEXT ("visit_scope - ") ACE_TEXT ("bad node in this scope\n")), -1); } // Send the visitor. if (d == 0 || d->ast_accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ast_visitor_tmpl_module_inst::") ACE_TEXT ("visit_scope - ") ACE_TEXT ("codegen for scope failed\n")), -1); } } return 0; }
int idl2jni_visitor::visit_scope(UTL_Scope *node) { if (node->nmembers() > 0) { UTL_ScopeActiveIterator si(node, UTL_Scope::IK_decls); AST_Decl *d = 0; while (!si.is_done()) { d = si.item(); if (d == 0) { ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%N:%l) idl2jni_visitor::visit_") ACE_TEXT("scope - bad node in this scope\n")), -1); } if (d->node_type() == AST_Decl::NT_pre_defined) { si.next(); continue; } if (d->ast_accept(this) == -1) { ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%N:%l) idl2jni_visitor::visit_") ACE_TEXT("scope - failed to accept visitor\n")), -1); } si.next(); } } return 0; }
int ast_visitor_reifying::visit_param_holder (AST_Param_Holder *node) { size_t i = 0; FE_Utils::T_ARGLIST const *t_args = this->ctx_->template_args (); for (FE_Utils::T_PARAMLIST_INFO::ITERATOR iter ( *this->ctx_->template_params ()); !iter.done (); iter.advance (), ++i) { FE_Utils::T_Param_Info *item = 0; iter.next (item); ACE_CString name (item->name_); /// The param holder's info->name_ may be the same as the /// node's local name, but if the node comes from an /// alias, info->name_ will be the name of the alias's /// referenced template module parameter, while the local /// name will be that of the corresponding alias param /// name, which is what we want. if (name == node->local_name ()->get_string ()) { AST_Decl **ret_ptr = 0; if (t_args->get (ret_ptr, i) == 0) { AST_Decl *candidate = *ret_ptr; return candidate->ast_accept (this); } else { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ast_visitor_reifying::") ACE_TEXT ("visit_param_holder() - access of ") ACE_TEXT ("current template arglist failed - ") ACE_TEXT ("param=%C scope=%C index=%d\n"), item->name_.c_str (), ScopeAsDecl (idl_global->scopes ().top ())->full_name (), i), -1); } } } ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ast_visitor_reifying::") ACE_TEXT ("visit_param_holder() - no match for ") ACE_TEXT ("template param %C in %C\n"), node->local_name ()->get_string (), ScopeAsDecl (idl_global->scopes ().top ())->full_name ()), -1); }
// // visit_scope // int Provides_Svnt_Impl::visit_scope (UTL_Scope * node) { // Interfaces could be in a different IDL file, so we don't want to // skip them as the default visit_scope implementation does for (UTL_ScopeActiveIterator si (node, UTL_Scope::IK_decls); !si.is_done (); si.next ()) { AST_Decl * d = si.item (); if (0 != d->ast_accept (this)) return -1; } return 0; }
int ir_simulator_visitor::visit_scope (UTL_Scope *node) { XMI_TRACE ("got a scope"); for (UTL_ScopeActiveIterator si (node, UTL_Scope::IK_decls); !si.is_done (); si.next ()) { AST_Decl *d = si.item (); if (d->ast_accept (this) != 0) { ACE_ERROR_RETURN ((LM_ERROR, "ir_simulator_visitor::visit_scope - " "codegen for scope failed\n"), -1); } } return 0; }