Previous | Table of Contents | Next |
The OMG IDL TypeCode data type maps to the DICORBATypeCode interface. The DICORBATypeCode interface is defined as follows.
19-22 Common Object Request Broker Architecture (CORBA), v3.0 July 2002
// ODL
typedef enum {tk_null = 0, tk_void, tk_short, tk_long, tk_ushort,tk_ulong, tk_float, tk_double, tk_boolean, tk_char,tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref, tk_struct, tk_union, tk_enum, tk_string,tk_sequence, tk_array, tk_alias, tk_except} CORBATCKind;
[odl, dual, uuid(...)]interface DICORBATypeCode: DIForeignComplexType {[propget] HRESULT kind([retval,out] TCKind * val);
// for tk_objref, tk_struct, tk_union, tk_alias,
tk_except[propget] HRESULT id([retval,out] BSTR *val); [propget] HRESULT name([retval,out] BSTR * val);
//tk_struct,tk_union,tk_enum,tk_except[propget] HRESULT member_count([retval,out] long * val);HRESULT member_name([in] long index,[retval,out]
BSTR * val);HRESULT member_type([in] long index,[retval,out] DICORBATypeCode ** val),
// tk_unionHRESULT member_label([in] long index,[retval,out] VARIANT * val);[propget] HRESULT discriminator_type([retval,out] IDispatch ** val); [propget] HRESULT default_index([retval,out] long * val);
// tk_string, tk_array, tk_sequence[propget] HRESULT length([retval,out] long * val);
// tk_sequence, tk_array, tk_alias[propget] HRESULT content_type([retval,out] IDispatch ** val); }
The UUID for DICORBATypeCode is:
{A8B553C3-3B72-11cf-BBFC-444553540000}
This interface can also be implemented as generic (nondual) Automation Interface, in which case it is named DCORBATypeCode
and its UUID is:
{E977F903-3B75-11cf-BBFC-444553540000}
When generating Visual Basic constants corresponding to the values of the CORBA_TCKind enumeration, the constants should be
declared as follows.
Global const CORBATCKind_tk_null =0Global const CORBATCKind_tk_void = 1. . .
Since DICORBATypeCode derives from DIForeignComplexType, objects that implement it are, in effect, pseudo-objects. See Section
19.8, “Mapping for CORBA Complex Types,? on page 19-19 for a description of the DIForeignComplexType interface.