00001 #ifndef __GRAPEWRAPPER__
00002 #define __GRAPEWRAPPER__
00003
00004 #include <string>
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009
00010 #define class GrapeClass
00011 #define private GrapePrivate
00012 #define friend GrapeFriend
00013 #define explicit GrapeExplicit
00014
00015 #define G_CPP
00016 #include <grape.h>
00017 #undef G_CPP
00018
00019 #undef class
00020 #undef private
00021 #undef friend
00022 #undef explicit
00023
00024
00025
00026 #define GRAPE_CALL(obj,meth) GRAPE(obj,((char *)meth))
00027
00028
00029
00030 inline void g_newerrorbox (const char * a, const char * b, int c, const char * d)
00031 {
00032 g_errorbox(((char *)a),((char *)b),c,((char *)d));
00033 }
00034
00035
00036 #define GRAPE_ALERT(condition,message,error_exit) \
00037 do{if(!(condition)){ \
00038 g_newerrorbox(message,__FILE__,__LINE__,#condition); \
00039 error_exit; \
00040 }}while(0)
00041
00042 #ifdef __cplusplus
00043 }
00044 #endif
00045
00046 #endif