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

xmog_java_array Class Reference
[Arrays]

The baseclass for all Java proxy array types. More...

#include <xmog_java_array.h>

Inheritance diagram for xmog_java_array:

Inheritance graph
[legend]
Collaboration diagram for xmog_java_array:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 xmog_java_array ()
 A default constructor to satisfy virtual inheritance semantics.
 xmog_java_array (jobject array, xmog_flags flags, jint size=-1, xmog_localenv *env=NULL)
 The constructor that creates an instance from an existing reference.
 xmog_java_array (const xmog_null &)
 The from null constructor.
 xmog_java_array (const xmog_java_array &_rhs, xmog_localenv *env=NULL)
 The copy constructor.
 xmog_java_array (xmog_java_array *_arr, jint _index)
 The array element constructor.
 xmog_java_array (xmog_java_class *_clazz, xmog_java_dynamic *_dynamic, xmog_flags _flags)
 The constructor that allows the dynamic resolution of class-related information.
 xmog_java_array (xmog_base *_delegate, bool _owns_delegate=true)
 The constructor that allows the creation of an instance to handle all requests by delegating to another instance.
 xmog_java_array (xmog_java_ref *_ref, xmog_java_dynamic *_dynamic, xmog_flags _flags)
 The constructor that allows the dynamic resolution of instance-related information.
 ~xmog_java_array ()
 The destructor invalidates the length field.
jint get_length (xmog_localenv *env) const
 A higher performance alternative to querying the array length.
void xmog_invalidate (xmog_localenv *env=NULL)
 Invalidates any cached values in the instance.

Public Attributes

xmog_java_array_size length
 The array length.

Protected Member Functions

void copy_ (const xmog_java_array &_rhs, xmog_localenv *env=NULL)
 Updates this instance to reflect the given instance's state.

Detailed Description

The baseclass for all Java proxy array types.


Constructor & Destructor Documentation

xmog_java_array::xmog_java_array jobject  array,
xmog_flags  flags,
jint  size = -1,
xmog_localenv env = NULL
 

The constructor that creates an instance from an existing reference.

Parameters:
array the Java array.
flags the flags that represent the type of the reference.
size the array's size. The default value is -1.
env the local call environment. The default value is NULL.

xmog_java_array::xmog_java_array const xmog_null  ) 
 

The from null constructor.

This constructor is synonymous to the default constructor and creates an instance that does not refer to any Java instance.

xmog_java_array::xmog_java_array const xmog_java_array _rhs,
xmog_localenv env = NULL
 

The copy constructor.

Parameters:
_rhs the existing array whose handle we're duplicating.
env the local call environment. The default value is NULL.

xmog_java_array::xmog_java_array xmog_java_array _arr,
jint  _index
 

The array element constructor.

This is really just a convenience constructor that helps improve the performance of accessing array elements. The same could be achieved by using the version of the constructor that takes an xmog_java_ref and xmog_java_dynamic as input.

Parameters:
_arr the array instance to which the element belongs.
_index the index into the array.

xmog_java_array::xmog_java_array xmog_java_class _clazz,
xmog_java_dynamic _dynamic,
xmog_flags  _flags
 

The constructor that allows the dynamic resolution of class-related information.

This is the constructor that's used when we're creating support for static methods and fields.

Parameters:
_clazz the class instance to which the element belongs.
_dynamic the instance that knows how to access the information we're interested in.
_flags bit flags that provide additional processing information.

xmog_java_array::xmog_java_array xmog_base _delegate,
bool  _owns_delegate = true
 

The constructor that allows the creation of an instance to handle all requests by delegating to another instance.

This is the constructor that's used when we want to maintain a dynamically allocated instance inside another instance. This will for example allow us to have a more derived concrete instance maintained in a stack-based less concrete instance that is returned by a method call.

Parameters:
_delegate an instance that is of compatible type to the outer instance and can therefore be delegated to for every request being made of this instance.
_owns_delegate true if the proxy instance owns the delgate, false otherwise. The proxy's destructor will call delete() on the delegate if the value is true. The default value is true.

xmog_java_array::xmog_java_array xmog_java_ref _ref,
xmog_java_dynamic _dynamic,
xmog_flags  _flags
 

The constructor that allows the dynamic resolution of instance-related information.

This is the constructor that's used when we're creating support for instance methods and fields.

Parameters:
_ref the instance to which the element belongs.
_dynamic the instance that knows how to access the information we're interested in.
_flags bit flags that provide additional processing information.


Member Function Documentation

jint xmog_java_array::get_length xmog_localenv env  )  const
 

A higher performance alternative to querying the array length.

Parameters:
env the local call environment.

void xmog_java_array::xmog_invalidate xmog_localenv env = NULL  )  [virtual]
 

Invalidates any cached values in the instance.

Parameters:
env an optional local call environment. NULL is a legal value.

Reimplemented from xmog_base.


Member Data Documentation

xmog_java_array_size xmog_java_array::length
 

The array length.

This field can be used in every place where the compiler expects a jint.


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