Creating a union (IDL code)
1. In the Packages pane, locate the Package or Model that is to own the Union.
2. Right-click the Package or Model, point to > , and then click Union.
3. Type the name of the Union, and then press the Enter key.
4. Right-click the Attribute, point to > , and then click CORBAUnion.
5. Specify the discriminant for the Union:
a. Right-click the Union, point to New, and then click Attribute.
b. Type a name for the Attribute, and then press the Enter key. Note that the name of the Attribute is not generated.
c. Right-click the Attribute, point to > , and then click CORBASwitch.
d. Open the Attribute's Property Pages, and then click the Data Type tab.
e. In the Type box, type the name of the discriminant, or click the Select button and then select the appropriate item.
6. Specify the default case of the Union:
a. Right-click the Union, point to New, and then click Attribute.
b. Type the name of the default case's Attribute, and then press the Enter key.
c. Right-click the Attribute, point to > , and then click CORBADefault.
d. Open the Attribute's Property Pages, and then click the Data Type tab.
e. In the Type box, type the name of the Attribute's type, or click the Select button and then select the item you want to use as a type.
7. Specify each case of the Union. To specify a case:
a. Right-click the Union, point to New, and then click Attribute.
b. Type the name of the case's Attribute, and then press the Enter key.
c. Right-click the Attribute, point to > , and then click CORBACase.
d. Open the Attribute's Property Pages, and then click the Data Type tab.
e. In the Type box, type the name of the Attribute's type, or click the Select button and then select the item you want to use as a type.
f. On the Attribute's Property Pages, click the CORBACase tab.
g. Set the tagged value of the label tag definition to the name of the case.