[Gridflow-cvs] [svn] commit: r6540 - in /trunk/src: classes1.cxx classes2.cxx classes3.cxx source_filter.rb

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sat Feb 5 12:20:59 EST 2011


Author: matju
Date: Sat Feb  5 12:20:58 2011
New Revision: 6540

Log:
"FObject" is the default superclass (for every class except FObject)

Modified:
    trunk/src/classes1.cxx
    trunk/src/classes2.cxx
    trunk/src/classes3.cxx
    trunk/src/source_filter.rb

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Sat Feb  5 12:20:58 2011
@@ -62,7 +62,7 @@
 //static CONSTRAINT(expect_exactly_one_dim) {if (d.n!=1) RAISE("expecting Dim[n], got %s",d.to_s());}
 
 //****************************************************************
-\class GridCast : FObject {
+\class GridCast {
 	\attr NumberTypeE cast;
 	\constructor (NumberTypeE nt=int32_e) {this->cast = nt;}
 	\grin 0
@@ -79,7 +79,7 @@
 GridHandler *stromgol; // remove this asap
 //{ ?,Dim[B] -> Dim[*Cs] }
 // out0 nt to be specified explicitly
-\class GridImport : FObject {
+\class GridImport {
 	\attr NumberTypeE cast;
 	/*\attr*/ Dim dim; // size of grids to send
 	\attr bool per_message;
@@ -154,7 +154,7 @@
 //****************************************************************
 /*{ Dim[*As] -> ? }*/
 /* in0: integer nt */
-\class GridToFloat : FObject {
+\class GridToFloat {
 	\constructor () {}
 	\grin 0
 };
@@ -164,7 +164,7 @@
 } GRID_END
 \end class {install("#to_float",1,1); add_creator("#to_f"); add_creator("#export"); add_creator("@export");}
 
-\class GridToSymbol : FObject {
+\class GridToSymbol {
 	\constructor () {}
 	\grin 0
 };
@@ -180,7 +180,7 @@
 
 /*{ Dim[*As] -> ? }*/
 /* in0: integer nt */
-\class GridToList : FObject {
+\class GridToList {
 	\constructor () {}
 	int n;
 	\grin 0
@@ -198,7 +198,7 @@
 \end class {install("#to_list",1,1); add_creator("#to_l"); add_creator("#export_list"); add_creator("@export_list");}
 
 /* **************************************************************** */
-\class GridPrint : FObject {
+\class GridPrint {
 	\attr t_symbol *name;
 	\attr int maxrows;
 	\constructor (t_symbol *name=0) {
@@ -344,7 +344,7 @@
 // in0: integer nt
 // in1: whatever nt
 // out0: same nt as in1
-\class GridStore : FObject {
+\class GridStore {
 	P<Grid> r; // can't be \attr (why ?)
 	P<Grid> put_at; // can't be //\attr (why ?)
 	\attr Numop2 *op;
@@ -531,7 +531,7 @@
 //****************************************************************
 //{ Dim[*As]<T> -> Dim[*As]<T> } or
 //{ Dim[*As]<T>,Dim[*Bs]<T> -> Dim[*As]<T> }
-\class GridOp : FObject {
+\class GridOp {
 	\attr Numop *op;
 	P<Grid> r;
 	\constructor (Numop *op=0, Grid *r=0) {
@@ -588,7 +588,7 @@
 \end class {install("#",2,1); add_creator("@");}
 
 //****************************************************************
-\class GridFold : FObject {
+\class GridFold {
 	\attr Numop2 *op;
 	\attr P<Grid> seed;
 	\constructor (Numop2 *op) {this->op=op;}
@@ -637,7 +637,7 @@
 
 \end class {install("#fold",1,1);}
 
-\class GridScan : FObject {
+\class GridScan {
 	\attr Numop2 *op;
 	\attr P<Grid> seed;
 	\constructor (Numop2 *op) {this->op = op;}
@@ -680,7 +680,7 @@
 // Seed   is a Dim[           *ss]<T>
 // result is a Dim[*si,   *sk,*ss]<T>
 // Currently *ss can only be = Dim[]
-\class GridInner : FObject {
+\class GridInner {
 	\attr Numop2 *op;
 	\attr Numop2 *fold;
 	\attr P<Grid> seed;
@@ -802,7 +802,7 @@
 
 /* **************************************************************** */
 /*{ Dim[*As]<T>,Dim[*Bs]<T> -> Dim[*As,*Bs]<T> }*/
-\class GridOuter : FObject {
+\class GridOuter {
 	\attr Numop2 *op;
 	P<Grid> r;
 	\constructor (Numop2 *op, Grid *r=0) {
@@ -861,7 +861,7 @@
 //****************************************************************
 //{ Dim[]<T>,Dim[]<T>,Dim[]<T> -> Dim[A]<T> } or
 //{ Dim[B]<T>,Dim[B]<T>,Dim[B]<T> -> Dim[*As,B]<T> }
-\class GridFor : FObject {
+\class GridFor {
 	\attr P<Grid> from;
 	\attr P<Grid> to  ;
 	\attr P<Grid> step;
@@ -930,13 +930,13 @@
 \end class {install("#for",3,1); add_creator("@for");}
 
 //****************************************************************
-\class GridFinished : FObject {
+\class GridFinished {
 	\constructor () {}
 	\grin 0
 };
 GRID_INLET(0) {} GRID_FINISH {out[0]();} GRID_END
 \end class {install("#finished",1,1); add_creator("@finished");}
-\class GridDim : FObject {
+\class GridDim {
 	\constructor () {}
 	\grin 0
 };
@@ -945,7 +945,7 @@
 	go.send(in.dim.n,in.dim.v);
 } GRID_END
 \end class {install("#dim",1,1); add_creator("@dim");}
-\class GridType : FObject {
+\class GridType {
 	\attr bool abbr;
 	\constructor () {}
 	\grin 0
@@ -958,7 +958,7 @@
 
 //****************************************************************
 //{ Dim[*As]<T>,Dim[B] -> Dim[*Cs]<T> }
-\class GridRedim : FObject {
+\class GridRedim {
 	/*\attr*/ Dim dim;
 	P<Grid> dim_grid;
 	P<Grid> temp; // temp->dim is not of the same shape as dim

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Sat Feb  5 12:20:58 2011
@@ -391,7 +391,7 @@
 
 struct ParallelPort;
 void ParallelPort_call(ParallelPort *self);
-\class ParallelPort : FObject {
+\class ParallelPort {
 	FILE *f;
 	int fd;
 	int status;
@@ -445,7 +445,7 @@
 	sels.resize(argc); for (int i=0; i<argc; i++) sels[i]=argv[i];
 }
 
-\class Route2 : FObject {
+\class Route2 {
 	vector<t_symbol *> sels;
 	\constructor (...) {_1_list(argc,argv); noutlets_set(1+argc);}
 	\decl void anything(...) {
@@ -457,7 +457,7 @@
 };
 \end class {install("route2",1,1);}
 
-\class Route3 : FObject {
+\class Route3 {
 	vector<t_symbol *> sels;
 	\constructor (...) {_1_list(argc,argv); noutlets_set(1+argc);}
 	\decl void anything(...) {
@@ -472,7 +472,7 @@
 
 template <class T> int sgn(T a, T b=0) {return a<b?-1:a>b;}
 
-\class Shunt : FObject {
+\class Shunt {
 	int n;
 	\attr int index;
 	\attr int mode;
@@ -500,7 +500,7 @@
 };
 t_class *ReceivesProxy_class;
 
-\class Receives : FObject {
+\class Receives {
 	vector<ReceivesProxy> rp;
 	t_symbol *prefix;
 	t_symbol *local (t_symbol *suffix) {return symprintf("%s%s",prefix->s_name,suffix->s_name);}
@@ -538,13 +538,13 @@
 }
 
 /* this can't report on bang,float,symbol,pointer,blob,list because zgetfn can't either */
-\class ClassExists : FObject {
+\class ClassExists {
 	\constructor () {}
 	\decl 0 symbol(t_symbol *s) {out[0](!!zgetfn(&pd_objectmaker,s));}
 };
 \end class {install("class_exists",1,1);}
 
-\class ListEqual : FObject {
+\class ListEqual {
 	vector<t_atom2> list;
 	\constructor (...) { _1_list(argc,argv);}
 	\decl 1 list (...) {list.resize(argc); for (int i=0; i<argc; i++) list[i]=argv[i];}
@@ -578,21 +578,21 @@
 uint64 cpu_hertz;
 int uint64_compare(uint64 &a, uint64 &b) {return a<b?-1:a>b;}
 
-\class UserTime : FObject {
+\class UserTime {
 	clock_t time;
 	\constructor () {_0_bang();}
 	\decl 0 bang () {NOWIN; struct tms t; times(&t); time = t.tms_utime;}
 	\decl 1 bang () {NOWIN; struct tms t; times(&t); out[0]((t.tms_utime-time)*1000/HZ);}
 };
 \end class {install("usertime",2,1);}
-\class SystemTime : FObject {
+\class SystemTime {
 	clock_t time;
 	\constructor () {_0_bang();}
 	\decl 0 bang () {NOWIN; struct tms t; times(&t); time = t.tms_stime;}
 	\decl 1 bang () {NOWIN; struct tms t; times(&t); out[0]((t.tms_stime-time)*1000/HZ);}
 };
 \end class {install("systemtime",2,1);}
-\class TSCTime : FObject {
+\class TSCTime {
 	uint64 time;
 	\constructor () {_0_bang();}
 	\decl 0 bang () {time=rdtsc();}
@@ -612,7 +612,7 @@
 	cpu_hertz = estimates[1];
 }
 
-\class GFError : FObject {
+\class GFError {
 	string format;
 	\constructor (...) {format = join(argc,argv);}
 	\decl 0 list (...) {err(0,argc,argv);}
@@ -638,7 +638,7 @@
 };
 \end class {install("gf/error",1,0);}
 
-\class GFSprintf : FObject {
+\class GFSprintf {
 	string format;
 	\constructor (...) {format = join(argc,argv);}
 	\decl 1 list (...) {format = join(argc,argv);}
@@ -648,7 +648,7 @@
 	}
 };
 \end class {install("gf/sprintf",2,1);}
-\class GridSprintf : FObject {
+\class GridSprintf {
 	string format;
 	\attr NumberTypeE cast;
 	\constructor (...) {format = join(argc,argv); cast = int32_e;}
@@ -660,7 +660,7 @@
 };
 \end class {install("#sprintf",2,1);}
 
-\class ForEach : FObject {
+\class ForEach {
 	\constructor () {}
 	\decl 0 list (...) {for (int i=0; i<argc; i++) out[0](argv[i]);}
 };
@@ -670,25 +670,25 @@
 
 #define MOM t_canvas *m = mom; for (int i=0; i<n; i++) {m=m->gl_owner; if (!m) RAISE("no such canvas");}
 
-\class GFCanvasFileName : FObject {
+\class GFCanvasFileName {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 bang () {MOM; out[0](m->gl_name ? m->gl_name : gensym("empty"));}
 };
 \end class {install("gf/canvas_filename",1,1);}
-\class GFCanvasDollarZero : FObject {
+\class GFCanvasDollarZero {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 bang () {MOM; out[0](canvas_getenv(m)->ce_dollarzero);}
 };
 \end class {install("gf/canvas_dollarzero",1,1);}
-\class GFCanvasGetPos : FObject {
+\class GFCanvasGetPos {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 bang () {MOM; t_atom2 a[2] = {m->gl_obj.te_xpix, m->gl_obj.te_ypix}; out[0](2,a);}
 };
 \end class {install("gf/canvas_getpos",1,1);}
-\class GFCanvasSetPos : FObject {
+\class GFCanvasSetPos {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 list (...) {MOM;
@@ -703,13 +703,13 @@
 	}
 };
 \end class {install("gf/canvas_setpos",1,0);}
-\class GFCanvasEditMode : FObject {
+\class GFCanvasEditMode {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 bang () {MOM; out[0](int(m->gl_edit));}
 };
 \end class {install("gf/canvas_edit_mode",1,1);}
-\class GFCanvasIsSelected : FObject {
+\class GFCanvasIsSelected {
 	/* contributed by "rumence" of Slovakia, on IRC */
 	/* bugfix by matju */
 	int n;
@@ -721,13 +721,13 @@
 };
 \end class {install("gf/canvas_isselected",1,1);}
 extern "C" void canvas_setgraph(t_glist *x, int flag, int nogoprect);
-\class GFCanvasSetGOP : FObject {
+\class GFCanvasSetGOP {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 float (float gop) {MOM; canvas_setgraph(m,int(gop),0);}
 };
 \end class {install("gf/canvas_setgop",1,0);}
-\class GFCanvasXID : FObject {
+\class GFCanvasXID {
 	int n;
 	t_symbol *name;
 	\constructor (int n_=0) {
@@ -745,7 +745,7 @@
 };
 \end class {install("gf/canvas_xid",1,3);}
 
-\class GFCanvasHeHeHe : FObject {
+\class GFCanvasHeHeHe {
 	int n;
 	\constructor (int n) {this->n=n;}
 	\decl 0 float (float y) {MOM;
@@ -762,7 +762,7 @@
 
 #define DASHRECT "-outline #80d4b2 -dash {2 6 2 6}"
 
-\class GFCanvasHoHoHo : FObject {
+\class GFCanvasHoHoHo {
 	int n;
 	t_canvas *last;
 	\constructor (int n) {this->n=n; last=0;}
@@ -777,13 +777,13 @@
 \end class {install("gf/canvas_hohoho",1,0);}
 
 #define canvas_each(y,x) for (t_gobj *y=x->gl_list; y; y=y->g_next)
-\class GFCanvasCount : FObject {
+\class GFCanvasCount {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 bang () {MOM; int k=0; canvas_each(y,m) k++; out[0](k);}
 };
 \end class {install("gf/canvas_count",1,1);}
-\class GFCanvasIndex : FObject {
+\class GFCanvasIndex {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 bang () {
@@ -797,7 +797,7 @@
 };
 \end class {install("gf/canvas_index",1,1);}
 
-\class GFCanvasLoadbang : FObject {
+\class GFCanvasLoadbang {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 float (float z) {MOM;
@@ -810,7 +810,7 @@
 };
 \end class {install("gf/canvas_loadbang",1,0);};
 
-\class GFCanvasSend : FObject {
+\class GFCanvasSend {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl void anything (...) {MOM; typedmess((t_pd *)m,argv[1],argc-2,argv+2);}
@@ -825,7 +825,7 @@
 
 #define wire_each(wire,ouchlet) for (t_outconnect *wire = ouchlet->connections; wire; wire=wire->next)
 
-\class GFLOL : FObject {
+\class GFLOL {
 	int n;
 	\constructor (int n) {this->n=n;}
 	\decl 0 wire_dotted  (int r, int g, int b) {BEGIN
@@ -957,7 +957,7 @@
 static bool canvas_contains  (t_canvas *x, t_gobj *y) {return canvas_find_index(x,y)>=0;}
 
 t_widgetbehavior *class_getwidget (t_class *x) {return (t_widgetbehavior *)((long *)x)[properties_offset-3];}
-\class GFObjectBBox : FObject {
+\class GFObjectBBox {
 	\constructor () {}
 	void look_at (t_gobj *o) {
 		t_widgetbehavior *wb = class_getwidget(pd_class((t_pd *)o));
@@ -992,7 +992,7 @@
 	return victim;
 }
 
-\class GFStringReplace : FObject {
+\class GFStringReplace {
 	t_symbol *from;
 	t_symbol *to;
 	\constructor (t_symbol *from=&s_, t_symbol *to=&s_) {this->from=from; this->to=to;}
@@ -1003,7 +1003,7 @@
 };
 \end class {install("gf/string_replace",1,1);}
 
-\class GFStringLessThan : FObject {
+\class GFStringLessThan {
 	t_symbol *than;
 	\constructor (t_symbol *than=&s_) {this->than=than;}
 	\decl 0 symbol (t_symbol *it) {out[0](strcmp(it->s_name,than->s_name)<0);}
@@ -1011,13 +1011,13 @@
 };
 \end class {install("gf/string_<",2,1); class_sethelpsymbol(fclass->bfclass,gensym("gf/string_0x3c"));}
 
-\class GFStringLength : FObject {
+\class GFStringLength {
 	\constructor () {}
 	\decl 0 symbol (t_symbol *it) {out[0](strlen(it->s_name));}
 };
 \end class {install("gf/string_length",1,1);}
 
-\class GFGetPid : FObject {
+\class GFGetPid {
 	static t_symbol *sym;
 	\constructor () {}
 	\decl 0 bang () {
@@ -1030,7 +1030,7 @@
 	}
 };
 \end class {install("gf/getpid",1,2);}
-\class GFGetCwd : FObject {
+\class GFGetCwd {
 	static t_symbol *sym;
 	\constructor () {}
 	\decl 0 bang () {
@@ -1041,13 +1041,13 @@
 };
 \end class {install("gf/getcwd",1,1);}
 
-\class GFSelector : FObject {
+\class GFSelector {
 	\constructor () {}
 	\decl void anything (...) {out[0](argv[1]);}
 };
 \end class {install("gf/selector",1,1);}
 
-\class FindFile : FObject {
+\class FindFile {
 	int n;
 	\constructor (int n=0) {this->n=n;}
 	\decl 0 symbol (t_symbol *s) {MOM
@@ -1074,7 +1074,7 @@
 };
 \end class {install("gf/find_file",1,2);}
 
-\class GFL2S : FObject {
+\class GFL2S {
 	t_symbol *sep;
 	\constructor (t_symbol *sep=0) {this->sep=sep?sep:gensym(" ");}
 	\decl 0 list (...) {out[0](gensym(join(argc,argv,sep->s_name).data()));}
@@ -1082,7 +1082,7 @@
 };
 \end class {install("gf/l2s",2,1);}
 
-\class GFS2L : FObject {
+\class GFS2L {
 	t_symbol *sep;
 	\constructor (t_symbol *sep=0) {this->sep=sep?sep:gensym(" ");}
 	\decl 0 symbol (t_symbol *s) {
@@ -1101,13 +1101,13 @@
 };
 \end class {install("gf/s2l",2,1);}
 
-\class GFSysGui : FObject {
+\class GFSysGui {
 	\constructor () {}
 	\decl 0 list (...) {sys_gui(join(argc,argv," ","\n").data());}
 };
 \end class {install("gf/sys_gui",1,0);}
 
-\class GFWrap : FObject {
+\class GFWrap {
 	float b;
 	\constructor (float f=1) {b=f;}
 	\decl 1 float (float f)  {b=f;}
@@ -1116,13 +1116,13 @@
 \end class {install("gf/wrap",2,1);}
 
 /* hack because hexloader is a myth */
-\class InvPlus : FObject {
+\class InvPlus {
 	float b;
 	\constructor (float b=1) {this->b=b;}
 	\decl 0 float (float a) {out[0](b-a);}
 	\decl 1 float (float b) {this->b=b;}};
 \end class {install("inv+",2,1); class_sethelpsymbol(fclass->bfclass,gensym("inv0x2b"));}
-\class InvTimes : FObject {
+\class InvTimes {
 	float b;
 	\constructor (float b=1) {this->b=b;}
 	\decl 0 float (float a) {out[0](b/a);}
@@ -1142,7 +1142,7 @@
 extern t_symbol *gridflow_folder;
 extern char *pd_version;
 
-\class GridFlowClass : FObject {
+\class GridFlowClass {
 	\constructor () {}
 	\decl 0 get (t_symbol *s=0) {
 		if (!s) {
@@ -1166,7 +1166,7 @@
 \end class {install("gridflow",1,1);}
 
 map<t_canvas *, map<t_gobj *, int> > propertybang_map;
-\class PropertyBang : FObject {
+\class PropertyBang {
 	\constructor () {propertybang_map[canvas_getabstop(mom)][(t_gobj *)bself]=1;}
 	~PropertyBang () {propertybang_map[canvas_getabstop(mom)].erase((t_gobj *)bself);}
 	void properties () {out[0]();}
@@ -1187,7 +1187,7 @@
 	class_setpropertiesfn(canvas_class,canvas_properties2); // phoque
 }
 
-\class GFClassInfo : FObject {
+\class GFClassInfo {
 	\constructor () {}
 	\decl 0 symbol (t_symbol *s) {
 		if (fclasses.find(s)==fclasses.end()) {out[0](); return;}

Modified: trunk/src/classes3.cxx
==============================================================================
--- trunk/src/classes3.cxx (original)
+++ trunk/src/classes3.cxx Sat Feb  5 12:20:58 2011
@@ -31,7 +31,7 @@
 template <class T> T *DUP(T *m, size_t n) {T *r = (T *)malloc(sizeof(T)*n); memcpy(r,m,sizeof(T)*n); return r;}
 
 //****************************************************************
-\class GridToTilde : FObject {
+\class GridToTilde {
 	P<Grid> blah;
 	t_outlet **sigout;
 	int chans; /* number of channels */
@@ -86,7 +86,7 @@
 	class_addmethod(fclass->bfclass,(t_method)GridToTilde::dsp_,gensym("dsp"),A_CANT,0);
 }
 //****************************************************************
-\class GridFromTilde : FObject {
+\class GridFromTilde {
 	P<Grid> blah;
 	t_inlet **sigin;
 	int chans; /* number of channels */
@@ -127,7 +127,7 @@
 }
 
 //****************************************************************
-\class GridJoin : FObject {
+\class GridJoin {
 	\attr int which_dim;
 	P<Grid> r;
 	\grin 0
@@ -194,7 +194,7 @@
 \end class {install("#join",2,1); add_creator("@join");}
 
 //****************************************************************
-\class GridGrade : FObject {
+\class GridGrade {
 	\constructor () {}
 	\grin 0
 };
@@ -233,7 +233,7 @@
 //\class GridMedian : FObject
 //****************************************************************
 
-\class GridTranspose : FObject {
+\class GridTranspose {
 	\attr int dim1;
 	\attr int dim2;
 	int d1,d2,na,nb,nc,nd; // temporaries
@@ -285,7 +285,7 @@
 \end class {install("#transpose",3,1); add_creator("@transpose");}
 
 //****************************************************************
-\class GridReverse : FObject {
+\class GridReverse {
 	\attr int dim1; // dimension to act upon
 	int d; // temporaries
 	\constructor (int dim1=0) {this->dim1 = dim1;}
@@ -312,7 +312,7 @@
 \end class {install("#reverse",2,1);}
 
 //****************************************************************
-\class GridCentroid : FObject {
+\class GridCentroid {
 	\constructor () {}
 	\grin 0 int
 	int sumx,sumy,sum,y; // temporaries
@@ -350,7 +350,7 @@
 //****************************************************************
 static CONSTRAINT(expect_pair) {if (d.prod()!=2) RAISE("expecting only two numbers. Dim(2)");}
 
-\class GridMoment : FObject {
+\class GridMoment {
 	\constructor (int order=1) {
 		offset.but(expect_pair);
 		t_atom2 a[2] = {t_atom2(0),t_atom2(0)};
@@ -425,7 +425,7 @@
 \end class {install("#moment",2,1);}
 
 //****************************************************************
-\class GridLabelling : FObject {
+\class GridLabelling {
 	\grin 0
 	\attr int form();
 	\attr int form_val;
@@ -508,7 +508,7 @@
 \end class {install("#labelling",1,0); add_creator("#labeling");}
 
 //****************************************************************
-\class GridPerspective : FObject {
+\class GridPerspective {
 	\attr int32 z;
 	\grin 0
 	\constructor (int32 z=256) {this->z=z;}
@@ -531,7 +531,7 @@
 \end class {install("#perspective",1,1); add_creator("@perspective");}
 
 //****************************************************************
-\class GridBorder : FObject {
+\class GridBorder {
 	/*\attr */ Dim diml;
 	/*\attr */ Dim dimr;
 	P<Grid> diml_grid;
@@ -591,7 +591,7 @@
 }
 
 
-\class GridConvolve : FObject {
+\class GridConvolve {
 	// entry in a compiled convolution kernel
 	struct  PlanEntry {long y; long x; bool neutral;
 		PlanEntry (long y, long x, bool neutral) : y(y), x(x), neutral(neutral) {}
@@ -717,7 +717,7 @@
 	if (d.prod()!=1 && d.prod()!=2) RAISE("expecting only one or two numbers");
 }
 
-\class GridScaleBy : FObject {
+\class GridScaleBy {
 	\attr P<Grid> scale; // integer scale factor
 	int scaley;
 	int scalex;
@@ -767,7 +767,7 @@
 
 // ----------------------------------------------------------------
 //{ Dim[A,B,3]<T> -> Dim[C,D,3]<T> }
-\class GridDownscaleBy : FObject {
+\class GridDownscaleBy {
 	\attr P<Grid> scale;
 	\attr bool smoothly;
 	int scaley;
@@ -853,7 +853,7 @@
 \end class {install("#downscale_by",2,1); add_creator("@downscale_by");}
 
 //****************************************************************
-\class GridLayer : FObject {
+\class GridLayer {
 	P<Grid> r;
 	\constructor () {r.but(expect_rgb_picture); r=new Grid(Dim(1,1,3),int32_e,true);}
 	\grin 0 int
@@ -908,7 +908,7 @@
 	if (s==gensym("odd"))  return OMIT_ODD;
 	RAISE("unknown OmitMode '%s' (want none or last or odd)",s->s_name);
 }
-\class DrawPolygon : FObject {
+\class DrawPolygon {
 	\attr Numop2 *op;
 	\attr P<Grid> color;
 	\attr P<Grid> polygon;
@@ -1049,7 +1049,7 @@
 	if (d[0]!=2) RAISE("position dim 0 should have 2 elements, not %d", d[0]);
 }
 
-\class DrawImage : FObject {
+\class DrawImage {
 	\attr Numop2 *op;
 	\attr P<Grid> image;
 	\attr P<Grid> position;
@@ -1154,7 +1154,7 @@
 // Dim[*A],Dim[*B],Dim[C,size(A)-size(B)] -> Dim[*A]
 
 /* NOT FINISHED */
-\class GridDrawPoints : FObject {
+\class GridDrawPoints {
 	\attr Numop2 *op;
 	\attr P<Grid> color;
 	\attr P<Grid> points;
@@ -1193,7 +1193,7 @@
 \end class {install("#draw_points",3,1);}
 
 //****************************************************************
-\class GridNoiseGateYuvs : FObject {
+\class GridNoiseGateYuvs {
 	\grin 0
 	int thresh;
 	\decl 1 float(int v) {thresh=v;}
@@ -1221,7 +1221,7 @@
 
 //****************************************************************
 
-\class GridPack : FObject {
+\class GridPack {
 	int n;
 	P<Grid> a;
 	\attr NumberTypeE cast;
@@ -1252,7 +1252,7 @@
 };
 \end class {install("#pack",1,1); add_creator("@pack");}
 
-\class GridUnpack : FObject {
+\class GridUnpack {
 	\constructor (int n=2) {
 		if (n<1) RAISE("n=%d must be at least 1",n);
 		if (n>32) RAISE("n=%d is too many?",n);
@@ -1270,7 +1270,7 @@
 
 //****************************************************************
 
-\class GridRotatificator : FObject {
+\class GridRotatificator {
 	int angle;
 	int from, to, n;
 	\attr NumberTypeE cast;
@@ -1300,7 +1300,7 @@
 	if (d.n<1) RAISE("expecting at least one dimension, got %s",d.to_s());}
 
 #define OP(x) dynamic_cast<Numop2 *>(op_dict[string(#x)])
-\class GridClusterAvg : FObject {
+\class GridClusterAvg {
 	\attr int numClusters;
 	\attr P<Grid> r;
 	\attr P<Grid> sums;
@@ -1351,7 +1351,7 @@
 //****************************************************************
 
 static Numop *op_os8;
-\class GridLopSpace : FObject {
+\class GridLopSpace {
 	\attr bool reverse;
 	\attr int which_dim;
 	\attr P<Grid> r;
@@ -1404,7 +1404,7 @@
 
 //****************************************************************
 
-\class GridTabread : FObject {
+\class GridTabread {
 	t_symbol *t;
 	\constructor (t_symbol *table=&s_) {
 		t = table;
@@ -1433,7 +1433,7 @@
 
 //****************************************************************
 
-\class GridTabwrite : FObject {
+\class GridTabwrite {
 	t_symbol *t;
 	P<Grid> r;
 	\constructor (t_symbol *table=&s_) {
@@ -1469,7 +1469,7 @@
 \end class {install("#tabwrite",2,0);}
 
 //****************************************************************
-\class GridCompress : FObject {
+\class GridCompress {
 	void *tmp;
 	P<Grid> r;
 	\constructor (Grid *r=0) {

Modified: trunk/src/source_filter.rb
==============================================================================
--- trunk/src/source_filter.rb (original)
+++ trunk/src/source_filter.rb Sat Feb  5 12:20:58 2011
@@ -56,7 +56,7 @@
 	raise "already in class #{where}" if $stack[-1] and ClassDecl===$stack[-1]
 	/^(\w+)(?:\s*[:<]\s*(\w+))?\s*(\{.*)?/.match line or raise "syntax error #{where}"
 	classname = $1
-	superclassname = $2
+	superclassname = $2; superclassname = "FObject" if not superclassname and classname!="FObject"
 	rest = $3
 	q=ClassDecl.new(classname,superclassname,{},{},{},false)
 	$stack << q



More information about the Gridflow-cvs mailing list