本文整理汇总了C++中AST_Decl::dump方法的典型用法代码示例。如果您正苦于以下问题:C++ AST_Decl::dump方法的具体用法?C++ AST_Decl::dump怎么用?C++ AST_Decl::dump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AST_Decl
的用法示例。
在下文中一共展示了AST_Decl::dump方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// Dump this AST_Factory node to the ostream o.
void
AST_Finder::dump (ACE_OSTREAM_TYPE &o)
{
AST_Decl *d = 0;
this->dump_i (o, "finder ");
this->local_name ()->dump (o);
this->dump_i (o, "(");
// Iterator must be explicitly advanced inside the loop.
for (UTL_ScopeActiveIterator i (this, IK_decls);
!i.is_done ();)
{
d = i.item ();
d->dump (o);
i.next ();
if (!i.is_done())
{
this->dump_i (o, ", ");
}
}
this->dump_i (o, ")");
}
示例2: if
// Dump this AST_Operation node (an operation) to the ostream o.
void
AST_Operation::dump (ACE_OSTREAM_TYPE &o)
{
AST_Decl *d = 0;
AST_Type *e = 0;
UTL_String *s = 0;
if (this->pd_flags == OP_oneway)
{
this->dump_i (o, "oneway ");
}
else if (this->pd_flags == OP_idempotent)
{
this->dump_i (o, "idempotent ");
}
this->pd_return_type->name ()->dump (o);
this->dump_i (o, " ");
this->local_name ()->dump (o);
this->dump_i (o, "(");
// Must advance the iterator explicity inside the loop.
for (UTL_ScopeActiveIterator i (this, IK_decls); !i.is_done ();)
{
d = i.item ();
d->dump (o);
i.next ();
if (!i.is_done())
{
this->dump_i (o, ", ");
}
}
this->dump_i (o, ")");
if (this->pd_exceptions != 0)
{
this->dump_i (o, " raises(");
// Must advance the iterator explicity inside the loop.
for (UTL_ExceptlistActiveIterator ei (this->pd_exceptions);
!ei.is_done ();)
{
e = ei.item ();
ei.next ();
e->local_name ()->dump (o);
if (!ei.is_done())
{
this->dump_i (o, ", ");
}
}
this->dump_i (o, ")");
}
if (this->pd_context != 0)
{
this->dump_i (o, " context(");
// Must advance the iterator explicity inside the loop.
for (UTL_StrlistActiveIterator si (this->pd_context); !si.is_done();)
{
s = si.item ();
si.next ();
this->dump_i (o, s->get_string ());
if (!si.is_done())
{
this->dump_i (o, ", ");
}
}
this->dump_i (o, ")");
}
}
示例3: GTDEVEL
// AST Dumping
void
UTL_Scope::dump(ostream &o)
{
UTL_ScopeActiveIterator *i;
AST_Decl *d;
if (idl_global->indent() == NULL)
idl_global->set_indent(new UTL_Indenter());
idl_global->indent()->increase();
if (pd_locals_used > 0)
{
i = new UTL_ScopeActiveIterator(this, UTL_Scope::IK_localtypes);
o << GTDEVEL("\n/* Current Pragma: */\n");
pd_pragmas.dump(o);
o << GTDEVEL("\n/* Locally defined types: */\n");
while (!(i->is_done()))
{
d = i->item();
if (!d->imported())
{
idl_global->indent()->skip_to(o);
d->dump(o);
o << "\n";
}
i->next();
}
delete i;
}
if (pd_decls_used > 0)
{
i = new UTL_ScopeActiveIterator(this, UTL_Scope::IK_decls);
o << GTDEVEL("\n/* Declarations: */\n");
while (!(i->is_done()))
{
d = i->item();
if (!d->imported())
{
idl_global->indent()->skip_to(o);
d->dump(o);
o << ";\n";
}
i->next();
}
delete i;
}
idl_global->indent()->decrease();
}