int be_visitor_xplicit_pre_proc::visit_string (be_string *node) { if (this->ref_type_) { this->check_and_store (node); return 0; } AST_Expression *b = node->max_size (); if (b->ev ()->u.ulval == 0) { this->type_holder_ = node; return 0; } AST_Expression *bound = 0; ACE_NEW_RETURN (bound, AST_Expression (b, AST_Expression::EV_ulong), -1); Identifier id ("string"); UTL_ScopedName sn (&id, 0); ACE_NEW_RETURN (this->type_holder_, be_string (AST_Decl::NT_string, &sn, bound, node->width ()), -1); return 0; }
AST_String * be_generator::create_string (AST_Expression *v) { Identifier id ("string"); UTL_ScopedName n (&id, 0); be_string *retval = 0; ACE_NEW_RETURN (retval, be_string (AST_Decl::NT_string, &n, v, 1), 0); return retval; }
AST_String * be_generator::create_wstring (AST_Expression *v) { Identifier id (sizeof (ACE_CDR::WChar) == 1 ? "string" : "wstring"); UTL_ScopedName n (&id, 0); AST_Decl::NodeType nt = sizeof (ACE_CDR::WChar) == 1 ? AST_Decl::NT_string : AST_Decl::NT_wstring; be_string *retval = 0; ACE_NEW_RETURN (retval, be_string (nt, &n, v, sizeof (ACE_CDR::WChar)), 0); return retval; }