aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/source')
-rw-r--r--externals/grill/flext/source/flattr.cpp41
-rwxr-xr-xexternals/grill/flext/source/flmeth.cpp32
-rw-r--r--externals/grill/flext/source/flsupport.h7
-rw-r--r--externals/grill/flext/source/flutil.cpp2
4 files changed, 12 insertions, 70 deletions
diff --git a/externals/grill/flext/source/flattr.cpp b/externals/grill/flext/source/flattr.cpp
index f55fe0ee..8b5ede86 100644
--- a/externals/grill/flext/source/flattr.cpp
+++ b/externals/grill/flext/source/flattr.cpp
@@ -31,23 +31,6 @@ flext_base::attritem::~attritem()
// if(nxt) delete nxt;
}
-/*
-void flext_base::AddAttrItem(attritem *m)
-{
- int ix = m->Hash();
- post("attr index %x",ix);
- attritem *&aix = attrhead[ix];
-
- if(aix) {
- attritem *mi;
- for(mi = aix; mi->nxt; mi = mi->nxt) {}
- mi->nxt = m;
- }
- else
- aix = m;
-// m->th->attrcnt++;
-}
-*/
//! Add get and set attributes
void flext_base::AddAttrib(itemarr *aa,itemarr *ma,const char *attr,metharg tp,methfun gfun,methfun sfun)
@@ -153,8 +136,11 @@ bool flext_base::ListAttrib()
flext_base::attritem *flext_base::FindAttr(const t_symbol *tag,bool get) const
{
+ // first search within object scope
attritem *a = (attritem *)attrhead->Find(tag);
while(a && (a->tag != tag || a->inlet != 0 || (get?a->IsSet():a->IsGet()))) a = (attritem *)a->nxt;
+
+ // then (if nothing found) search within class scope
if(!a) {
a = (attritem *)clattrhead->Find(tag);
while(a && (a->tag != tag || a->inlet != 0 || (get?a->IsSet():a->IsGet()))) a = (attritem *)a->nxt;
@@ -219,27 +205,6 @@ bool flext_base::SetAttrib(attritem *a,int argc,const t_atom *argv)
return true;
}
-/*
-bool flext_base::GetAttrib(const t_symbol *tag)
-{
- if(argc)
- post("%s - %s: arguments ignored",thisName(),GetString(tag));
-
-#ifdef FLEXT_DEBUG
- if(strncmp(GetString(tag),"get",3)) {
- post("%s - %s: tag has no 'get' prefix",thisName(),GetString(tag));
- return false;
- }
-#endif
-
- const t_symbol *mtag = MakeSymbol(GetString(a->tag)+3);
-
- // search for attribute
- attritem *a = (attritem *)attrhead->Find(mtag);
- if(!a) a = (attritem *)clattrhead->Find(mtag);
-}
-*/
-
bool flext_base::GetAttrib(attritem *a)
{
// main attribute tag
diff --git a/externals/grill/flext/source/flmeth.cpp b/externals/grill/flext/source/flmeth.cpp
index 3b40cd1a..acdd10b2 100755
--- a/externals/grill/flext/source/flmeth.cpp
+++ b/externals/grill/flext/source/flmeth.cpp
@@ -34,38 +34,6 @@ void flext_base::methitem::SetArgs(methfun _fun,int _argc,metharg *_args)
argc = _argc,args = _args;
}
-/*
-void flext_base::AddMethItem(methitem *m)
-{
- int ix = m->Hash();
- post("method index %x",ix);
- methitem *&mix = methhead[ix];
-
- if(mix) {
- methitem *mi;
- for(mi = mix; mi->nxt; mi = mi->nxt) {}
- mi->nxt = m;
- }
- else
- mix = m;
-}
-*/
-/*
-const flext_base::methitem *flext_base::FindMethItem(int inlet,const t_symbol *tag,const methitem *st)
-{
- const methitem *mi = st?st:mlst;
- if(inlet < 0) {
- for(; mi; mi = mi->nxt)
- if(mi->tag == tag) break;
- }
- else {
- for(; mi; mi = mi->nxt)
- if(mi->inlet == inlet && mi->tag == tag) break;
- }
- return mi;
-}
-*/
-
void flext_base::AddMethodDef(int inlet,const char *tag)
{
methhead->Add(new methitem(inlet,tag?MakeSymbol(tag):NULL));
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index f7e65899..b76437cc 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -521,6 +521,11 @@ public:
static bool Forward(const t_symbol *sym,AtomAnything &args) { return Forward(sym,args.Header(),args.Count(),args.Atoms()); }
static bool Forward(const char *sym,AtomAnything &args) { return Forward(MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); }
+ static bool Forward(const t_symbol *sym,int argc,const t_atom *argv) { return Forward(sym,sym_list,argc,argv); }
+
+ static bool Forward(const t_symbol *sym,AtomList &args) { return Forward(sym,args.Count(),args.Atoms()); }
+ static bool Forward(const char *sym,AtomList &args) { return Forward(MakeSymbol(sym),args.Count(),args.Atoms()); }
+
//! @} FLEXT_S_MSG
@@ -881,6 +886,8 @@ public:
bool Delay(double tm,void *data = NULL);
//! Trigger a periodic interval
bool Periodic(double tm,void *data = NULL);
+ //! Trigger immediately
+ bool Now(void *data = NULL) { return Delay(0,data); }
//! Worker function, called on every timer event
virtual void Work();
diff --git a/externals/grill/flext/source/flutil.cpp b/externals/grill/flext/source/flutil.cpp
index be9329cd..92e3beaa 100644
--- a/externals/grill/flext/source/flutil.cpp
+++ b/externals/grill/flext/source/flutil.cpp
@@ -17,6 +17,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#if FLEXT_OS == FLEXT_OS_WIN
#include <windows.h>
+#elif FLEXT_OS == FLEXT_OS_MAC
+#include <MacMemory.h>
#endif
void flext::CopyMem(void *dst,const void *src,int bytes)