Go to the documentation of this file.
21 #ifndef CASA_GENERIC_H
22 #define CASA_GENERIC_H
35 #define g_name2(a,b) gEnErIc2(a,b)
36 #define gEnErIc2(a,b) a ## b
38 #define g_name3(a,b,c) gEnErIc3(a,b,c)
39 #define gEnErIc3(a,b,c) a ## b ## c
41 #define g_name4(a,b,c,d) gEnErIc4(a,b,c,d)
42 #define gEnErIc4(a,b,c,d) a ## b ## c ## d
44 #define GENERIC_STRING(a) gEnErIcStRiNg(a)
45 #define gEnErIcStRiNg(a) #a
47 #define g_declare(clas,t) g_name2(clas,declare)(t)
48 #define g_declare2(clas,t1,t2) g_name2(clas,declare2)(t1,t2)
50 #define g_implement(clas,t) g_name2(clas,implement)(t)
51 #define g_implement2(clas,t1,t2) g_name2(clas,implement2)(t1,t2)
54 typedef int (*GPT)(int,
char*);
56 #define g_set_handler(gen,type,x) g_name4(set_,type,gen,_handler)(x)
58 #define g_errorhandler(gen,type) g_name3(type,gen,handler)
60 #define g_callerror(gen,type,a,b) (*g_errorhandler(gen,type))(a,b)