[Enterprise Extensions only]

ORB::create_alias_tc

Overview Creates a tk_alias TypeCode.
Original class CORBA::ORB
Exceptions CORBA::SystemException


Intended Usage

This method is intended to be used to create a TypeCode of kind tk_alias, representing an IDL typedef.

IDL Syntax

  CORBA::TypeCode_ptr create_alias_tc (
              CORBA::RepositoryId rep_id,
              CORBA::Identifier   name,
              ORBA::TypeCode_ptr original_type);

Input parameters

rep_id
The Interface Repository identifier for the alias. The caller retains ownership of this string.
name
The simple name of the alias. The caller retains ownership of this string.
original_type
The non-NULL TypeCode of the type being aliased. The caller retains ownership of this TypeCode.

Return values

CORBA::TypeCode_ptr
The newly-created TypeCode. The caller assumes ownership of this TypeCode, and should subsequently release it using CORBA::release(TypeCode_ptr).

Example

/* Code to create a tk_alias TypeCode corresponding to this IDL
   definition: "typedef long my_long;"
*/
/* assume op initialized 
*/
extern CORBA::ORB_ptr op;
CORBA::RepositoryId rep_id = CORBA::string_dup("RepositoryId_999");
CORBA::Identifier name = CORBA::string_dup("my_long");
CORBA::TypeCode_ptr tc = op->create_alias_tc (rep_id, name, CORBA::_tc_long);