本文整理汇总了C++中AST_Decl::repoID方法的典型用法代码示例。如果您正苦于以下问题:C++ AST_Decl::repoID方法的具体用法?C++ AST_Decl::repoID怎么用?C++ AST_Decl::repoID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AST_Decl
的用法示例。
在下文中一共展示了AST_Decl::repoID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: si
int
ifr_removing_visitor::visit_scope (UTL_Scope *node)
{
// Proceed if the number of members in our scope is greater than 0.
if (node->nmembers () > 0)
{
// Initialize an iterator to iterate over our scope.
UTL_ScopeActiveIterator si (node,
UTL_Scope::IK_decls);
AST_Decl *d = 0;
try
{
// Continue until each element is visited.
while (!si.is_done ())
{
d = si.item ();
if (d == 0)
{
ORBSVCS_ERROR_RETURN ((
LM_ERROR,
ACE_TEXT ("(%N:%l) ifr_removing_visitor::visit_scope -")
ACE_TEXT (" bad node in this scope\n")
),
-1
);
}
if (d->node_type () == AST_Decl::NT_pre_defined)
{
// We can skip these - they don't get destroyed in the IfR.
si.next ();
continue;
}
CORBA::Contained_var top_level =
be_global->repository ()->lookup_id (d->repoID ());
if (!CORBA::is_nil (top_level.in ()))
{
// All we have to do is call destroy() on each IR object
// in the global scope, because destroy() works on all
// the contents recursively.
top_level->destroy ();
}
si.next ();
}
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception (
ACE_TEXT (
"ifr_removing_visitor::visit_scope"));
return -1;
}
}
return 0;
}