Commit 7ac03f6f authored by Thomas Grill's avatar Thomas Grill
Browse files

Added class names for some methods to calm clang

parent 4e10770a
......@@ -364,7 +364,7 @@ typedef NEW_CLASS thisType; \
typedef PARENT_CLASS thisParent; \
static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \
static void __free__(flext_hdr *hdr) { delete hdr->data; } \
static void __setup__(t_classid classid) { thisParent::__setup__(classid); }
static void __setup__(flext_obj::t_classid classid) { thisParent::__setup__(classid); }
#define FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS,SETUPFUN) \
......@@ -373,7 +373,7 @@ typedef NEW_CLASS thisType; \
typedef PARENT_CLASS thisParent; \
static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \
static void __free__(flext_hdr *hdr) { delete hdr->data; } \
static void __setup__(t_classid classid) { \
static void __setup__(flext_obj::t_classid classid) { \
thisParent::__setup__(classid); \
thisType::SETUPFUN(classid); \
}
......@@ -385,7 +385,7 @@ typedef PARENT_CLASS thisParent; \
typedef typename thisParent::t_classid t_classid; \
static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \
static void __free__(flext_hdr *hdr) { delete hdr->data; } \
static void __setup__(t_classid classid) { thisParent::__setup__(classid); }
static void __setup__(flext_obj::t_classid classid) { thisParent::__setup__(classid); }
#define FLEXT_REALHDR_TS(NEW_CLASS, PARENT_CLASS,SETUPFUN) \
......@@ -395,7 +395,7 @@ typedef PARENT_CLASS thisParent; \
typedef typename thisParent::t_classid t_classid; \
static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \
static void __free__(flext_hdr *hdr) { delete hdr->data; } \
static void __setup__(t_classid classid) { \
static void __setup__(flext_obj::t_classid classid) { \
thisParent::__setup__(classid); \
thisType::SETUPFUN(classid); \
}
......
......@@ -24,43 +24,43 @@ WARRANTIES, see the file, "license.txt," in this distribution.
//! Add handler for a gettable attribute
#define FLEXT_CADDATTR_GET(CL,NAME,GFUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL)
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL)
//! Add handler for a settable attribute
#define FLEXT_CADDATTR_SET(CL,NAME,SFUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable attribute
#define FLEXT_CADDATTR_VAR(CL,NAME,GFUN,SFUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable attribute
#define FLEXT_CADDATTR_VAR1(CL,NAME,FUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
//! Add handler for a gettable enum attribute
#define FLEXT_CADDATTR_GET_E(CL,NAME,GFUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL)
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL)
//! Add handler for a settable enum attribute
#define FLEXT_CADDATTR_SET_E(CL,NAME,SFUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable enum attribute
#define FLEXT_CADDATTR_VAR_E(CL,NAME,GFUN,SFUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable enum attribute
#define FLEXT_CADDATTR_VAR1_E(CL,NAME,FUN) \
\
AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
flext_base::AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
//! @} FLEXT_D_CADDATTR
......@@ -75,43 +75,43 @@ AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PR
//! Add handler for a gettable attribute
#define FLEXT_ADDATTR_GET(NAME,GFUN) \
\
AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL)
flext_base::AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL)
//! Add handler for a settable attribute
#define FLEXT_ADDATTR_SET(NAME,SFUN) \
\
AddAttrib(flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable attribute
#define FLEXT_ADDATTR_VAR(NAME,GFUN,SFUN) \
\
AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable attribute
#define FLEXT_ADDATTR_VAR1(NAME,FUN) \
\
AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
flext_base::AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
//! Add handler for a gettable enum attribute
#define FLEXT_ADDATTR_GET_E(NAME,GFUN) \
\
AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL)
flext_base::AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL)
//! Add handler for a settable enum attribute
#define FLEXT_ADDATTR_SET_E(NAME,SFUN) \
\
AddAttrib(flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable enum attribute
#define FLEXT_ADDATTR_VAR_E(NAME,GFUN,SFUN) \
\
AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
flext_base::AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
//! Add handlers for a both get- and settable enum attribute
#define FLEXT_ADDATTR_VAR1_E(NAME,FUN) \
\
AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
flext_base::AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
//! @} FLEXT_D_ADDATTR
......
......@@ -68,7 +68,7 @@ static bool FLEXT_SET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \
//! Declare a set function for a variable list attribute
#define FLEXT_CALLSET_V(FUN) \
static bool FLEXT_SET_PRE(FUN)(flext_base *c,AtomList *&arg) \
static bool FLEXT_SET_PRE(FUN)(flext_base *c,flext::AtomList *&arg) \
{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; }
//! @} FLEXT_DA_CALLSET
......@@ -109,7 +109,7 @@ static bool FLEXT_GET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \
//! Declare a get function for a variable list attribute
#define FLEXT_CALLGET_V(FUN) \
static bool FLEXT_GET_PRE(FUN)(flext_base *c,AtomList *&arg) \
static bool FLEXT_GET_PRE(FUN)(flext_base *c,flext::AtomList *&arg) \
{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; }
//! @} FLEXT_DA_CALLGET
......
......@@ -67,7 +67,7 @@ FLEXT_ATTRSET_(VAR,TP)
//! Declare an implicit set function for a variable list attribute
#define FLEXT_ATTRSET_V(VAR) \
static bool FLEXT_SET_PRE(VAR)(flext_base *c,AtomList *&arg) \
static bool FLEXT_SET_PRE(VAR)(flext_base *c,flext::AtomList *&arg) \
{ FLEXT_CAST<thisType *>(c)->VAR = *arg; return true; }
//! @} FLEXT_DA_ATTRSET
......
......@@ -26,47 +26,47 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#define FLEXT_CADDBANG(CL,IX,M_FUN) \
\
AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
//! Add a handler for a method with either no, list or anything arguments
#define FLEXT_CADDMETHOD(CL,IX,M_FUN) \
\
AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
//! Add a a handler for a method with implicit arguments
#define FLEXT_CADDMETHOD_(CL,IX,M_TAG,M_FUN) \
\
AddMethod(CL,IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(CL,IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN))
//! Add a handler for a method with 1 enum type argument
#define FLEXT_CADDMETHOD_E(CL,IX,M_TAG,M_FUN) \
\
AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
//! Add a handler for a method with 1 argument
#define FLEXT_CADDMETHOD_1(CL,IX,M_TAG,M_FUN,TP1) \
\
AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
//! Add a handler for a method with 2 arguments
#define FLEXT_CADDMETHOD_2(CL,IX,M_TAG,M_FUN,TP1,TP2) \
\
AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
//! Add a handler for a method with 3 arguments
#define FLEXT_CADDMETHOD_3(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3) \
\
AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
flext_base::AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
//! Add a handler for a method with 4 arguments
#define FLEXT_CADDMETHOD_4(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \
\
AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null)
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)
//! Add a handler for a method with 5 arguments
#define FLEXT_CADDMETHOD_5(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \
\
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)
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
......@@ -124,17 +124,17 @@ TMR.SetCallback(*this,FLEXT_CALL_PRE(M_FUN))
//! Enable list element distribution over inlets (if no better handler found)
#define FLEXT_ADDDIST() \
\
SetDist(true)
flext_base::SetDist(true)
//! Add a method handler for bang
#define FLEXT_ADDBANG(IX,M_FUN) \
\
AddMethod(IX,"bang",FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(IX,"bang",FLEXT_CALL_PRE(M_FUN))
//! Add a handler for a method with either no, list or anything arguments
#define FLEXT_ADDMETHOD(IX,M_FUN) \
\
AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
/*! \brief Add a handler for a method with a (variable argument) list
\deprecated This definition obscures that _ indicates the usage of a message tag - use FLEXT_ADDMETHOD instead
......@@ -142,7 +142,7 @@ AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
*/
#define FLEXT_ADDMETHOD_V(IX,M_FUN) \
\
AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
/*! \brief Add a handler for a method with an anything argument
\deprecated This definition obscures that _ indicates the usage of a message tag - use FLEXT_ADDMETHOD instead
......@@ -150,42 +150,42 @@ AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
*/
#define FLEXT_ADDMETHOD_A(IX,M_FUN) \
\
AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(IX,FLEXT_CALL_PRE(M_FUN))
//! Add a a handler for a tagged method with implicit arguments
#define FLEXT_ADDMETHOD_(IX,M_TAG,M_FUN) \
\
AddMethod(IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN))
flext_base::AddMethod(IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN))
//! Add a handler for a method with 1 enum type argument
#define FLEXT_ADDMETHOD_E(IX,M_TAG,M_FUN) \
\
AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
//! Add a handler for a method with 1 argument
#define FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,TP1) \
\
AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
//! Add a handler for a method with 2 arguments
#define FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,TP1,TP2) \
\
AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
//! Add a handler for a method with 3 arguments
#define FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,TP1,TP2,TP3) \
\
AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
flext_base::AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
//! Add a handler for a method with 4 arguments
#define FLEXT_ADDMETHOD_4(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \
\
AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null)
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)
//! Add a handler for a method with 5 arguments
#define FLEXT_ADDMETHOD_5(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \
\
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)
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
......
......@@ -23,21 +23,21 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#define FLEXT_BINDMETHOD(SYM,M_FUN,DATA) \
\
BindMethod(SYM,FLEXT_CALL_PRE(M_FUN),DATA)
flext_base::BindMethod(SYM,FLEXT_CALL_PRE(M_FUN),DATA)
/*! \brief Unbind any handler for a method from a symbol
\note Memory associated to the DATA parameter of FLEXT_BINDMETHOD will *not* be freed here.
*/
#define FLEXT_UNBINDMETHOD(SYM) \
\
UnbindMethod(SYM)
flext_base::UnbindMethod(SYM)
/*! \brief Unbind any handler for a method from a symbol and return user data pointer by DATA
\note Memory associated to the DATA parameter of FLEXT_BINDMETHOD will *not* be freed here.
*/
#define FLEXT_UNBINDMETHOD_X(SYM,DATA) \
\
UnbindMethod(SYM,&DATA)
flext_base::UnbindMethod(SYM,&DATA)
//! @} FLEXT_D_BINDMETHOD
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment