Codemesh Runtime v3 C++ API Reference
3.9.205
|
6 #ifndef xmog_java_array_inc
7 #define xmog_java_array_inc
11 #include "xmog_base.h"
12 #include "xmog_java_ref.h"
13 #include "xmog_java_dynamic.h"
14 #include "xmog_java_class.h"
416 XMOG_MUTABLE jint size_;
437 operator jint()
const;
594 template<
class ArrayType >
625 array_( rhs.array_ ),
645 if( index_ == -1 && !array_.is_null_() )
646 index_ = array_.length;
665 return ( index_ != -1 && index_ < rhs.index_ ) || rhs.index_ == -1;
670 return rhs.index_ == -1 || ( index_ != -1 && index_ <= rhs.index_ );
675 return ( rhs.index_ != -1 && rhs.index_ < index_ ) || index_ == -1;
680 return index_ == -1 || ( rhs.index_ != -1 && rhs.index_ < index_ );
685 return ( index_ == rhs.index_ );
690 return ( index_ != rhs.index_ );
703 index_ = index_ + diff;
717 index_ = index_ - diff;
727 return array_[ index_ + ind ];
735 return array_[ index_ ];
900 void from_native(
bool * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
910 void to_native(
bool * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
955 bool operator [] ( jint index )
const;
1102 void from_native( jboolean * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
1112 void to_native( jboolean * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
1150 void set( jint index, jboolean v,
xmog_localenv * env = NULL );
1157 jboolean operator [] ( jint index )
const;
1189 jarray create( jint size, jbyte * pData, xmog_flags
flags,
bool useNIO,
xmog_localenv * env );
1325 void from_native( jbyte * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
1335 void to_native( jbyte * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
1344 void to_native_nio( jbyte ** dest_arr, jlong * length,
xmog_localenv * env = NULL );
1382 void set( jint index, jbyte v,
xmog_localenv * env = NULL );
1389 jbyte operator [] ( jint index )
const;
1536 void from_native( jchar * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
1546 void to_native( jchar * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
1584 void set( jint index, jchar v,
xmog_localenv * env = NULL );
1591 jchar operator [] ( jint index )
const;
1738 void from_native( jdouble * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
1748 void to_native( jdouble * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
1786 void set( jint index, jdouble v,
xmog_localenv * env = NULL );
1793 jdouble operator [] ( jint index )
const;
1940 void from_native( jfloat * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
1950 void to_native( jfloat * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
1988 void set( jint index, jfloat v,
xmog_localenv * env = NULL );
1995 jfloat operator [] ( jint index )
const;
2142 void from_native( jint * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
2152 void to_native( jint * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
2175 xmog_int operator [] ( jint index );
2197 jint operator [] ( jint index )
const;
2344 void from_native( jlong * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
2354 void to_native( jlong * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
2392 void set( jint index, jlong v,
xmog_localenv * env = NULL );
2399 jlong operator [] ( jint index )
const;
2546 void from_native( jshort * src_arr, jint dest_start, jsize length,
xmog_localenv * env = NULL );
2556 void to_native( jshort * dest_arr, jint src_start, jsize length,
xmog_localenv * env = NULL );
2594 void set( jint index, jshort v,
xmog_localenv * env = NULL );
2601 jshort operator [] ( jint index )
const;
2732 void set( jint index, jobject v,
xmog_localenv * env = NULL );
2739 jobject operator [] ( jint index )
const;
2770 ElementType( _ref, _index )
2773 this->ElementType::owner_ = _ref;
2774 this->ElementType::index_ = _index;
2775 this->ElementType::flags_ = xmog_base::ARRAY_ELEMENT | xmog_base::CACHE_INVALID;
2785 this->ElementType::owner_ = _rhs.owner_.value();
2786 this->ElementType::index_ = _rhs.index_;
2787 this->ElementType::flags_ = _rhs.flags_;
2790 ((ElementType&)_rhs).owner_ = 0;
2795 return this->ElementType::operator = ( _rhs );
2798 ElementType operator = (
const ElementType & _rhs )
2800 return this->ElementType::operator = ( _rhs );
2803 ElementType & operator * ()
2949 if( p_lxenv == NULL )
2986 return ElementType::get_class();
3011 #if (XMOG_PRE_3_0_SUPPORT == 1 )
xmog_array_iterator< ArrayType > & operator++()
The pre increment operator.
Definition: xmog_java_array.h:741
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:801
A wrapper type for byte proxies.
Definition: xmog_java_field.h:598
virtual void xmog_invalidate(xmog_localenv *env=NULL)
Invalidates any cached values in the instance.
value_type operator*()
The dereference operator returns the element at the current index.
Definition: xmog_java_array.h:733
virtual bool get_bool(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the bool value of a dynamic proxy.
xmog_array_iterator< xmog_java_float_array > iterator
The iterator type for arrays of float type.
Definition: xmog_java_array.h:1831
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:1494
xmog_holder_template< ElementType > operator[](jint index)
Returns the array element of the given index.
Definition: xmog_java_array.h:2994
flags
The possible flag values.
Definition: xmog_base.h:383
A wrapper type for long proxies. This type wraps the Java long type in a proxy type that uses the JNI...
Definition: xmog_java_field.h:1543
xmog_java_char_array jcpp_char_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3038
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:1060
ArrayType::value_type value_type
The value type used when the iterator is dereferenced.
Definition: xmog_java_array.h:613
static xmog_localenv * get_instance(xmog_localenv *env)
Returns a local environment.
A helper type used to convey Java arguments around inside the framework.
Definition: xmog_java_value.h:105
xmog_array_iterator< ArrayType > & operator+=(difference_type diff)
The additive assignment operator.
Definition: xmog_java_array.h:701
The wrapper type for the Java short[] type.
Definition: xmog_java_array.h:2426
virtual void set_jboolean(xmog_base *obj, jboolean b, xmog_localenv *env=NULL)=0
Sets a jboolean value of a dynamic instance.
A wrapper type for int proxies. This type wraps the Java int type in a proxy type that uses the JNI j...
Definition: xmog_java_field.h:1321
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:1502
xmog_java_class * get_array_class()
Returns the xmog_java_class instance that represents the array type for this instance's represented t...
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:1283
The proxy type representing the length of an array.
Definition: xmog_java_array.h:410
The wrapper type for the Java boolean[] type.
Definition: xmog_java_array.h:780
xmog_long value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:2240
The object array template type to support arrays of proxy types.
Definition: xmog_java_array.h:2815
The wrapper type for the Java char[] type.
Definition: xmog_java_array.h:1416
xmog_array_iterator< ArrayType > & operator--()
The pre decrement operator.
Definition: xmog_java_array.h:758
ArrayType::difference_type difference_type
The difference type used to represent two subtracted iterators.
Definition: xmog_java_array.h:608
virtual jdouble get_double(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the double value of a dynamic proxy.
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:2302
virtual void get_void(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Dynamically resolves a reference that evaluates to a void value.
The wrapper type for the Java double[] type.
Definition: xmog_java_array.h:1618
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:1906
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:1291
static xmog_java_class * get_class()
Returns the proxy wrapper instance for this array type.
Definition: xmog_java_array.h:2976
virtual void set_long(xmog_base *obj, jlong l, xmog_localenv *env=NULL)=0
Sets a long value of a dynamic instance.
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:1898
virtual void set_bool(xmog_base *obj, bool b, xmog_localenv *env=NULL)=0
Sets a bool value of a dynamic instance.
The baseclass for types that dynamically derive the value of Java proxy items.
Definition: xmog_java_dynamic.h:28
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.
Definition: xmog_java_array.h:2947
xmog_array_iterator< xmog_java_char_array > iterator
The iterator type for arrays of char type.
Definition: xmog_java_array.h:1427
static xmog_java_class * get_element_java_class()
Returns the proxy wrapper instance for this array's element type.
Definition: xmog_java_array.h:2984
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:1068
xmog_java_short_array jcpp_short_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3083
virtual jbyte get_byte(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the jbyte value of a dynamic proxy.
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:2504
virtual jlong get_long(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the long value of a dynamic proxy.
xmog_array_iterator< xmog_java_jboolean_array > iterator
The iterator type for arrays of bool type.
Definition: xmog_java_array.h:993
xmog_array_iterator< xmog_java_long_array > iterator
The iterator type for arrays of long type.
Definition: xmog_java_array.h:2235
xmog_jboolean value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:998
xmog_array_iterator< xmog_java_byte_array > iterator
The iterator type for arrays of byte type.
Definition: xmog_java_array.h:1198
xmog_array_iterator< ArrayType > & operator-=(difference_type diff)
The subtractive assignment operator.
Definition: xmog_java_array.h:715
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:2832
virtual jboolean get_jboolean(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the jboolean value of a dynamic proxy.
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:1704
xmog_array_iterator< xmog_java_short_array > iterator
The iterator type for arrays of short type.
Definition: xmog_java_array.h:2437
xmog_array_iterator< ArrayType > & operator=(const xmog_array_iterator< ArrayType > &rhs)
The assignment operator (required by iterator contract).
Definition: xmog_java_array.h:656
xmog_short value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:2442
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:2043
static xmog_java_dynamic * get_dynamic()
Returns an xmog_java_dynamic instance that can be used to access the array elements of this type.
Definition: xmog_java_array.h:2968
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:2915
static xmog_java_element theElement
The single instance of this type that exists in the framework.
Definition: xmog_java_array.h:187
xmog_double value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:1634
The wrapper type for the Java boolean[] type.
Definition: xmog_java_array.h:982
The wrapper type for the Java long[] type.
Definition: xmog_java_array.h:2224
xmog_array_iterator< xmog_java_double_array > iterator
The iterator type for arrays of double type.
Definition: xmog_java_array.h:1629
virtual jshort get_short(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the short value of a dynamic proxy.
void copy_(const xmog_java_array &_rhs, xmog_localenv *env=NULL)
Updates this instance to reflect the given instance's state.
virtual void set_int(xmog_base *obj, jint i, xmog_localenv *env=NULL)=0
Sets an int value of a dynamic instance.
xmog_array_iterator< xmog_java_bool_array > iterator
The iterator type for arrays of bool type.
Definition: xmog_java_array.h:791
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:2447
xmog_java_array_size length
The array length.
Definition: xmog_java_array.h:555
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:2310
The baseclass for all proxy types in the framework.
Definition: xmog_base.h:29
xmog_array_iterator< xmog_java_int_array > iterator
The iterator type for arrays of int type.
Definition: xmog_java_array.h:2033
A wrapper type for float proxies. This type wraps the Java float type in a proxy type that uses the J...
Definition: xmog_java_field.h:1183
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:2100
xmog_char value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:1432
virtual void set_jobject(xmog_base *obj, jobject o, xmog_localenv *env=NULL)=0
Sets an object reference into a dynamic instance.
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:2108
xmog_java_long_array jcpp_long_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3074
The wrapper type for the Java int[] type.
Definition: xmog_java_array.h:2022
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:1696
virtual jchar get_char(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the jchar value of a dynamic proxy.
A wrapper type for short proxies. This type wraps the Java short type in a proxy type that uses the J...
Definition: xmog_java_field.h:1765
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:866
The wrapper type for the Java byte[] type.
Definition: xmog_java_array.h:1185
A class representing per-thread information for the integration runtime.
Definition: xmog_localenv.h:32
virtual jint get_int(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the int value of a dynamic proxy.
xmog_java_float_array jcpp_float_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3056
virtual void set_float(xmog_base *obj, jfloat f, xmog_localenv *env=NULL)=0
Sets a float value of a dynamic instance.
An iterator type for Java array instances.
Definition: xmog_java_array.h:595
The wrapper base type representing C++ proxy instances for Java objects.
Definition: xmog_java_ref.h:19
xmog_bool value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:796
A wrapper type for boolean proxies.
Definition: xmog_java_field.h:492
The wrapper type for the Java float[] type.
Definition: xmog_java_array.h:1820
virtual void set_short(xmog_base *obj, jshort sh, xmog_localenv *env=NULL)=0
Sets a short value of a dynamic instance.
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:1841
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:1208
A class implementing the xmog_java_dynamic interface for accessing Java array elements via JNI or Cod...
Definition: xmog_java_array.h:180
xmog_holder_template< ElementType > value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:2827
xmog_java_array_template< ElementType > & operator=(const xmog_java_array_template< ElementType > &_rhs)
Sets the given Java array reference into this instance.
Definition: xmog_java_array.h:2958
iterator begin()
Returns an iterator pointing to the first array element.
Definition: xmog_java_array.h:858
The proxy type for reference arrays.
Definition: xmog_java_array.h:2635
virtual jobject get_jobject(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=xmog_base::GLOBAL)=0
Returns the jobject value of a dynamic proxy.
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:1003
Definition: xmog_java_array.h:2762
xmog_byte value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:1203
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:2923
xmog_java_byte_array jcpp_byte_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3029
A wrapper type for character proxies. This type wraps the Java char type in a proxy type that uses th...
Definition: xmog_java_field.h:820
The baseclass for all Java proxy array types.
Definition: xmog_java_array.h:456
iterator end()
Returns an iterator pointing to after the last array element.
Definition: xmog_java_array.h:2512
xmog_java_bool_array jcpp_bool_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3020
xmog_array_iterator< xmog_java_array_template< ElementType > > iterator
The iterator type for arrays of object type.
Definition: xmog_java_array.h:2822
virtual void set_byte(xmog_base *obj, jbyte b, xmog_localenv *env=NULL)=0
Sets a jbyte value of a dynamic instance.
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:1437
virtual void set_double(xmog_base *obj, jdouble d, xmog_localenv *env=NULL)=0
Sets a double value of a dynamic instance.
A C++ wrapper for Java types.
Definition: xmog_java_class.h:31
value_type operator[](jint ind)
The subscript operator returns the element that is 'ind' away from the current index position.
Definition: xmog_java_array.h:725
A wrapper type for double proxies. This type wraps the Java double type in a proxy type that uses the...
Definition: xmog_java_field.h:1045
A wrapper type for boolean proxies.
Definition: xmog_java_field.h:386
A type representing null references.
Definition: xmog_null.h:53
xmog_float value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:1836
virtual void set_char(xmog_base *obj, jchar ch, xmog_localenv *env=NULL)=0
Sets a jchar value of a dynamic instance.
xmog_int value_type
The type returned by the dereference operations.
Definition: xmog_java_array.h:2038
xmog_java_double_array jcpp_double_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3047
virtual jfloat get_float(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the float value of a dynamic proxy.
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:2245
ptrdiff_t difference_type
The type used to represent pointer differences.
Definition: xmog_java_array.h:1639
xmog_java_int_array jcpp_int_array
A typedef that allows C++ calling code to use the pre 3.0 type name.
Definition: xmog_java_array.h:3065
Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.