[Gridflow-cvs] [svn] commit: r5659 - in /trunk/src: gridflow.hxx source_filter.rb

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed May 12 14:32:15 EDT 2010


Author: matju
Date: Wed May 12 14:32:15 2010
New Revision: 5659

Log:
add GRINDECL

Modified:
    trunk/src/gridflow.hxx
    trunk/src/source_filter.rb

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Wed May 12 14:32:15 2010
@@ -709,6 +709,10 @@
 #define GRIN_float32(G) GRIN(0,0,0,0,G,0)
 #define GRIN_float64(G) GRIN(0,0,0,0,0,G)
 
+#define GRINDECL(I) \
+	template <class T>        void grin_##I  (GRIDHANDLER_ARGS(T)); \
+	template <class T> static void grinw_##I (GRIDHANDLER_ARGS(T)); \
+	static GridHandler grid_##I##_hand;
 
 // for use by source_filter.rb ONLY (for \decl \def \constructor)
 #define MESSAGE t_symbol *sel, int argc, t_atom2 *argv

Modified: trunk/src/source_filter.rb
==============================================================================
--- trunk/src/source_filter.rb (original)
+++ trunk/src/source_filter.rb Wed May 12 14:32:15 2010
@@ -233,9 +233,7 @@
 	i = fields[0].to_i
 	c = $stack[-1].name
 	frame = $stack[-1]
-	Out.print "template <class T>        void grin_#{i}  (GRIDHANDLER_ARGS(T));"
-	Out.print "template <class T> static void grinw_#{i} (GRIDHANDLER_ARGS(T));"
-	Out.print "static GridHandler grid_#{i}_hand;"
+	Out.print "GRINDECL(#{i})"
 	handle_decl "#{i} grid(GridOutlet *foo);"
 	handle_decl "#{i} list(...);"
 	handle_decl "#{i} float(float f);"



More information about the Gridflow-cvs mailing list