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

xmog_char Class Reference

A wrapper type for character proxies. This type wraps the Java char type in a proxy type that uses the JNI jchar type to repesent the Java type. Conversion operators allow convenient usage while the get/set methods take an optional xmog_localenv argument for better performance (by saving at least a threadlocal memory access). More...

#include <xmog_java_field.h>

Inheritance diagram for xmog_char:

Inheritance graph
[legend]
Collaboration diagram for xmog_char:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 xmog_char (xmog_java_array *_ref, jint _index)
 Creates an instance that acts as a proxy for an element of a char array.
 xmog_char (xmog_java_ref *_clazz_ref_array, xmog_java_dynamic *_dynamic, xmog_flags _flags=0)
 Creates an instance that acts as a proxy for an indirect element of char type.
 operator int () const
 A conversion operator to the int type.
int operator * () const
 The dereference operator converts to the int type.
xmog_charoperator= (int)
 An assignment operator from the char type.
xmog_charoperator|= (int)
 The bitwise-OR assignment operator from the int type.
xmog_charoperator &= (int)
 The bitwise-AND assignment operator from the int type.
xmog_charoperator^= (int)
 The bitwise-XOR assignment operator from the int type.
xmog_charoperator+= (int)
 The additive assignment operator from the int type.
xmog_charoperator-= (int)
 The subtractive assignment operator from the int type.
xmog_charoperator *= (int)
 The multiplicative assignment operator from the int type.
xmog_charoperator/= (int)
 The divisive assignment operator from the int type.
int get (xmog_localenv *env=NULL, bool readThrough=false) const
 Returns the value of a char proxy instance.
void set (int c, xmog_localenv *env=NULL, bool writeThrough=false)
 Sets the value of a char proxy.

Detailed Description

A wrapper type for character proxies. This type wraps the Java char type in a proxy type that uses the JNI jchar type to repesent the Java type. Conversion operators allow convenient usage while the get/set methods take an optional xmog_localenv argument for better performance (by saving at least a threadlocal memory access).


Constructor & Destructor Documentation

xmog_char::xmog_char xmog_java_array _ref,
jint  _index
 

Creates an instance that acts as a proxy for an element of a char array.

Parameters:
_ref a pointer to an array proxy element.
_index the index of the element.

xmog_char::xmog_char xmog_java_ref _clazz_ref_array,
xmog_java_dynamic _dynamic,
xmog_flags  _flags = 0
 

Creates an instance that acts as a proxy for an indirect element of char type.

Parameters:
_clazz_ref_array a pointer to the owner of the primitive value.
_dynamic the algorithm to access the value.
_flags additional processing arguments.


Member Function Documentation

int xmog_char::get xmog_localenv env = NULL,
bool  readThrough = false
const
 

Returns the value of a char proxy instance.

This method takes two optional arguments that can be used to improve overall performance or force a read from the Java side even if a cached value is available.

Parameters:
env a local environment pointer. May be NULL.
readThrough true if the value should be read from the Java side unconditionally, false if a cached value should be used if available. This flag is ignored if the instance does not use caching or if it does not yet have a cached value.

xmog_char& xmog_char::operator &= int   ) 
 

The bitwise-AND assignment operator from the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive jchar lhs-value. You can achieve better performance by using the set(jbyte,xmog_localenv*,bool) method with the proper arguments.

int xmog_char::operator *  )  const
 

The dereference operator converts to the int type.

This operator is declared to support array iterators.

xmog_char& xmog_char::operator *= int   ) 
 

The multiplicative assignment operator from the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive jchar lhs-value. You can achieve better performance by using the set(jbyte,xmog_localenv*,bool) method with the proper arguments.

xmog_char::operator int  )  const
 

A conversion operator to the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive char or int rhs-value. This class has a conversion operator to int rather than jchar to be compatible with the C-runtime library functions that deal with characters.

You can achieve better performance by using the get(xmog_localenv*,bool) method with the proper arguments.

xmog_char& xmog_char::operator+= int   ) 
 

The additive assignment operator from the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive jchar lhs-value. You can achieve better performance by using the set(jbyte,xmog_localenv*,bool) method with the proper arguments.

xmog_char& xmog_char::operator-= int   ) 
 

The subtractive assignment operator from the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive jchar lhs-value. You can achieve better performance by using the set(jbyte,xmog_localenv*,bool) method with the proper arguments.

xmog_char& xmog_char::operator/= int   ) 
 

The divisive assignment operator from the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive jchar lhs-value. You can achieve better performance by using the set(jbyte,xmog_localenv*,bool) method with the proper arguments.

xmog_char& xmog_char::operator= int   ) 
 

An assignment operator from the char type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive char lhs-value. You can achieve better performance by using the set(int,xmog_localenv*,bool) method with the proper arguments.

xmog_char& xmog_char::operator^= int   ) 
 

The bitwise-XOR assignment operator from the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive jchar lhs-value. You can achieve better performance by using the set(jbyte,xmog_localenv*,bool) method with the proper arguments.

xmog_char& xmog_char::operator|= int   ) 
 

The bitwise-OR assignment operator from the int type.

This operator allows the use of proxy instances of this type in any place where the compiler expects a primitive jchar lhs-value. You can achieve better performance by using the set(jbyte,xmog_localenv*,bool) method with the proper arguments.

void xmog_char::set int  c,
xmog_localenv env = NULL,
bool  writeThrough = false
 

Sets the value of a char proxy.

This method takes two optional arguments that can be used to improve overall performance or force a write to the Java side even if the CACHE_LAZY_WRITE policy is in effect for this instance.

Parameters:
c the new value.
env a local environment pointer. May be NULL.
writeThrough true if the value should be written to the Java side unconditionally, false if only the cached value should be updated. This flag is ignored if the instance does not use caching.


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