OSF DCE Application Development Guide--Core Components
Interface Definition Language
The following example shows uses of a nonencapsulated union.
typedef
[switch_type(long)] union {
[case (1,3)] float a_float;
[case (2)] short b_short;
[default] ; /* An empty arm. Nothing is shipped. */
} n_e_union_t;
typedef
struct {
long a; /* The discriminant for the */
/* union later in this struct. */
[switch_is (a)] n_e_union_t b;
} a_struct;
/* Note switch can follow union in operation */
void op1 (
[in] handle_t h,
[in,switch_is (s)] n_e_union_t u,
[in] long s );
17.14.3 Enumerations
An IDL enumeration provides names for integers. It is specified as follows:
enum {identifier, ...}
Each identifier in an enumeration is assigned an integer value. The first identifier is
assigned 0 (zero), the second is assigned 1, and so on.
An enumeration can have up to 32,767 identifiers.
17.14.4 Pipes
IDL supports pipes as a mechanism for transferring large quantities of typed data. An
IDL pipe is an open-ended sequence of elements of one type. A pipe permits
application-level optimization of bulk data transfer by allowing the overlap of
communication and processing. Applications that process a stream of data as it arrives,
rather than simply storing the data in memory, can make efficient use of the pipe
mechanism.
A pipe is specified as follows:
pipe type_specifier
124245 Tandem Computers Incorporated 17− 29