JavaQxCore.h

00001 /*
00002  * @(#)JavaQxCore.h  0.2.0 / 2007-09-07
00003  *
00004  * Copyright (c) 2007, ETF and contributors. All rights reserved.
00005  *
00006  * This software is licensed under the LGPL, version 2.1, license.
00007  * A copy of the license is included in the file LICENSE-LGPL.txt.
00008  */
00009 #ifndef JAVAQXCORE_H
00010 #define JAVAQXCORE_H
00011 
00019 /*^**************************************************************************^*/
00020 /*- JavaQxCore :: Includes.                                                  -*/
00021 /*^**************************************************************************^*/
00022 
00023 #include <QtCore>
00024 
00025 #include "JavaQxCommon.h"
00026 #include "JNIWrapper.h"
00027 #include "JVMWrapper.h"
00028 #include "JNILogger.h"
00029 #include "JNIObject.h"
00030 #include "JNIReferences.h"
00031 #include "LocalMonitor.h"
00032 #include "QStringAdapter.h"
00033 
00034 /*^**************************************************************************^*/
00035 /*- JavaQxCore :: Macro Definitions.                                         -*/
00036 /*^**************************************************************************^*/
00037 
00038 #define INIT_CLASS(class, cls) \
00039     (sm_##class##Class = (jclass)env->NewGlobalRef(cls))
00040 #define INIT_CONSTRUCTOR(constructor, cls, sig) \
00041     (sm_##constructor##MID = env->GetMethodID(cls, "<init>", sig))
00042 #define INIT_FID(field, cls, sig) \
00043     (sm_##field##FID = env->GetFieldID(cls, #field, sig))
00044 #define INIT_UFID(field, cls, sig) \
00045     (sm_##field##FID = env->GetFieldID(cls, "_"#field, sig))
00046 #define INIT_NFID(field, cls, name, sig) \
00047     (sm_##field##FID = env->GetFieldID(cls, name, sig))
00048 #define INIT_MID(method, cls, sig) \
00049     (sm_##method##MID = env->GetMethodID(cls, #method, sig))
00050 #define INIT_UMID(method, cls, sig) \
00051     (sm_##method##MID = env->GetMethodID(cls, "_"#method, sig))
00052 #define INIT_NMID(method, cls, name, sig) \
00053     (sm_##method##MID = env->GetMethodID(cls, name, sig))
00054 
00055 #define FATAL_LOGGED_ERROR(message) LOG_ERROR(message); env->FatalError(message)
00056 
00057 #endif // JAVAQXCORE_H
00058 
00059 /*^*****************************************************************************
00060   File History:
00061 
00062  - 2007-05-20 10:33:31 Slobodan
00063    Initial version
00064 
00065 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.