Next Previous Up Top Contents Index

A.4 Mapping in more detail

A.4.16 Mapping for array

An IDLarray is mapped to a Lisparray of the same rank. The element type of the mapped array must be a supertype of the Lisp type into which the element type of the IDLarray is mapped.

Multidimensional IDL arrays are mapped to multidimensional Lisp arrays of the same dimensions.

For example, in IDL:

module example {
  typedef short array1[2];
  interface array_interface{
    array1 op();
  }
}

In generated Lisp:

(defpackage :example)
(deftype example:array1 () '(array t (2)))

;; mapping for the interface... (defclass example:array_interface...)

And in use:

(setq a2 (op x)) ; Get an array

(aref a2 1) ; Access an element > 3 ; Just an example, could be any value that is a short


Developing Component Software with CORBA - 22 Jan 1999

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker