Chapter 15 Working with IDL
Array
To create a CORBA array you have to perform the following actions:
- Create a class with the <<CORBAArray>> stereotype
- Link the array class with another class representing the array type (use the <<CORBAPrimitive>> stereotype to define the type)
- Define the array dimension in the Dims extended attribute of the array class. This extended attribute is a comma-separated list of the dimensions (integer values) of the array. It is used in place of the index<i> qualifiers on the associationEnd specified in the CORBA profile
In the following example, array 2D_array uses string data type set to 10:
typedef string 2D_array[10];
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|