IPB_Session interface:
NewUnboundedSimpleArray method
Description
Creates an unbounded simple data array.
Syntax
NewUnboundedSimpleArray(pbuint type)
Argument |
Description |
---|---|
type |
An enumerated variable of type pbvalue_* indicating the type of simple unbounded array to be created |
Return Values
pbarray or null on failure.
Examples
This example creates an unbounded simple data array
of the type returned by the getDataType method,
which returns a string of the form dt_type
.
Most of the case statements have been removed
for the sake of brevity:
if (d_returnType.isArray())
{
returnValue.l = env->CallObjectMethodA(obj,
mid, values.get());
pbarray v;
switch(d_returnType.getDataType())
{
case dt_boolean:
v = session->NewUnboundedSimpleArray
(pbvalue_boolean);
break;
case dt_short:
v = session->NewUnboundedSimpleArray
(pbvalue_int);
break;
// CASE statements omitted
...
default:
v = session->NewUnboundedSimpleArray
(pbvalue_any);
break;
}
ci->returnValue->SetArray(v);
Usage
An unbounded array can have only one dimension, so no dimension information is needed.