[Gridflow-cvs] [svn] commit: r3412 - /trunk/base/grid.h

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Apr 3 13:24:40 EDT 2008


Author: matju
Date: Thu Apr  3 13:24:39 2008
New Revision: 3412

Log:
introducing FClass2, as an extension of t_class (and a replacement of Ruby FObject subclass objects)

Modified:
    trunk/base/grid.h

Modified: trunk/base/grid.h
==============================================================================
--- trunk/base/grid.h (original)
+++ trunk/base/grid.h Thu Apr  3 13:24:39 2008
@@ -755,6 +755,7 @@
 	const char *name; // C++/Ruby name (not PD name)
 	int methodsn; MethodDecl *methods; // C++ -> Ruby methods
 };
+void fclass_install(FClass *fc, const char *super);
 
 //****************************************************************
 // GridOutlet represents a grid-aware outlet
@@ -886,6 +887,7 @@
 
 #define install(name,ins,outs) rb_funcall(rself,SI(install),3,rb_str_new2(name),INT2NUM(ins),INT2NUM(outs))
 #define install_format(name,mode,suffixes) do {install(name,1,1); suffixes_are(name,suffixes);} while(0)
+#define add_creator(name) rb_funcall(rself,SI(add_creator),1,rb_str_new2(name))
 
 #define SUPER rb_call_super(argc,argv);
 
@@ -916,4 +918,13 @@
 inline void set_atom (t_atom *a, t_symbol *v) {SETSYMBOL(a,v);}
 inline void set_atom (t_atom *a, Numop    *v) {SETSYMBOL(a,v->sym);}
 
+struct FClass2 {
+	int ninlets;
+	int noutlets;
+	t_class *bfclass;
+	string name;
+	Ruby rself;
+};
+extern std::map<string,FClass2 *> fclasses;
+
 #endif // __GF_GRID_H



More information about the Gridflow-cvs mailing list