00001 /* 00002 * Copyright 1999-2006 by Codemesh, Inc. ALL RIGHTS RESERVED. 00003 */ 00004 00005 #ifndef xmog_java_value_inc 00006 #define xmog_java_value_inc 00007 00008 00009 #include "xmog.h" 00010 00011 00012 typedef jvalue xmog_java_value; 00013 class xmog_localenv; 00014 00015 00019 struct xmog_remote_java_value 00020 { 00024 xmog_java_value val; 00025 00029 jclass clazz; 00030 00034 jint length; 00035 00039 jint type; 00040 00044 void * data; 00045 00049 xmog_remote_java_value() : length( 0 ), type( 0 ), data( 0 ) {} 00050 00054 xmog_remote_java_value( const xmog_remote_java_value & rhs ); 00055 00059 ~xmog_remote_java_value(); 00060 }; 00061 00062 00067 class xmog_remote_java_exception 00068 { 00069 public: 00070 00071 xmog_remote_java_exception(); 00072 00073 xmog_remote_java_exception( jobject exc, jclass type, const char * typeName = NULL, const char * msg = NULL, const char * stack = NULL ); 00074 00075 xmog_remote_java_exception( const xmog_remote_java_exception & exc ); 00076 00077 ~xmog_remote_java_exception(); 00078 00079 xmog_remote_java_exception & operator = ( const xmog_remote_java_exception & ); 00080 00081 jobject get_jobject() const { return exc_; } 00082 jclass get_type() const { return type_; } 00083 const char * get_typeName() const { return typeName_; } 00084 const char * get_super_typeName( int i ) const; 00085 const char * get_message() const { return msg_; } 00086 const char * get_stack() const { return stack_; } 00087 00088 jobject exc_; 00089 jclass type_; 00090 char * typeName_; 00091 char * superTypeNames_; 00092 char * msg_; 00093 char * stack_; 00094 }; 00095 00096 00104 struct xmog_java_values 00105 { 00111 jint size; 00112 00116 xmog_java_value* v; 00117 00121 const char * type_codes; 00122 00126 xmog_java_values() { size = 0; v = NULL; } 00127 00134 xmog_java_values( jint _size, xmog_java_value * _v ) { size = _size; v = _v; } 00135 00143 xmog_java_values( jint _size, xmog_java_value * _v, const char * _type_codes ) { size = _size; v = _v; type_codes = _type_codes; } 00144 00148 jvalue * get_values( xmog_localenv * env = NULL ) const 00149 { 00150 env; 00151 00152 return v; 00153 } 00154 00158 const char * const get_type_codes() const 00159 { 00160 return type_codes; 00161 } 00162 }; 00163 00164 00165 #endif /* xmog_java_value_inc */
1.4.1