JNIpp 1.0
JNI meets C++
java::ObjectArray< ObjectType > Class Template Reference

Wrapper template for object arrays. More...

Inheritance diagram for java::ObjectArray< ObjectType >:
java::Object jni::AbstractObject

List of all members.

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.

Detailed Description

template<class ObjectType = Object>
class java::ObjectArray< ObjectType >

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:

Examples:

NativeSound.h.