Commit 8002d0ec authored by thomas's avatar thomas
Browse files

some restructuring

usage of symbols for method and attribute adding
fix for ToOut calls in dsp time 

git-svn-id: https://svn.grrrr.org/ext/trunk@987 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 17870a58
......@@ -22,7 +22,7 @@ CFLAGS=$(CFLAGS) /YX$(PRECOMPILE) /Fp$(OBJPATH)\precompiled.pch
CFLAGS=$(CFLAGS) /LD
# enable exception handling
CFLAGS=$(CFLAGS) /GX
CFLAGS=$(CFLAGS) /EHsc
# no banner
CFLAGS=$(CFLAGS) /nologo
......
......@@ -26,7 +26,10 @@ Version history:
- use new PD idle callback for queues messages (currently in devel_0_38)
- fixed bug with unregistering for bound symbols
- removed virtual m_assist function (which was only useful for Max)... stick to static assist strings
- removed virtual flext_dsp::m_enable function (which wasn't present for Max/MSP)
- added m_click method which gets called on alt-click (PD) resp. double clicks (Max) onto the object box
- in ToOut check if we are inside dsp (and use ToQueue then...)
- some restructuring and use symbols (rather the char *) natively for AddMethod* and AddAttrib* functions
0.4.7:
- added flext::GetBool (just because flext::GetInt has been there for a while)
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......@@ -43,9 +43,8 @@ flext_base::AttrDataCont::~AttrDataCont()
//! Add get and set attributes
void flext_base::AddAttrib(ItemCont *aa,ItemCont *ma,const char *attr,metharg tp,methfun gfun,methfun sfun)
void flext_base::AddAttrib(ItemCont *aa,ItemCont *ma,const t_symbol *asym,metharg tp,methfun gfun,methfun sfun)
{
const t_symbol *asym = MakeSymbol(attr);
AttrItem *a,*b;
FLEXT_ASSERT(asym != sym__ && asym != sym_list && asym != sym_float && asym != sym_symbol && asym != sym_anything);
......@@ -71,7 +70,7 @@ void flext_base::AddAttrib(ItemCont *aa,ItemCont *ma,const char *attr,metharg tp
aa->Add(b,asym);
static char tmp[256] = "get";
strcpy(tmp+3,attr);
strcpy(tmp+3,GetString(asym));
// bind attribute to a method
MethItem *mi = new MethItem(b);
......@@ -87,7 +86,7 @@ void flext_base::AddAttrib(ItemCont *aa,ItemCont *ma,const char *attr,metharg tp
}
}
void flext_base::AddAttrib(const char *attr,metharg tp,methfun gfun,methfun sfun)
void flext_base::AddAttrib(const t_symbol *attr,metharg tp,methfun gfun,methfun sfun)
{
if(procattr)
AddAttrib(ThAttrs(),ThMeths(),attr,tp,gfun,sfun);
......@@ -95,7 +94,7 @@ void flext_base::AddAttrib(const char *attr,metharg tp,methfun gfun,methfun sfun
error("%s - attribute procession is not enabled!",thisName());
}
void flext_base::AddAttrib(t_classid c,const char *attr,metharg tp,methfun gfun,methfun sfun)
void flext_base::AddAttrib(t_classid c,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun)
{
AddAttrib(ClAttrs(c),ClMeths(c),attr,tp,gfun,sfun);
}
......@@ -169,12 +168,14 @@ bool flext_base::InitAttrib(int argc,const t_atom *argv)
return true;
}
static const t_symbol *sym_attributes = flext::MakeSymbol("attributes");
bool flext_base::ListAttrib() const
{
if(procattr) {
AtomList la;
ListAttrib(la);
ToOutAnything(GetOutAttr(),MakeSymbol("attributes"),la.Count(),la.Atoms());
ToOutAnything(GetOutAttr(),sym_attributes,la.Count(),la.Atoms());
return true;
}
else
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......@@ -14,7 +14,11 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
#if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_NOATTREDIT)
#if FLEXT_SYS == FLEXT_SYS_PD
#ifdef _MSC_VER
#pragma warning( disable : 4091 )
#endif
/*
#ifdef PD_DEVEL_VERSION
......@@ -22,10 +26,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#endif
*/
#ifdef _MSC_VER
#pragma warning( disable : 4091 )
#endif
#ifndef FLEXT_CLONEWIDGET
// This is problematic... non-public headers!
// compilation is specific for a compiled version!!
......@@ -39,6 +39,39 @@ WARRANTIES, see the file, "license.txt," in this distribution.
static t_widgetbehavior widgetbehavior;
void flext_base::SetGfx(t_classid c)
{
// widgetbehavior struct MUST be resident... (static is just ok here)
#ifndef FLEXT_CLONEWIDGET
widgetbehavior.w_visfn = c->c_wb->w_visfn;
widgetbehavior.w_selectfn = c->c_wb->w_selectfn;
widgetbehavior.w_getrectfn = c->c_wb->w_getrectfn;
widgetbehavior.w_displacefn = c->c_wb->w_displacefn;
widgetbehavior.w_activatefn = c->c_wb->w_activatefn;
widgetbehavior.w_deletefn = c->c_wb->w_deletefn;
widgetbehavior.w_selectfn = c->c_wb->w_selectfn;
#else
widgetbehavior.w_visfn = text_widgetbehavior.w_visfn;
widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn;
widgetbehavior.w_getrectfn = text_widgetbehavior.w_getrectfn;
widgetbehavior.w_displacefn = text_widgetbehavior.w_displacefn;
widgetbehavior.w_activatefn = text_widgetbehavior.w_activatefn;
widgetbehavior.w_deletefn = text_widgetbehavior.w_deletefn;
widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn;
#endif
#ifndef FLEXT_NOATTREDIT
attrsetup(c);
#endif // FLEXT_NOATTREDIT
widgetbehavior.w_clickfn = cb_click;
class_setwidget(c, &widgetbehavior);
}
#ifndef FLEXT_NOATTREDIT
#ifndef FLEXT_CLONEWIDGET
static void (*ori_vis)(t_gobj *c, t_glist *, int vis) = NULL;
static void (*ori_select)(t_gobj *c, t_glist *, int state) = NULL;
......@@ -408,26 +441,16 @@ static void tclscript()
);
}
void flext_base::SetAttrEditor(t_classid c)
void flext_base::attrsetup(t_classid c)
{
// widgetbehavior struct MUST be resident... (static is just ok here)
#ifndef FLEXT_CLONEWIDGET
ori_vis = c->c_wb->w_visfn;
ori_select = c->c_wb->w_selectfn;
widgetbehavior.w_getrectfn = c->c_wb->w_getrectfn;
widgetbehavior.w_displacefn = c->c_wb->w_displacefn;
widgetbehavior.w_activatefn = c->c_wb->w_activatefn;
widgetbehavior.w_deletefn = c->c_wb->w_deletefn;
widgetbehavior.w_selectfn = c->c_wb->w_selectfn;
#else
widgetbehavior.w_getrectfn = text_widgetbehavior.w_getrectfn;
widgetbehavior.w_displacefn = text_widgetbehavior.w_displacefn;
widgetbehavior.w_activatefn = text_widgetbehavior.w_activatefn;
widgetbehavior.w_deletefn = text_widgetbehavior.w_deletefn;
widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn;
#endif
widgetbehavior.w_visfn = cb_GfxVis;
widgetbehavior.w_selectfn = cb_GfxSelect;
#if PD_MINOR_VERSION >= 37
class_setpropertiesfn(c,cb_GfxProperties);
class_setsavefn(c,cb_GfxSave);
......@@ -436,11 +459,6 @@ void flext_base::SetAttrEditor(t_classid c)
widgetbehavior.w_savefn = cb_GfxSave;
#endif
widgetbehavior.w_clickfn = cb_click;
widgetbehavior.w_visfn = cb_GfxVis;
widgetbehavior.w_selectfn = cb_GfxSelect;
class_setwidget(c, &widgetbehavior);
tclscript();
}
......@@ -800,5 +818,7 @@ void flext_base::BinbufAttr(t_binbuf *b,bool transdoll)
}
}
#endif // FLEXT_NOATTREDIT
#endif // FLEXT_SYS_PD
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......@@ -26,43 +26,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,NAME,(FLEXT_GET_PRE(GFUN)),NULL)
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,NAME,NULL,(FLEXT_SET_PRE(SFUN)))
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,NAME,(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN)))
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,NAME,(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
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,NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL)
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,NAME,NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
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,NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
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,NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
//! @} FLEXT_D_CADDATTR
......@@ -77,43 +77,43 @@ AddAttrib(CL,NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(f
//! Add handler for a gettable attribute
#define FLEXT_ADDATTR_GET(NAME,GFUN) \
\
AddAttrib(NAME,(FLEXT_GET_PRE(GFUN)),NULL)
AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL)
//! Add handler for a settable attribute
#define FLEXT_ADDATTR_SET(NAME,SFUN) \
\
AddAttrib(NAME,NULL,(FLEXT_SET_PRE(SFUN)))
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(NAME,(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN)))
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(NAME,(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
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(NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL)
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(NAME,NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
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(NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
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(NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
//! @} FLEXT_D_ADDATTR
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......@@ -26,7 +26,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
//! Add a method handler for bang
#define FLEXT_CADDBANG(CL,IX,M_FUN) \
\
AddMethod(CL,IX,"bang",FLEXT_CALL_PRE(M_FUN))
AddMethod(CL,IX,flext::sym_bang,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) \
......@@ -35,37 +35,37 @@ 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,M_TAG,FLEXT_CALL_PRE(M_FUN))
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null)
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
......@@ -73,37 +73,37 @@ AddMethod(ClMeths(CL),IX,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FL
//! Add a handler for a method with a boolean argument
#define FLEXT_CADDMETHOD_B(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_1(CL,IX,M_TAG,M_FUN,bool)
FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,bool)
//! Add a handler for a method with 1 float argument
#define FLEXT_CADDMETHOD_F(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_1(CL,IX,M_TAG,M_FUN,float)
FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float)
//! Add a handler for a method with 2 float arguments
#define FLEXT_CADDMETHOD_FF(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_2(CL,IX,M_TAG,M_FUN,float,float)
FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float)
//! Add a handler for a method with 3 float arguments
#define FLEXT_CADDMETHOD_FFF(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_3(CL,IX,M_TAG,M_FUN,float,float,float)
FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float)
//! Add a handler for a method with 1 integer argument
#define FLEXT_CADDMETHOD_I(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_1(CL,IX,M_TAG,M_FUN,int)
FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int)
//! Add a handler for a method with 2 integer arguments
#define FLEXT_CADDMETHOD_II(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_2(CL,IX,M_TAG,M_FUN,int,int)
FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int)
//! Add a handler for a method with 3 integer arguments
#define FLEXT_CADDMETHOD_III(CL,IX,M_TAG,M_FUN) \
\
FLEXT_CADDMETHOD_3(CL,IX,M_TAG,M_FUN,int,int,int)
FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int)
//! @} FLEXT_D_CADDMETHOD
......@@ -153,37 +153,37 @@ 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,M_TAG,FLEXT_CALL_PRE(M_FUN))
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null)
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,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null)
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
......@@ -191,37 +191,37 @@ AddMethod(ThMeths(),IX,M_TAG,(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEX
//! Add a handler for a method with a boolean argument
#define FLEXT_ADDMETHOD_B(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,bool)
FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,bool)
//! Add a handler for a method with 1 float argument
#define FLEXT_ADDMETHOD_F(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,float)
FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,float)
//! Add a handler for a method with 2 float arguments
#define FLEXT_ADDMETHOD_FF(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,float,float)
FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float)
//! Add a handler for a method with 3 float arguments
#define FLEXT_ADDMETHOD_FFF(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,float,float,float)
FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float)
//! Add a handler for a method with 1 integer argument
#define FLEXT_ADDMETHOD_I(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,int)
FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,int)
//! Add a handler for a method with 2 integer arguments
#define FLEXT_ADDMETHOD_II(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,int,int)
FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int)
//! Add a handler for a method with 3 integer arguments
#define FLEXT_ADDMETHOD_III(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,int,int,int)
FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int)
//! @} FLEXT_D_ADDMETHOD
......
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
Copyright (c) 2001-2005 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.
......