DCE for the HP e3000 (B3821-90003)
52 Chapter6
Introduction to RPC
DCE-IDL Compiler for RPC 1.2.1
DCE-IDL Compiler for RPC 1.2.1
Out-of-Line Marshalling
Out-of-line marshalling (library-based marshalling) causes constructed
data types such as unions, pipes or large structures to be marshalled or
unmarshalled by auxiliary routines, thus reducing the stub size. The
out_of_line attribute directs the IDL compiler to place the marshalling
and unmarshalling code in IDL auxiliary stub files, rather than in the
direct flow of the stub code.
In-line/Out_of_line: The in_line and out_of_line attributes affect
the stub code generated for marshaling and unmarshalling non-scalar
parameters (Non-scalar types include int, float, char and pointers in C).
Normally IDL compiler generates marshalling and unmarshalling code
for all parameters in line. This means that if the same data type is used
repeatedly, the identical code will appear in multiple places. If
out_of_line is specified, the marshaling and unmarshalling code will
be provided as a subroutine, which is called from wherever it is needed.
Enhancing IDL Data Types
IDL support for arrays in previous version was limited to:
• Arrays with a lower bound of zero.
• Arrays with conformance or varying dimensions only in the first
(major) dimension.
The current version of IDL will remove these restrictions by supporting
fully general arrays as described in the IDL functional specification.
The following example includes declarations that were not supported in
previous version that, but are allowed now:
• long c1[][4];
• long c2[][0..3]; /* Same array shape as c1 */
• long c3[0..*][4]; /* Same array shape as c1 */
• long c4[0..*][0..3]; /* Same array shape as c1 */
• float d1[1..10]; /* Equivalent to FORTRAN REAL D1(10) */
• float d2[*..10]; /* Lower bound is determined at run time */
• float d3[*..*]; /* Both bounds determined at run time */
The <attr_var>s are in one-to-one correspondence with the dimensions
of the array, starting at the first. If there are fewer <attr_var>s than the
array has dimensions, the missing <attr_var>s are assumed to be null.
An <attr_var> will be non-null if and only if the lower bound of the