int
be_visitor_xplicit_pre_proc::visit_field (be_field *node)
{
  this->ref_type_ = true;

  be_type *ft =
    be_type::narrow_from_decl (node->field_type ());

  if (ft->accept (this) != 0)
    {
      ACE_ERROR_RETURN ((LM_ERROR,
                         ACE_TEXT ("be_visitor_xplicit_pre_proc::")
                         ACE_TEXT ("visit_field - code generation ")
                         ACE_TEXT ("for field type failed\n")),
                        -1);
    }

  this->ref_type_ = false;

  UTL_ScopedName sn (node->local_name (), 0);
  AST_Type *field_type =
    AST_Type::narrow_from_decl (this->type_holder_);

  be_field *added_field = 0;
  ACE_NEW_RETURN (added_field,
                  be_field (field_type,
                            &sn,
                            node->visibility ()),
                  -1);

  idl_global->scopes ().top ()->add_to_scope (added_field);

  return 0;
}
Example #2
0
AST_Field *
be_generator::create_field (AST_Type *ft,
                            UTL_ScopedName *n,
                            AST_Field::Visibility vis)
{
  be_field *retval = 0;
  ACE_NEW_RETURN (retval,
                  be_field (ft,
                            n,
                            vis),
                  0);

  return retval;
}