JNIpp 1.0
JNI meets C++
|
Wrapper template for object arrays. More...
Public Member Functions | |
ObjectArray (jsize length) | |
Creates object array of the specified length and wraps it. | |
ObjectArray (const jni::LObject &array) | |
Wraps array . | |
jsize | GetLength () const |
Returns array length. | |
PObjectType | GetAt (jsize index) const |
Returns object at the specified index. | |
void | SetAt (jsize index, const ObjectType &value) |
Sets object at the specified index. | |
void | SetAt (jsize index, PObjectType pvalue) |
Sets object at the specified index. |
Wrapper template for object arrays.
Default value of ObjectType
is java::Object, so java::ObjectArray<> is a wrapper for an array of objects (Object
[]). However, you should use java::PObjectArray most of the time. For example, to create object array of length 7 use java::PObjectArray::New(7)
.
To declare N-dimensional array nest java::ObjectArray N times:
java::ObjectArray<java::ObjectArray<java::ObjectArray<MyClass> > >