[Enterprise Extensions only]

UnionDef::discriminator_type

Overview The discriminator_type operation returns TypeCode information representative of the discriminator of an Interface Repository UnionDef object.
Original interface UnionDef Interface
Exceptions CORBA::SystemException


Intended Usage

The discriminator_type attribute describes and identifies the union's discriminator type. The discriminator_type attribute can be accessed using the discriminator_type read operation. The discriminator_type attribute can only be changed by updating the discriminator_type_def attribute.

IDL Syntax

  readonly attribute TypeCode discriminator_type;

Input parameters

None.

Return values

TypeCode_ptr
The returned value is a pointer to a TypeCode that represents the type of the union discriminator. The memory is owned by the caller and can be released by invoking CORBA::release.

Example

  // C++
     // assume that 'this_union' has already been initialized
     CORBA::UnionDef * this_union;
 
     // retrieve the TypeCode information that represents 
     // the union discriminator
     CORBA::TypeCode * unions_discriminator_tc;
     unions_discriminator_tc = this_union-> discriminator_type();