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

xmog_peer_value.h

00001 /*
00002  * Copyright 1999-2006 by Codemesh, Inc.  ALL RIGHTS RESERVED.
00003  */
00004 
00005 #ifndef xmogInc_peerValue
00006 #define xmogInc_peerValue
00007 
00008 
00009 #include "xmog_base.h"
00010 #include "xmog_java_ref.h"
00011 #include "xmog_java_class.h"
00012 #include "xmog_java_field.h"
00013 #include "xmog_java_array.h"
00014 
00015 
00027 class XMOG_DECLSPEC xmog_peer_value : public xmog_java_ref
00028 {
00029 public:
00030 
00038     enum
00039     {
00040         XMOG_VOID = 0,
00041         XMOG_BOOLEAN = 2,
00042         XMOG_BYTE = 4,
00043         XMOG_CHAR = 8,
00044         XMOG_DOUBLE = 16,
00045         XMOG_FLOAT = 32,
00046         XMOG_INT = 64,
00047         XMOG_LONG = 128,
00048         XMOG_SHORT = 256,
00049         XMOG_OBJECT = 512,
00050         XMOG_EXCEPTION = 1
00051     };
00052 
00053     xmog_jboolean   z;
00054     xmog_byte       b;
00055     xmog_char       c;
00056     xmog_double     d;
00057     xmog_float      f;
00058     xmog_int        i;
00059     xmog_long       j;
00060     xmog_short      s;
00061     xmog_java_ref   l;
00062     xmog_int        type;
00063 
00067     xmog_peer_value();
00068 
00074     xmog_peer_value( const xmog_peer_value & _rhs );
00075 
00082     xmog_peer_value( jobject _ref, xmog_flags flags );
00083 
00090     xmog_peer_value( xmog_java_array * _array, jint index );
00091 
00099     xmog_peer_value( bool z, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00100 
00108     xmog_peer_value( jboolean z, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00109 
00117     xmog_peer_value( jbyte b, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00118 
00126     xmog_peer_value( jchar ch, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00127 
00135     xmog_peer_value( jdouble d, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00136 
00144     xmog_peer_value( jfloat f, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00145 
00153     xmog_peer_value( jint i, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00154 
00162     xmog_peer_value( jlong j, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00163 
00171     xmog_peer_value( jshort s, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00172 
00180     xmog_peer_value( const xmog_base & l, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00181 
00190     xmog_peer_value( const xmog_base & exc, bool bIsExc, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
00191 
00197     xmog_peer_value operator = ( const xmog_peer_value & _rhs );
00198 
00207     void            setz( bool z, xmog_localenv * env, xmog_flags flags );
00208 
00209 
00218     void            setz( jboolean z, xmog_localenv * env, xmog_flags flags );
00219 
00220 
00229     void            setb( jbyte b, xmog_localenv * env, xmog_flags flags );
00230 
00231 
00240     void            setc( jchar c, xmog_localenv * env, xmog_flags flags );
00241 
00242 
00251     void            setd( jdouble d, xmog_localenv * env, xmog_flags flags );
00252 
00253 
00262     void            setf( jfloat f, xmog_localenv * env, xmog_flags flags );
00263 
00264 
00273     void            seti( jint i, xmog_localenv * env, xmog_flags flags );
00274 
00275 
00284     void            setj( jlong j, xmog_localenv * env, xmog_flags flags );
00285 
00286 
00295     void            sets( jshort s, xmog_localenv * env, xmog_flags flags );
00296 
00297 
00306     void            setl( const xmog_base & l, xmog_localenv * env, xmog_flags flags );
00307 
00308 
00321     void            sete( const xmog_base & e, xmog_localenv * env, xmog_flags flags );
00322 
00329     void            printToString( FILE * file, xmog_localenv * env );
00330 
00331 
00338     static void     startHeapMonitor( jlong collector, jint highWaterMark, jlong interval );
00339 
00340 
00344     static void     stopHeapMonitor();
00345 
00352     static int      register_native( xmog_localenv * env = NULL );
00353 
00359     static xmog_java_class *    get_java_class( xmog_localenv * env = NULL );
00360 
00366     static jobject              get_stack_trace( xmog_localenv * env,
00367                                                  jlong exc,
00368                                                  jint size );
00369 
00376     static jobject              get_ifc_names( xmog_localenv * env,
00377                                                 jlong inst );
00378 };
00379 
00380 
00402 typedef jint (JNICALL *XMOG_CALLBACK_METHOD)( xmog_base & peer, 
00403                                               jlong pInst, 
00404                                               xmog_peer_value & retexc, 
00405                                               xmog_java_array_template<xmog_peer_value> & args, 
00406                                               xmog_localenv * env );
00407 
00408 #if (XMOG_SUPPORTS_DOTNET==1)
00409 
00422     typedef jint (__stdcall *JNET_CALLBACK_METHOD)( int * type, 
00423                                                 jvalue * pResult, 
00424                                                 jvalue * args );
00425 
00426 #endif /* (XMOG_SUPPORTS_DOTNET==1) */
00427 
00428 
00429 #endif /* xmogInc_peerValue */

Generated on Fri Jun 16 10:18:58 2006 for JMS Courier for C++ by  doxygen 1.4.1