fldefs_methadd.h
Go to the documentation of this file.
/*
flext - C++ layer for Max and Pure Data externals
Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
#ifndef __FLEXT_DEFS_METHADD_H
#define __FLEXT_DEFS_METHADD_H
#define FLEXT_CADDBANG(CL,IX,M_FUN) \
\
flext_base::AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
#define FLEXT_CADDMETHOD(CL,IX,M_FUN) \
\
flext_base::AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
#define FLEXT_CADDMETHOD_(CL,IX,M_TAG,M_FUN) \
\
flext_base::AddMethod(CL,IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN))
#define FLEXT_CADDMETHOD_E(CL,IX,M_TAG,M_FUN) \
\
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
#define FLEXT_CADDMETHOD_1(CL,IX,M_TAG,M_FUN,TP1) \
\
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
#define FLEXT_CADDMETHOD_2(CL,IX,M_TAG,M_FUN,TP1,TP2) \
\
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
#define FLEXT_CADDMETHOD_3(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3) \
\
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
#define FLEXT_CADDMETHOD_4(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \
\
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null)
#define FLEXT_CADDMETHOD_5(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \
\
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null)
// Shortcuts
#define FLEXT_CADDMETHOD_B(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,bool)
#define FLEXT_CADDMETHOD_F(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float)
#define FLEXT_CADDMETHOD_FF(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float)
#define FLEXT_CADDMETHOD_FFF(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float)
#define FLEXT_CADDMETHOD_I(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int)
#define FLEXT_CADDMETHOD_II(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int)
#define FLEXT_CADDMETHOD_III(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int)
#define FLEXT_ADDTIMER(TMR,M_FUN) \
\
TMR.SetCallback(*this,FLEXT_CALL_PRE(M_FUN))
#define FLEXT_ADDDIST() \
\
flext_base::SetDist(true)
#define FLEXT_ADDBANG(IX,M_FUN) \
\
flext_base::AddMethod(IX,"bang",FLEXT_CALL_PRE(M_FUN))
#define FLEXT_ADDMETHOD(IX,M_FUN) \
\
flext_base::AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
#define FLEXT_ADDMETHOD_V(IX,M_FUN) \
\
flext_base::AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
#define FLEXT_ADDMETHOD_A(IX,M_FUN) \
\
flext_base::AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
#define FLEXT_ADDMETHOD_(IX,M_TAG,M_FUN) \
\
flext_base::AddMethod(IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN))
#define FLEXT_ADDMETHOD_E(IX,M_TAG,M_FUN) \
\
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
#define FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,TP1) \
\
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
#define FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,TP1,TP2) \
\
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
#define FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,TP1,TP2,TP3) \
\
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
#define FLEXT_ADDMETHOD_4(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \
\
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null)
#define FLEXT_ADDMETHOD_5(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \
\
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null)
// Shortcuts
#define FLEXT_ADDMETHOD_B(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,bool)
#define FLEXT_ADDMETHOD_F(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,float)
#define FLEXT_ADDMETHOD_FF(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float)
#define FLEXT_ADDMETHOD_FFF(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float)
#define FLEXT_ADDMETHOD_I(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,int)
#define FLEXT_ADDMETHOD_II(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int)
#define FLEXT_ADDMETHOD_III(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int)
#endif