Go to the documentation of this file.
14#ifndef __FLEXT_DEFS_METHCB_H
15#define __FLEXT_DEFS_METHCB_H
24#define FLEXT_CALLBACK(M_FUN) \
25static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c) \
26{ FLEXT_CAST<thisType *>(c)->M_FUN(); return true; }
29#define FLEXT_CALLBACK_A(M_FUN) \
30static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv) \
31{ FLEXT_CAST<thisType *>(c)->M_FUN(s,argc,argv); return true; }
34#define FLEXT_CALLBACK_V(M_FUN) \
35static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int argc,t_atom *argv) \
36{ FLEXT_CAST<thisType *>(c)->M_FUN(argc,argv); return true; }
39#define FLEXT_CALLBACK_X(M_FUN) \
40static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,void *data) \
41{ FLEXT_CAST<thisType *>(c)->M_FUN(data); return true; }
44#define FLEXT_CALLBACK_AX(M_FUN) \
45static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv,void *data) \
46{ FLEXT_CAST<thisType *>(c)->M_FUN(s,argc,argv,data); return true; }
49#define FLEXT_CALLBACK_T(M_FUN) \
51FLEXT_CALLBACK_X(M_FUN)
54#define FLEXT_CALLBACK_B(M_FUN) \
55static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int &arg1) \
56{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1 != 0); return true; }
59#define FLEXT_CALLBACK_1(M_FUN,TP1) \
60static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1) \
61{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1); return true; }
64#define FLEXT_CALLBACK_2(M_FUN,TP1,TP2) \
65static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2) \
66{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2); return true; }
69#define FLEXT_CALLBACK_3(M_FUN,TP1,TP2,TP3) \
70static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3) \
71{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3); return true; }
74#define FLEXT_CALLBACK_4(M_FUN,TP1,TP2,TP3,TP4) \
75static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4) \
76{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4); return true; }
79#define FLEXT_CALLBACK_5(M_FUN,TP1,TP2,TP3,TP4,TP5) \
80static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,TP5 &arg5) \
81{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4,arg5); return true; }
87#define FLEXT_CALLBACK_F(M_FUN) \
89FLEXT_CALLBACK_1(M_FUN,float)
92#define FLEXT_CALLBACK_FF(M_FUN) \
94FLEXT_CALLBACK_2(M_FUN,float,float)
97#define FLEXT_CALLBACK_FFF(M_FUN) \
99FLEXT_CALLBACK_3(M_FUN,float,float,float)
102#define FLEXT_CALLBACK_I(M_FUN) \
104FLEXT_CALLBACK_1(M_FUN,int)
107#define FLEXT_CALLBACK_II(M_FUN) \
109FLEXT_CALLBACK_2(M_FUN,int,int)
112#define FLEXT_CALLBACK_III(M_FUN) \
114FLEXT_CALLBACK_3(M_FUN,int,int,int)
117#define FLEXT_CALLBACK_S(M_FUN) \
119FLEXT_CALLBACK_1(M_FUN,t_symptr)
123#define FLEXT_CALLBACK_G FLEXT_CALLBACK_V