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

xmog_byte Class Reference

A wrapper type for byte proxies. More...

#include <xmog_java_field.h>

Inheritance diagram for xmog_byte:

Inheritance graph
[legend]
Collaboration diagram for xmog_byte:

Collaboration graph
[legend]
List of all members.

Public Member Functions

jbyte get (xmog_localenv *env=NULL, bool readThrough=false) const
 Returns the value of a byte proxy instance.
xmog_byteoperator &= (jbyte)
 The bitwise-AND assignment operator from the jbyte type.
jbyte operator * () const
 The dereference operator converts to the jbyte type.
xmog_byteoperator *= (int)
 The multiplicative assignment operator from the jbyte type.
 operator jbyte () const
 A conversion operator to the jbyte type.
xmog_byteoperator+= (jbyte)
 The additive assignment operator from the jbyte type.
xmog_byteoperator-= (jbyte)
 The subtractive assignment operator from the jbyte type.
xmog_byteoperator/= (int)
 The division assignment operator from the jbyte type.
xmog_byteoperator= (jbyte)
 An assignment operator from the jbyte type.
xmog_byteoperator^= (jbyte)
 The bitwise-XOR assignment operator from the jbyte type.
xmog_byteoperator|= (jbyte)
 The bitwise-OR assignment operator from the jbyte type.
void set (jbyte b, xmog_localenv *env=NULL, bool writeThrough=false)
 Sets the value of a byte proxy.
 xmog_byte (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 byte type.
 xmog_byte (xmog_java_array *_ref, jint _index)
 Creates an instance that acts as a proxy for an element of a byte array.

Detailed Description

A wrapper type for byte proxies.

This type wraps the Java byte type in a proxy type that uses JNI's jbyte type to represent 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). The set(jbyte,xmog_localenv*,bool) method also takes an optional bool argument that governs whether the change should be written through to the Java side unconditionally, ignoring a possibly set CACHE_LAZY_WRITE flag.

Primitive proxy types only exist in two flavors: as array elements and as fields (static and instance). There are two contructors to support those two flavors.


Constructor & Destructor Documentation

xmog_byte::xmog_byte xmog_java_array _ref,
jint  _index
 

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

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

xmog_byte::xmog_byte 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 byte 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

jbyte xmog_byte::get xmog_localenv env = NULL,
bool  readThrough = false
const
 

Returns the value of a byte 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_byte& xmog_byte::operator &= jbyte   ) 
 

The bitwise-AND assignment operator from the jbyte type.

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

jbyte xmog_byte::operator *  )  const
 

The dereference operator converts to the jbyte type.

This operator is declared to support array iterators.

xmog_byte& xmog_byte::operator *= int   ) 
 

The multiplicative assignment operator from the jbyte type.

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

xmog_byte::operator jbyte  )  const
 

A conversion operator to the jbyte type.

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

xmog_byte& xmog_byte::operator+= jbyte   ) 
 

The additive assignment operator from the jbyte type.

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

xmog_byte& xmog_byte::operator-= jbyte   ) 
 

The subtractive assignment operator from the jbyte type.

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

xmog_byte& xmog_byte::operator/= int   ) 
 

The division assignment operator from the jbyte type.

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

xmog_byte& xmog_byte::operator= jbyte   ) 
 

An assignment operator from the jbyte type.

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

xmog_byte& xmog_byte::operator^= jbyte   ) 
 

The bitwise-XOR assignment operator from the jbyte type.

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

xmog_byte& xmog_byte::operator|= jbyte   ) 
 

The bitwise-OR assignment operator from the jbyte type.

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

void xmog_byte::set jbyte  b,
xmog_localenv env = NULL,
bool  writeThrough = false
 

Sets the value of a byte 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:
b 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 Fri Jun 16 10:19:01 2006 for JMS Courier for C++ by  doxygen 1.4.1