OSF DCE Application Development Guide--Core Components
Interface Definition Language
Some C data types are supported by IDL only with modifications or restrictions. For
example, unions must be discriminated, and all arrays must be accompanied by bounds
information.
17.4.3 Attributes
The stub modules that are generated from an interface definition require more
information about the interface than can be expressed in C. For example, stubs must
know whether an operation parameter is an input or an output.
The additional information required to define a network interface is specified via IDL
attributes. IDL attributes can apply to types, to structure members, to operations, to
operation parameters, or to the interface as a whole. Some attributes are legal in only
one of the preceding contexts; others are legal in more than one context. An attribute is
always represented in [](brackets) before the item to which it applies. For example, in
an operation declaration, inputs of the operation are preceded by the in attribute and
outputs are preceded by the out attribute:
void arith_add (
[in] long a,
[in] long b,
[out] long *c,
);
17.5 Interface Definition Structure
An interface definition has the following structure:
[interface_attribute, ...] interface interface_name
{
declarations
}
The portion of an interface definition that precedes the { (left brace) is the interface
header. The remainder of the definition is the interface body. Interface header syntax
and interface body syntax are described separately in the following two subsections.
17.5.1 Interface Definition Header
The interface header comprises a list of interface attributes enclosed in [](brackets), the
keyword interface, and the interface name:
124245 Tandem Computers Incorporated 17−5