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


C++ AST_Decl::dump方法代码示例

本文整理汇总了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, ")");
}
开发者ID:asdlei00,项目名称:ACE,代码行数:26,代码来源:ast_finder.cpp

示例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, ")");
    }
}
开发者ID:CCJY,项目名称:ATCD,代码行数:78,代码来源:ast_operation.cpp

示例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();
}
开发者ID:S73417H,项目名称:opensplice,代码行数:63,代码来源:utl_scope.cpp


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