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

xmog_localenv.h

00001 /*
00002  * Copyright 1999-2006 by Codemesh, Inc.  ALL RIGHTS RESERVED.
00003  */
00004 
00005 #ifndef xmog_localenv_inc
00006 #define xmog_localenv_inc
00007 
00008 
00009 #include "xmog.h"
00010 
00011 
00012 class xmog_jvm;
00013 class xmog_error_handler;
00014 struct xmog_base;
00015 
00016 
00031 class XMOG_DECLSPEC xmog_localenv
00032 {
00033 public:
00034 
00035     xmog_localenv();
00036 
00037     xmog_localenv( xmog_jvm * jvm, JNIEnv * env = NULL );
00038 
00039     ~xmog_localenv();
00040 
00048     void            in_delete( bool bInDelete );
00049 
00053     bool            in_delete();
00054 
00062     void            in_detach( bool bInDetach );
00063 
00067     bool            in_detach();
00068 
00076     void            in_exception( bool bInException );
00077 
00081     bool            in_exception();
00082 
00087     xmog_jvm *      getJvm();
00088 
00092     JNIEnv *        getJNIEnv();
00093 
00099     JNIEnv *        getEnv();
00100 
00104     JavaVM *        getJavaVM();
00105 
00109     jint            getJNIVersion();
00110 
00125     void            setDefaultEncoding( xmog_base * _enc );
00126 
00137     xmog_base *     getDefaultEncoding();
00138 
00148     void            set_error_handler( xmog_error_handler * _eh );
00149 
00157     xmog_error_handler *    get_error_handler();
00158 
00166     static xmog_localenv *  get_instance( xmog_localenv * env );
00167 
00180     static xmog_localenv *  get_instance( JNIEnv * env );
00181 
00191     static xmog_localenv *  get_localenv( JNIEnv *, XMOGVERSION, XMOGCONFIG, XMOGVERSION, const char *, jint );
00192 
00196     void *          operator new( size_t );
00197 
00198     void            operator delete( void * );
00199 
00200 private:
00201 
00202     xmog_jvm *      jvm_;
00203 
00204     JNIEnv *        env_;
00205 
00206     bool            bInDelete_;
00207 
00208     bool            bInDetach_;
00209 
00210     bool            bInException_;
00211 
00212     jint            clientTid_;
00213 
00214     jint            serverTid_;
00215 
00216     void *          task_;
00217 
00218     xmog_base *     default_enc_;
00219 
00220     xmog_error_handler *    eh_;
00221 };
00222 
00223 
00224 #if (XMOG_PRE_3_0_SUPPORT == 1)
00225 
00231 typedef xmog_localenv   jcpp_localenv;
00232 
00233 #endif
00234 
00235 
00236 
00237 #endif /* xmog_localenv_inc */

Generated on Wed May 31 14:01:19 2006 for Shared Codemesh Runtime Library API Reference by  doxygen 1.4.1