Chapter 15 Working with IDL
You create a CORBA union using a class with the <<CORBAUnion>> stereotype. Each attribute in a union represents a case, the Case extended attribute (in Profile\Attribute\Criteria\IDL union member\Extended Attributes) contains the case default value.
To define the switch data type, the discriminant data type for union cases, you have to add an attribute named <class name>_switch to the list of union attributes.
union Test switch(char) { case 1: char Test1; case 2: string Test2; default: short Test3; };
Copyright (C) 2005. Sybase Inc. All rights reserved. |