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

xmog_java_bool_array Class Reference
[Arrays]

The wrapper type for the Java boolean[] type. More...

#include <xmog_java_array.h>

Inheritance diagram for xmog_java_bool_array:

Inheritance graph
[legend]
Collaboration diagram for xmog_java_bool_array:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ptrdiff_t difference_type
 The type used to represent pointer differences.
typedef xmog_array_iterator<
xmog_java_bool_array
iterator
 The iterator type for arrays of bool type.
typedef xmog_bool value_type
 The type returned by the dereference operations.

Public Member Functions

iterator begin ()
 Returns an iterator pointing to the first array element.
iterator end ()
 Returns an iterator pointing to after the last array element.
void from_native (bool *src_arr, jint dest_start, jsize length, xmog_localenv *env=NULL)
 Copies elements from a native array into the Java array.
bool get (jint index, xmog_localenv *env) const
 Returns the value of an array element.
xmog_java_bool_arrayoperator= (const xmog_java_bool_array &)
 Sets the given instance's array reference into this instance.
bool operator[] (jint index) const
 Returns the value of an array element.
xmog_bool operator[] (jint index)
 Returns a proxy to a bool array element, usable as a lhs-value.
void set (jint index, bool v, xmog_localenv *env=NULL)
 Sets a value into the array's specified element.
void to_native (bool *dest_arr, jint src_start, jsize length, xmog_localenv *env=NULL)
 Copies elements from the Java array into a native array.
 xmog_java_bool_array (bool *arr, jsize size, xmog_localenv *env=NULL, xmog_flags=xmog_base::GLOBAL)
 Creates a new array instance from a native bool[].
 xmog_java_bool_array (jint size, xmog_localenv *env=NULL, xmog_flags=xmog_base::GLOBAL)
 Creates a new array instance of a given size.
 xmog_java_bool_array (jobject _local, xmog_flags _flags)
 Creates an array instance that represents a pre-existing JNI reference.
 xmog_java_bool_array (xmog_base *_delegate, bool _owns_delegate=true)
 Creates an array instance that delegates to another instance.
 xmog_java_bool_array (xmog_java_ref *_clazz_ref_array, xmog_java_dynamic *_dynamic, xmog_flags _flags=xmog_base::GLOBAL)
 Creates an indirect array instance.
 xmog_java_bool_array (xmog_java_array *_ref, jint _index)
 Creates an array instance that represents an array element itself.
 xmog_java_bool_array (const xmog_java_bool_array &, xmog_localenv *env=NULL)
 Creates an array instance that refers to the same Java instance as the given array.
 xmog_java_bool_array (const xmog_null &)
 Creates an array instance that does not refer to any Java object.
 xmog_java_bool_array ()
 Creates an array instance that does not refer to any Java object.

Static Public Member Functions

static xmog_java_bool_array dyna_cast (const xmog_java_ref &_rhs, xmog_localenv *p_lxenv=NULL, xmog_flags flags=xmog_base::GLOBAL)
 A framework method which allows a "cast" of the given object to this array type.
static xmog_java_classget_class ()
 Returns the proxy wrapper instance for this array type.
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_element_java_class ()
 Returns the proxy wrapper instance for this array's element type.

Detailed Description

The wrapper type for the Java boolean[] type.


Constructor & Destructor Documentation

xmog_java_bool_array::xmog_java_bool_array jint  size,
xmog_localenv env = NULL,
xmog_flags  = xmog_base::GLOBAL
 

Creates a new array instance of a given size.

Parameters:
size the newly created array's size.
env the local call environment. May be NULL.

xmog_java_bool_array::xmog_java_bool_array bool *  arr,
jsize  size,
xmog_localenv env = NULL,
xmog_flags  = xmog_base::GLOBAL
 

Creates a new array instance from a native bool[].

Parameters:
arr the native bool[].
size the number of elements in the array.
env the local call environment. May be NULL.


Member Function Documentation

static xmog_java_bool_array xmog_java_bool_array::dyna_cast const xmog_java_ref _rhs,
xmog_localenv p_lxenv = NULL,
xmog_flags  flags = xmog_base::GLOBAL
[static]
 

A framework method which allows a "cast" of the given object to this array type.

You use this method in all places where you would use an explicit class cast in Java. It creates a new instance of the correct type and sets the peer object into it if the peer instance is type compatible. If the peer instance is not type compatible, the newly created object will refer to null.

Parameters:
_rhs a proxy instance which we wish to "cast" to this type.
p_lxenv the local call environment. The default value is NULL.
flags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
an instance of this proxy type that either represents the same Java instance as the argument (if they are type-compatible) or null (if they are not type-compatible).

void xmog_java_bool_array::from_native bool *  src_arr,
jint  dest_start,
jsize  length,
xmog_localenv env = NULL
 

Copies elements from a native array into the Java array.

Parameters:
src_arr a pointer to the native array that provides the elements.
dest_start the index into the Java array to which we start copying.
length the number of elements to copy.
env the local call environment. May be NULL.

bool xmog_java_bool_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.

bool xmog_java_bool_array::operator[] jint  index  )  const
 

Returns the value of an array element.

Parameters:
index the array element index.

xmog_bool xmog_java_bool_array::operator[] jint  index  ) 
 

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

Parameters:
index the array element index.

void xmog_java_bool_array::set jint  index,
bool  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.

void xmog_java_bool_array::to_native bool *  dest_arr,
jint  src_start,
jsize  length,
xmog_localenv env = NULL
 

Copies elements from the Java array into a native array.

Parameters:
dest_arr a pointer to the native array that will receive the elements.
src_start the index in the Java array from which we start copying.
length the number of elements to copy.
env the local call environment. May be NULL.


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:19:05 2006 for JMS Courier for C++ by  doxygen 1.4.1