[Gridflow-cvs] [svn] commit: r6168 - in /trunk/src: classes2.cxx gridflow.cxx gridflow.hxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Aug 16 20:06:36 EDT 2010


Author: matju
Date: Mon Aug 16 20:06:36 2010
New Revision: 6168

Log:
experiment with A_LIST, A_BLOB, the 'binbuf' selector, and the removal of outlet_atom2

Modified:
    trunk/src/classes2.cxx
    trunk/src/gridflow.cxx
    trunk/src/gridflow.hxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Mon Aug 16 20:06:36 2010
@@ -274,7 +274,7 @@
 		int i = int(f);
 		if (i<0) i+=r.size();
 		if (i<0 || i>=int(r.size())) {out[0](); return;} /* out-of-range */
-		outlet_atom2(out[0],&r[i]);
+		out[0](r[i]);
 	}
 	\decl 1 list(...) {r.resize(argc); for (int i=0; i<argc; i++) r[i]=argv[i];}
 };

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Mon Aug 16 20:06:36 2010
@@ -183,14 +183,10 @@
     if      (a.a_type==A_FLOAT  ) (*this)(a.a_float);
     else if (a.a_type==A_SYMBOL ) (*this)(a.a_symbol);
     else if (a.a_type==A_POINTER) (*this)(a.a_gpointer);
+    else if (a.a_type==A_LIST   ) (*this)((t_list *)a.a_gpointer);
     else if (a.a_type==A_BLOB   ) (*this)((t_blob *)a.a_gpointer);
     else error("can't send atom whose type is %d",a.a_type);
-}
-void outlet_atom2 (PtrOutlet self, t_atom *av) {
-	if (av->a_type==A_FLOAT)   self(av->a_float);    else
-	if (av->a_type==A_SYMBOL)  self(av->a_symbol);   else
-	if (av->a_type==A_POINTER) self(av->a_gpointer); else
-	self(1,av);
+    //self(1,av);
 }
 
 bool t_atom2::operator == (const t_atom2 &b) {
@@ -198,8 +194,9 @@
 	if (a.a_type!=b.a_type) return false;
 	if (a.a_type==A_FLOAT)   return a.a_float   ==b.a_float;
 	if (a.a_type==A_SYMBOL)  return a.a_symbol  ==b.a_symbol;
-	if (a.a_type==A_POINTER) return a.a_gpointer==b.a_gpointer;
-	if (a.a_type==A_LIST)    return a.a_gpointer==b.a_gpointer;
+	if (a.a_type==A_POINTER) return a.a_gpointer==b.a_gpointer; // not deep
+	if (a.a_type==A_LIST)    return a.a_gpointer==b.a_gpointer; // not deep
+	if (a.a_type==A_BLOB)    return a.a_gpointer==b.a_gpointer; // not deep
 	RAISE("don't know how to compare elements of type %d",a.a_type);
 }
 //----------------------------------------------------------------

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Mon Aug 16 20:06:36 2010
@@ -849,11 +849,11 @@
 	void operator () (t_gpointer *g) {outlet_pointer(p,g);}
 //	void operator () (t_blob *g)     {outlet_blob   (p,g);} // can't use this with vanille
 	void operator () (t_blob *g)     {t_atom2 a[] = {g}; outlet_anything(p,gensym("blob"),1,a);}
+	void operator () (t_binbuf *g)   {t_atom2 a[] = {g}; outlet_anything(p,gensym("binbuf"),1,a);}
 	void operator () (             int argc, t_atom *argv) {outlet_list(p,&s_list,argc,argv);}
 	void operator () (t_symbol *s, int argc, t_atom *argv) {outlet_anything(p,s,  argc,argv);}
 	void operator () (t_atom &a);
 };
-void outlet_atom2 (PtrOutlet self, t_atom *av);
 
 // represents objects that have inlets/outlets
 \class FObject {



More information about the Gridflow-cvs mailing list