From 868f89bd90a345c5a33fa181cca7305fd852d051 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 15 May 2006 23:03:52 +0000 Subject: *** empty log message *** svn path=/trunk/; revision=5065 --- externals/grill/flext/source/flext.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'externals/grill/flext/source/flext.cpp') diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp index df0f0b61..acbbf2ad 100644 --- a/externals/grill/flext/source/flext.cpp +++ b/externals/grill/flext/source/flext.cpp @@ -2,7 +2,7 @@ flext - C++ layer for Max/MSP and pd (pure data) externals -Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) +Copyright (c) 2001-2006 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. @@ -19,7 +19,6 @@ WARRANTIES, see the file, "license.txt," in this distribution. // === flext_base ============================================ -bool flext_base::compatibility = true; const t_symbol *flext_base::curtag = NULL; flext_base::FLEXT_CLASSDEF(flext_base)() @@ -141,35 +140,34 @@ void flext_base::Exit() } -void flext_base::AddMessageMethods(t_class *c) +void flext_base::AddMessageMethods(t_class *c,bool dsp) { add_loadbang(c,cb_loadbang); + #if FLEXT_SYS == FLEXT_SYS_PD class_addmethod(c,(t_method)cb_click,gensym("click"),A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_NULL); #elif FLEXT_SYS == FLEXT_SYS_MAX add_assist(c,cb_assist); add_dblclick(c,cb_click); -#else - #pragma message ("no implementation of loadbang or assist") #endif - SetProxies(c); + SetProxies(c,dsp); StartQueue(); -} - -void flext_base::AddSignalMethods(t_class *c) -{ + + if(dsp) { #if FLEXT_SYS == FLEXT_SYS_MAX - add_dsp(c,cb_dsp); - dsp_initclass(); + add_dsp(c,cb_dsp); + dsp_initclass(); #elif FLEXT_SYS == FLEXT_SYS_PD - CLASS_MAINSIGNALIN(c,flext_hdr,defsig); // float messages going into the left inlet are converted to signal - add_dsp(c,cb_dsp); + CLASS_MAINSIGNALIN(c,flext_hdr,defsig); // float messages going into the left inlet are converted to signal + add_dsp(c,cb_dsp); #else #error Platform not supported! #endif + } } + /*! Set up proxy classes and basic methods at class creation time This ensures that they are processed before the registered flext messages */ @@ -180,7 +178,7 @@ void flext_base::Setup(t_classid id) #if FLEXT_SYS == FLEXT_SYS_MAX if(!IsLib(id)) #endif - AddMessageMethods(c); + AddMessageMethods(c,IsDSP(id)); if(process_attributes) { AddMethod(id,0,"getattributes",cb_ListAttrib); -- cgit v1.2.1