Esempio n. 1
0
int
be_visitor_xplicit_pre_proc::visit_enum (be_enum *node)
{
  if (this->ref_type_)
    {
      this->check_and_store (node);
      return 0;
    }

  UTL_ScopedName sn (node->local_name (), 0);

  be_enum *added_enum = 0;
  ACE_NEW_RETURN (added_enum,
                  be_enum (&sn,
                           false,
                           false),
                  -1);

  idl_global->scopes ().top ()->add_to_scope (added_enum);
  idl_global->scopes ().push (added_enum);

  if (this->visit_scope (node) != 0)
    {
      ACE_ERROR_RETURN ((LM_ERROR,
                         ACE_TEXT ("be_visitor_xplicit_pre_proc::")
                         ACE_TEXT ("visit_enum - code generation ")
                         ACE_TEXT ("for scope failed\n")),
                        -1);
    }

  return 0;
}
Esempio n. 2
0
AST_Enum *
be_generator::create_enum (UTL_ScopedName *n,
                           bool is_local,
                           bool is_abstract)
{
  be_enum *retval = 0;
  ACE_NEW_RETURN (retval,
                  be_enum (n,
                           is_local,
                           is_abstract),
                  0);

  return retval;
}