diff options
author | Kay Ramme <kr@openoffice.org> | 2000-09-28 16:35:43 +0000 |
---|---|---|
committer | Kay Ramme <kr@openoffice.org> | 2000-09-28 16:35:43 +0000 |
commit | b408e663e9d8226d5c24bbbfb0020a33a8908da4 (patch) | |
tree | b0f815b1fae0214a307e1dd8fabd9913de1ba16f /stoc | |
parent | 1915b827947bec0c85158548df4c14eee9705ae6 (diff) |
cleaned
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/javavm/jvmargs.hxx | 208 |
1 files changed, 72 insertions, 136 deletions
diff --git a/stoc/source/javavm/jvmargs.hxx b/stoc/source/javavm/jvmargs.hxx index 617755fba8cf..d32b3b45f675 100644 --- a/stoc/source/javavm/jvmargs.hxx +++ b/stoc/source/javavm/jvmargs.hxx @@ -2,9 +2,9 @@ * * $RCSfile: jvmargs.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:29:34 $ + * last change: $Author: kr $ $Date: 2000-09-28 17:35:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,170 +59,106 @@ * ************************************************************************/ -#ifndef __JVM -#define __JVM -#if STLPORT_VERSION < 321 -#include <tools/presys.h> -#include <vector.h> -#include <tools/postsys.h> -#else +#ifndef __JVM_HXX +#define __JVM_HXX + #include <cstdarg> #include <stl/vector> -#endif - -#ifndef _RTL_USTRING_HXX_ -#include <rtl/ustring.hxx> -#endif - -#include "jni.h" - -using namespace ::rtl; - -#ifndef JNI_VERSION_1_2 - -#define JNI_VERSION_1_1 0x00010001 -#define JNI_VERSION_1_2 0x00010002 - -#define JNI_EDETACHED (-2) /* thread detached from the VM */ -#define JNI_EVERSION (-3) /* JNI version error */ -#define JNI_ENOMEM (-4) /* not enough memory */ -#define JNI_EEXIST (-5) /* VM already created */ -#define JNI_EINVAL (-6) /* invalid arguments */ - - -struct JNIInvokeInterface12_; -struct JavaVM12_; - -typedef JavaVM12_ JavaVM12; -#define JAVAVM JavaVM12 - -struct JNIInvokeInterface12_ -{ - void *reserved0; - void *reserved1; - void *reserved2; - jint (JNICALL *DestroyJavaVM)(JavaVM12 *vm); - jint (JNICALL *AttachCurrentThread)(JavaVM12 *vm, void **penv, void *args); - jint (JNICALL *DetachCurrentThread)(JavaVM12 *vm); - jint (JNICALL *GetEnv)(JavaVM12 *vm, void **penv, jint version); -}; -struct JavaVM12_ -{ - const struct JNIInvokeInterface12_ *functions; +#include <rtl/ustring> - jint DestroyJavaVM() - { - return functions->DestroyJavaVM(this); - } +#include "jni.h" - jint AttachCurrentThread(void **penv, void *args) - { - return functions->AttachCurrentThread(this, penv, args); - } - jint DetachCurrentThread() - { - return functions->DetachCurrentThread(this); - } +typedef jint (JNICALL *JNIvfprintf)(FILE *fp, const char *format, va_list args); +typedef void (JNICALL *JNIexit)(jint code); +typedef void (JNICALL *JNIabort)(void); - jint GetEnv(void **penv, jint version) - { - return functions->GetEnv(this, penv, version); - } -}; +extern "C" { + typedef jint JNICALL JNI_InitArgs_Type(void *); + typedef jint JNICALL JNI_CreateVM_Type(JavaVM **, JNIEnv **, void *); -typedef struct JavaVMOption -{ - char *optionString; - void *extraInfo; -} JavaVMOption; +} -typedef struct JavaVMInitArgs -{ - jint version; +namespace stoc_javavm { - jint nOptions; - JavaVMOption *options; - jboolean ignoreUnrecognized; -} JavaVMInitArgs; + class JVM { + ::std::vector<rtl::OUString> _props; -typedef struct JavaVMAttachArgs -{ - jint version; + ::rtl::OUString _runtimeLib; + ::rtl::OUString _systemClasspath; + ::rtl::OUString _userClasspath; + sal_Bool _enabled; - char *name; - jobject group; -} JavaVMAttachArgs; + sal_Bool _is_debugPort; + jint _debugPort; -#else -#define JAVAVM JavaVM -#endif + sal_Bool _is_disableAsyncGC; + jint _disableAsyncGC; -typedef jint (JNICALL *JNIvfprintf)(FILE *fp, const char *format, va_list args); -typedef void (JNICALL *JNIexit)(jint code); -typedef void (JNICALL *JNIabort)(void); + sal_Bool _is_enableClassGC; + jint _enableClassGC; -extern "C" { + sal_Bool _is_enableVerboseGC; + jint _enableVerboseGC; -#ifdef OS2 -typedef jint JNICALL0 JNI_InitArgs_Type(void *); -typedef jint JNICALL0 JNI_CreateVM_Type(JAVAVM **, JNIEnv **, void *); -#else -typedef jint JNICALL JNI_InitArgs_Type(void *); -typedef jint JNICALL JNI_CreateVM_Type(JAVAVM **, JNIEnv **, void *); -#endif + sal_Bool _is_checkSource; + jint _checkSource; -} + sal_Bool _is_nativeStackSize; + jint _nativeStackSize; -class JVM -{ - ::std::vector<JavaVMOption> p_props; + sal_Bool _is_javaStackSize; + jint _javaStackSize; - JavaVMInitArgs javaVMInitArgs; - JDK1_1InitArgs jDK1_1InitArgs; + sal_Bool _is_minHeapSize; + jint _minHeapSize; - ::std::vector<OUString> props; + sal_Bool _is_maxHeapSize; + jint _maxHeapSize; - sal_Bool debug; - jint jiDebugPort; - OUString usCompiler; + sal_Bool _is_verifyMode; + jint _verifyMode; -protected: - void pushPProp(OUString uString, void * extraInfo = NULL); + sal_Bool _is_print; + JNIvfprintf _print; -public: - JVM(JNI_InitArgs_Type * pVMInitArgs) ; - ~JVM() ; + sal_Bool _is_exit; + JNIexit _exit; - void pushProp(const OUString & uString); + sal_Bool _is_abort; + JNIabort _abort; - void disableAsyncGC(jboolean jbFlag); - void enableClassGC(jboolean jbFlag); - void enableVerboseGC(jboolean jbFlag); - void verbose(jboolean jbFlag); + public: + JVM() throw(); - void setCompiler(const OUString & usCompiler); - void nativeStackSize(jint jiSize); - void javaStackSize(jint jiSize); - void verifyMode(OUString uStr); - void minHeapSize(jint jiSize); - void maxHeapSize(jint jiSize); - void setDebug(sal_Bool flag); - void setDebugPort(jint jiDebugPort); - void classPath(OString str); - void vfprintf(JNIvfprintf vfprintf); - void exit(JNIexit exit); - void abort(JNIabort abort); + void pushProp(const ::rtl::OUString & uString) throw(); - sal_Bool getDebug(); - OUString getCompiler(); + void setEnabled(sal_Bool sbFlag) throw(); + void setDisableAsyncGC(jint jiFlag) throw(); + void setEnableClassGC(jint jiFlag) throw(); + void setEnableVerboseGC(jint jiFlag) throw(); + void setCheckSource(jint jiFlag) throw(); + void setNativeStackSize(jint jiSize) throw(); + void setJavaStackSize(jint jiSize) throw(); + void setVerifyMode(const ::rtl::OUString & mode) throw(); + void setMinHeapSize(jint jiSize) throw(); + void setMaxHeapSize(jint jiSize) throw(); + void setDebugPort(jint jiDebugPort) throw(); + void setSystemClasspath(const ::rtl::OUString & str) throw(); + void setUserClasspath(const ::rtl::OUString & str) throw(); + void setPrint(JNIvfprintf vfprintf) throw(); + void setExit(JNIexit exit) throw(); + void setAbort(JNIabort abort) throw(); + void setRuntimeLib(const ::rtl::OUString & libName) throw(); - const JavaVMInitArgs * getJavaVMInitArgs(); + void setArgs(JDK1_1InitArgs * pargs) const throw(); - const JDK1_1InitArgs * getJDK1_1InitArgs(); -}; + const ::rtl::OUString & getRuntimeLib() const throw(); + sal_Bool isEnabled() const throw(); + }; +} #endif |