Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_peer_value.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 
6 #ifndef xmogInc_peerValue
7 #define xmogInc_peerValue
8 
9 
10 #include "xmog_base.h"
11 #include "xmog_java_ref.h"
12 #include "xmog_java_class.h"
13 #include "xmog_java_field.h"
14 #include "xmog_java_array.h"
15 
16 
28 class XMOG_DECLSPEC xmog_peer_value : public xmog_java_ref
29 {
30 public:
31 
39  enum
40  {
41  XMOG_VOID = 0,
42  XMOG_BOOLEAN = 2,
43  XMOG_BYTE = 4,
44  XMOG_CHAR = 8,
45  XMOG_DOUBLE = 16,
46  XMOG_FLOAT = 32,
47  XMOG_INT = 64,
48  XMOG_LONG = 128,
49  XMOG_SHORT = 256,
50  XMOG_OBJECT = 512,
51  XMOG_EXCEPTION = 1
52  };
53 
64 
69 
75  xmog_peer_value( const xmog_peer_value & _rhs );
76 
83  xmog_peer_value( jobject _ref, xmog_flags flags );
84 
91  xmog_peer_value( xmog_java_array * _array, jint index );
92 
100  xmog_peer_value( bool z, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
101 
109  xmog_peer_value( jboolean z, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
110 
118  xmog_peer_value( jbyte b, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
119 
127  xmog_peer_value( jchar ch, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
128 
136  xmog_peer_value( jdouble d, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
137 
145  xmog_peer_value( jfloat f, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
146 
154  xmog_peer_value( jint i, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
155 
163  xmog_peer_value( jlong j, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
164 
172  xmog_peer_value( jshort s, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
173 
181  xmog_peer_value( const xmog_base & l, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
182 
191  xmog_peer_value( const xmog_base & exc, bool bIsExc, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
192 
198  xmog_peer_value operator = ( const xmog_peer_value & _rhs );
199 
208  void setz( bool z, xmog_localenv * env, xmog_flags flags );
209 
210 
219  void setz( jboolean z, xmog_localenv * env, xmog_flags flags );
220 
221 
230  void setb( jbyte b, xmog_localenv * env, xmog_flags flags );
231 
232 
241  void setc( jchar c, xmog_localenv * env, xmog_flags flags );
242 
243 
252  void setd( jdouble d, xmog_localenv * env, xmog_flags flags );
253 
254 
263  void setf( jfloat f, xmog_localenv * env, xmog_flags flags );
264 
265 
274  void seti( jint i, xmog_localenv * env, xmog_flags flags );
275 
276 
285  void setj( jlong j, xmog_localenv * env, xmog_flags flags );
286 
287 
296  void sets( jshort s, xmog_localenv * env, xmog_flags flags );
297 
298 
307  void setl( const xmog_base & l, xmog_localenv * env, xmog_flags flags );
308 
309 
322  void sete( const xmog_base & e, xmog_localenv * env, xmog_flags flags );
323 
330  void printToString( FILE * file, xmog_localenv * env );
331 
332 
339  static void startHeapMonitor( jlong collector, jint highWaterMark, jlong interval );
340 
341 
345  static void stopHeapMonitor();
346 
354  static int register_native( xmog_java_class * clazz = NULL, xmog_localenv * env = NULL );
355 
363  static int register_native( jclass clazz, xmog_localenv * env );
364 
370  static xmog_java_class * get_java_class( xmog_localenv * env = NULL );
371 
377  static jobject get_stack_trace( xmog_localenv * env,
378  jlong exc,
379  jint size );
380 
387  static jobject get_ifc_names( xmog_localenv * env,
388  jlong inst );
389 
407  static void * get_callback( const xmog_base & obj, xmog_localenv * env = NULL );
408 };
409 
410 
432 typedef jint (JNICALL *XMOG_CALLBACK_METHOD)( xmog_base & peer,
433  jlong pInst,
434  xmog_peer_value & retexc,
436  xmog_localenv * env );
437 
438 
439 
462 typedef jint (JNICALL *XMOG_CALLBACK_OBJECT_ARG_METHOD)( xmog_base & peer,
463  jlong pInst,
464  xmog_peer_value & retexc,
465  jobject arg,
466  xmog_localenv * env );
467 
468 #if (XMOG_SUPPORTS_DOTNET==1)
469 
482  typedef jint (__stdcall *JNET_CALLBACK_METHOD)( int * type,
483  jvalue * pResult,
484  jvalue * args );
485 
486 #endif /* (XMOG_SUPPORTS_DOTNET==1) */
487 
488 
489 #endif /* xmogInc_peerValue */
xmog_byte
A wrapper type for byte proxies.
Definition: xmog_java_field.h:598
xmog_base::flags
flags
The possible flag values.
Definition: xmog_base.h:383
xmog_long
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_int
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
xmog_java_array_template
The object array template type to support arrays of proxy types.
Definition: xmog_java_array.h:2815
xmog_peer_value::s
xmog_short s
A field that allows access to the instance's jshort value.
Definition: xmog_peer_value.h:61
xmog_peer_value
The wrapper class for the builtin Java com.codemesh.peer.Value type.
Definition: xmog_peer_value.h:28
xmog_peer_value::f
xmog_float f
A field that allows access to the instance's jfloat value.
Definition: xmog_peer_value.h:58
xmog_peer_value::b
xmog_byte b
A field that allows access to the instance's jbyte value.
Definition: xmog_peer_value.h:55
xmog_peer_value::c
xmog_char c
A field that allows access to the instance's jchar value.
Definition: xmog_peer_value.h:56
xmog_base
The baseclass for all proxy types in the framework.
Definition: xmog_base.h:29
xmog_float
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
xmog_short
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
xmog_localenv
A class representing per-thread information for the integration runtime.
Definition: xmog_localenv.h:32
xmog_peer_value::i
xmog_int i
A field that allows access to the instance's jint value.
Definition: xmog_peer_value.h:59
xmog_java_ref
The wrapper base type representing C++ proxy instances for Java objects.
Definition: xmog_java_ref.h:19
XMOG_CALLBACK_OBJECT_ARG_METHOD
jint(JNICALL * XMOG_CALLBACK_OBJECT_ARG_METHOD)(xmog_base &peer, jlong pInst, xmog_peer_value &retexc, jobject arg, xmog_localenv *env)
The optimized one-argument callback function type.
Definition: xmog_peer_value.h:462
xmog_peer_value::l
xmog_java_ref l
A field that allows access to the instance's reference (jobject) value.
Definition: xmog_peer_value.h:62
xmog_jboolean
A wrapper type for boolean proxies.
Definition: xmog_java_field.h:492
xmog_peer_value::z
xmog_jboolean z
A field that allows access to the instance's bool value.
Definition: xmog_peer_value.h:54
XMOG_CALLBACK_METHOD
jint(JNICALL * XMOG_CALLBACK_METHOD)(xmog_base &peer, jlong pInst, xmog_peer_value &retexc, xmog_java_array_template< xmog_peer_value > &args, xmog_localenv *env)
The callback function type.
Definition: xmog_peer_value.h:432
xmog_char
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
xmog_java_array
The baseclass for all Java proxy array types.
Definition: xmog_java_array.h:456
xmog_peer_value::type
xmog_int type
A field that allows access to the instance's type.
Definition: xmog_peer_value.h:63
xmog_peer_value::j
xmog_long j
A field that allows access to the instance's jlong value.
Definition: xmog_peer_value.h:60
xmog_peer_value::d
xmog_double d
A field that allows access to the instance's jdouble value.
Definition: xmog_peer_value.h:57
xmog_java_class
A C++ wrapper for Java types.
Definition: xmog_java_class.h:31
xmog_double
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

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.