Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

xmog_java_object_array Class Reference
[Arrays]

The proxy type for reference arrays. More...

#include <xmog_java_array.h>

Inheritance diagram for xmog_java_object_array:

Inheritance graph
[legend]
Collaboration diagram for xmog_java_object_array:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 xmog_java_object_array ()
 Creates an array instance that does not refer to any Java object.
 xmog_java_object_array (const xmog_null &)
 Creates an array instance that does not refer to any Java object.
 xmog_java_object_array (const xmog_java_object_array &, xmog_localenv *env=NULL)
 Creates an array instance that references the same Java object as the given object.
 xmog_java_object_array (xmog_java_array *_ref, jint _index)
 Creates an array instance that represents an array element itself.
 xmog_java_object_array (xmog_java_ref *_clazz_ref_array, xmog_java_dynamic *_dynamic, xmog_flags _flags=xmog_base::GLOBAL)
 Creates an indirect array instance.
 xmog_java_object_array (xmog_base *_delegate, bool _owns_delegate=true)
 Creates an array instance that delegates to another instance.
 xmog_java_object_array (jobject _local, xmog_flags _flags)
 Creates an array instance that represents a pre-existing JNI reference.
 xmog_java_object_array (jint size, xmog_java_class *clazz, xmog_localenv *env=NULL, xmog_flags flags=xmog_base::GLOBAL)
 Creates a new object array instance of a given length.
xmog_java_ref operator[] (jint index)
 Returns a proxy to a long array element, usable as a lhs-value.
void set (jint index, jobject v, xmog_localenv *env=NULL)
 Sets a value into the array's specified element.
jobject operator[] (jint index) const
 Returns the value of an array element.
jobject get (jint index, xmog_localenv *env) const
 Returns the value of an array element.
xmog_java_object_arrayoperator= (const xmog_java_object_array &)
 Sets the given instance's array reference into this instance.

Static Public Member Functions

static xmog_java_dynamicget_dynamic ()
 Returns an xmog_java_dynamic instance that can be used to access the array elements of this type.
static xmog_java_classget_class ()
 Returns the proxy wrapper instance for this array type.
static xmog_java_classget_element_java_class ()
 Returns the proxy wrapper instance for this array's element type.

Protected Member Functions

jarray create (jint size, xmog_java_class *clazz, xmog_flags flags, xmog_localenv *env)
 Creates an array instance of a certain element type and a certain size.

Detailed Description

The proxy type for reference arrays.

This is the super type for all object array types. In order to provide strongly typed access to arbitrary array types, we provide a template array type that takes a proxy type as a template argument. This type extends the xmog_java_object_array type and takes advantage of its basic features.


Constructor & Destructor Documentation

xmog_java_object_array::xmog_java_object_array jint  size,
xmog_java_class clazz,
xmog_localenv env = NULL,
xmog_flags  flags = xmog_base::GLOBAL
 

Creates a new object array instance of a given length.

Parameters:
size the length of the new array.
clazz the wrapper instance for the element type.
env the optional environment. May be NULL.
flags the optional flags. Defaults to xmog_base::GLOBAL.


Member Function Documentation

jarray xmog_java_object_array::create jint  size,
xmog_java_class clazz,
xmog_flags  flags,
xmog_localenv env
[protected]
 

Creates an array instance of a certain element type and a certain size.

Parameters:
size the size of the array to be created.
clazz the utility instance representing the array element type.
flags the creation flags.
env the local call environment.

jobject xmog_java_object_array::get jint  index,
xmog_localenv env
const
 

Returns the value of an array element.

This method provides the same functionality as the subscript operator, but coupled with the ability to pass in a local call environment for a slight edge in performance.

Parameters:
index the array element index.
env the local call environment. Default value is NULL.

jobject xmog_java_object_array::operator[] jint  index  )  const
 

Returns the value of an array element.

Parameters:
index the array element index.

Reimplemented in xmog_java_array_template< ElementType >.

xmog_java_ref xmog_java_object_array::operator[] jint  index  ) 
 

Returns a proxy to a long array element, usable as a lhs-value.

Parameters:
index the array element index.

Reimplemented in xmog_java_array_template< ElementType >.

void xmog_java_object_array::set jint  index,
jobject  v,
xmog_localenv env = NULL
 

Sets a value into the array's specified element.

This method allows direct assignment into an array element while optionally using a provided local call environment. Consequently it will be higher performing than the subscript operator which provides similar functionality in combination with an assignment operation.

Parameters:
index the array element index.
v the new value.
env the local call environment. Default value is NULL.


The documentation for this class was generated from the following file:
Generated on Wed May 31 14:01:31 2006 for Shared Codemesh Runtime Library API Reference by  doxygen 1.4.1