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

xmog_java_array_template< ElementType > Class Template Reference
[Arrays]

The object array template type to support arrays of proxy types. More...

#include <xmog_java_array.h>

Inheritance diagram for xmog_java_array_template< ElementType >:

Inheritance graph
[legend]
Collaboration diagram for xmog_java_array_template< ElementType >:

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_array_template<
ElementType > > 
iterator
 The iterator type for arrays of object type.
typedef xmog_holder_template<
ElementType > 
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.
xmog_java_array_template<
ElementType > & 
operator= (const xmog_java_array_template< ElementType > &_rhs)
 Sets the given Java array reference into this instance.
xmog_holder_template< ElementType > operator[] (jint index) const
 Returns the array element of the given index.
xmog_holder_template< ElementType > operator[] (jint index)
 Returns the array element of the given index.
XMOG_EXPLICIT xmog_java_array_template (jint size, xmog_localenv *env=NULL, xmog_flags flags=xmog_base::GLOBAL)
 Creates a new object array instance of a given length.
XMOG_EXPLICIT xmog_java_array_template (jobject _local, xmog_flags _flags)
 Creates an array instance that represents a pre-existing JNI reference.
XMOG_EXPLICIT xmog_java_array_template (xmog_base *_delegate, bool bOwnsDelegate)
 Creates an array instance that delegates to another instance.
XMOG_EXPLICIT xmog_java_array_template (xmog_java_ref *_clazz_ref_array, xmog_java_dynamic *_dynamic, xmog_flags _flags=xmog_base::GLOBAL)
 Creates an indirect array instance.
XMOG_EXPLICIT xmog_java_array_template (xmog_java_array *_ref, jint _index)
 Creates an array instance that represents an array element itself.
 xmog_java_array_template (const xmog_java_array_template< ElementType > &_rhs, xmog_localenv *_env=NULL)
 Creates an array instance that does represents the same Java instance as the given array instance.
 xmog_java_array_template (const xmog_null &)
 Creates an array instance that does not represent a Java instance.
 xmog_java_array_template ()
 Creates an array instance that does not represent a Java instance.

Static Public Member Functions

static xmog_java_array_template<
ElementType > 
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

template<class ElementType>
class xmog_java_array_template< ElementType >

The object array template type to support arrays of proxy types.


Constructor & Destructor Documentation

template<class ElementType>
XMOG_EXPLICIT xmog_java_array_template< ElementType >::xmog_java_array_template xmog_base _delegate,
bool  bOwnsDelegate
[inline]
 

Creates an array instance that delegates to another instance.

Parameters:
_delegate the instance to which all calls will be delegated.
bOwnsDelegate true if the proxy object owns the delegate, false otherwise.

template<class ElementType>
XMOG_EXPLICIT xmog_java_array_template< ElementType >::xmog_java_array_template jint  size,
xmog_localenv env = NULL,
xmog_flags  flags = xmog_base::GLOBAL
[inline]
 

Creates a new object array instance of a given length.

Parameters:
size the length of the new array.
env the optional environment. May be NULL.
flags the optional flags. Defaults to xmog_base::GLOBAL.


Member Function Documentation

template<class ElementType>
static xmog_java_array_template<ElementType> xmog_java_array_template< ElementType >::dyna_cast const xmog_java_ref _rhs,
xmog_localenv p_lxenv = NULL,
xmog_flags  flags = xmog_base::GLOBAL
[inline, 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).

template<class ElementType>
xmog_holder_template<ElementType> xmog_java_array_template< ElementType >::operator[] jint  index  )  [inline]
 

Returns the array element of the given index.

Parameters:
index the array index.

Reimplemented from xmog_java_object_array.


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