Previous Table of Contents Next


10.5.19 ArrayDef


   An ArrayDef represents an IDL array type. As array types are anonymous, this interface is not derived from TypedefDef or Contained.

   module CORBA {

interface ArrayDef : IDLType {

attribute unsigned long length;
readonly attribute TypeCode element_type;
attribute IDLType element_type_def;
};
};

   10.5.19.1 Read Interface

   The length attribute specifies the number of elements in the array.

   The type of the elements is described by element_type and identified by element_type_def. Since an ArrayDef only represents a single dimension of an array, multi-dimensional IDL arrays are represented by multiple ArrayDef objects, one per array dimension. The element_type_def attribute of the ArrayDef representing the leftmost index of the array, as defined in IDL, will refer to the ArrayDef representing the next index to the right, and so on. The innermost ArrayDef represents the rightmost index and the element type of the multi-dimensional OMG IDL array.

   The inherited type attribute is a tk_array TypeCode describing the array.

   10.5.19.2 Write Interface

   Setting the element_type_def attribute also updates the element_type attribute. Setting the bound or element_type_def attribute also updates the type attribute.