PreviousNext

Conformance in Dimensions Other Than the First

If a multidimensional array is conformant in a dimension other than the first, the C description for this array, which is located in the header (.h) file generated by the IDL compiler, will be a one-dimensional conformant array of the appropriate element type. This occurs because there is no "natural" C binding for conformance in dimensions other than the first.

The following examples show how IDL type definitions and parameter declarations that contain bounds in dimensions other than the first are translated into their C equivalents at runtime.

IDL Type Definition:

typedef struct {

long a;

long e;

[max_is(,,e),min_is(a)] long g7[*..1][2..9][3..*];

} t3;

C Translation:

typedef struct {

idl_long_int a;

idl_long_int e;

idl_long_int g7[1];

IDL Parameter Declaration:

[in,out,max_is(,,e),min_is(a)] long g7[*..1][2..9][3..*];

C Translation:

/* [in, out] */ idl_long_int g7[]

Arrays that have a nonzero first lower bound and a first upper bound that is determined at runtime are translated into the equivalent C representation of a conformant array, as shown in the following IDL type definition and parameter declaration examples:

IDL Type Definition:

typedef struct {

long s;

[size_is(s)] long fa3[3..*][-4..1][-1..2];

} t1;

C Translation:

typedef struct {

idl_long_int s;

idl_long_int fa3[1][6][4];

} t1;

IDL Parameter Declaration:

[in,out,size_is(s)] long fa3[3..*][-4..1][-1..2]

C Translation:

/* [in, out] */ idl_long_int fa3[][6][4]