Communicator e3000 MPE/iX Release 7.0 Express 1 (Software Release C.70.01) (30216-90328)
116 Chapter5
Technical Articles
DCE to RPC 1.2.1
DCE-IDL Compiler for RPC1.2.1
Out-of-line marshalling (library based marshalling)
Out-of-line 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.
The in_line and out_of_line attributes affect the stub code generated for marshaling and
unmarshlling 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 will be allowed now are:
• 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 then
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 corresponding dimension is determined at runtime. Not all
<attr_var>s in a min_is clause can be null. Below are examples of the syntax. Assume
values of variables are as follows: long a = -10; long b = -20; long c = -30; long d = 15; long e
= 25.
min_is(a)] long g1[*..10]; /* g1[-10..10] */
[min_is(a)] long g2[*..10][4]; /* g2[-10..10][0..3] */
[min_is(a,b)] long g3[*..10][*..20]; /* g3[-10..10][-20..20] */
[min_is(,b)] long g4[2][*..20]; /* g4[0..1][-20..20] */