![]() |
Overview The create_array operation is used to create a new array definition (ArrayDef). Original interface Repository Interface Exceptions CORBA::SystemException
Intended Usage
The create_array operation returns a new ArrayDef with the specified length and element_type.
IDL Syntax
ArrayDef create_array ( in unsigned long length, in IDLType element_type );
Input parameters
- length
- The length value specifies the length of the new ArrayDef.
- element_type
- The element_type is the IDLType representing each element of the ArrayDef.
Return values
- ArrayDef_ptr
- The return value is a pointer to the newly created ArrayDef object. The memory associated with the object is owned by the caller and can be released by invoking CORBA::release.
Example
// C++ // create_array // assume that 'repository_ptr' and 'struct_1' // have already been initialized CORBA::Repository * repository_ptr; CORBA::StructDef * struct_1; // create an array definition with a bound of 409 // and array element type of 'struct_1" CORBA::ArrayDef * array_def_ptr; CORBA::ULong array_length = 409; array_def_ptr = repository_ptr-> create_array (array_length, struct_1);