Previous Table of Contents Next


4.11.2 TypeCode Constants


   For IDL type declarations, the IDL compiler produces (if asked) a declaration of a TypeCode constant. See the language mapping rules for more information about the names of the generated TypeCode constants. TypeCode constants include tk_alias definitions wherever an IDL typedef is referenced. These constants can be used with the dynamic invocation interface and other routines that require TypeCodes.

   The predefined TypeCode constants, named according to the C language mapping, are:

   TC_null TC_void TC_short TC_long TC_longlong TC_ushort TC_ulong TC_ulonglong TC_float TC_double TC_longdouble TC_boolean TC_char TC_wchar TC_octet TC_any TC_TypeCode TC_Object = tk_objref {Object} TC_string= tk_string {0} // unbounded TC_wstring = tk_wstring{0}/// unbounded TC_ValueBase = tk_value {ValueBase} TC_Component = tk_component {CCMObject} TC_Home = tk_home {CCMHome} TC_EventBase = tk_event {EventBase}

   For the TC_Object TypeCode constant, calling id returns "IDL:omg.org/CORBA/Object:1.0" and calling name returns "Object."

   For the TC_ValueBase TypeCode constant, calling id returns "IDL:omg.org/CORBA/ValueBase:1.0," calling name returns "ValueBase," calling member_count returns 0, calling type_modifier returns CORBA::VM_NONE, and calling concrete_base_type returns a nil TypeCode.

   For the TC_Component TypeCode constant, calling id returns "IDL:omg.org/Components/CCMObject:1.0" and calling name returns "CCMObject."

   For the TC_Home TypeCode constant, calling id returns "IDL:omg.org/Components/CCMHome:1.0" and calling name returns "CCMHome."

   For the TC_EventBase TypeCode constant, calling id returns "IDL:omg.org/Components/EventBase:1.0," calling name returns "EventBase," calling member_count returns 0, calling type_modifier returns CORBA::VM_NONE, and calling concrete_base_type returns a nil TypeCode.