Update of /cvsroot/pure-data/externals/PDContainer/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21883/src
Modified Files: h_deque.cpp h_map.cpp h_multimap.cpp h_multiset.cpp h_set.cpp h_vector.cpp Log Message: some minor changes
Index: h_multiset.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/PDContainer/src/h_multiset.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** h_multiset.cpp 25 Oct 2004 19:02:30 -0000 1.1.1.1 --- h_multiset.cpp 29 Oct 2004 11:56:14 -0000 1.2 *************** *** 21,25 **** t_object x_obj; t_canvas *x_canvas; ! t_outlet *out0; HMultiSet *hmultiset; } t_h_multiset; --- 21,25 ---- t_object x_obj; t_canvas *x_canvas; ! t_outlet *out0, *out1; HMultiSet *hmultiset; } t_h_multiset; *************** *** 72,75 **** --- 72,80 ---- }
+ static void h_multiset_getsize(t_h_multiset *x) + { + outlet_float(x->out1,x->hmultiset->getSize()); + } + static void h_multiset_help(t_h_multiset *x) { *************** *** 147,150 **** --- 152,156 ----
x->out0 = outlet_new(&x->x_obj, &s_float); + x->out1 = outlet_new(&x->x_obj, &s_float); x->x_canvas = canvas_getcurrent();
*************** *** 171,174 **** --- 177,182 ---- class_addmethod(h_multiset_class, (t_method)h_multiset_remove, gensym("remove"), A_GIMME , 0); + class_addmethod(h_multiset_class, (t_method)h_multiset_getsize, + gensym("getsize"), A_DEFFLOAT , 0); class_addmethod(h_multiset_class, (t_method)h_multiset_set_namespace, gensym("namespace"), A_DEFSYMBOL , 0);
Index: h_vector.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/PDContainer/src/h_vector.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** h_vector.cpp 25 Oct 2004 19:02:30 -0000 1.1.1.1 --- h_vector.cpp 29 Oct 2004 11:56:14 -0000 1.2 *************** *** 353,360 **** default: post("h_vector warning: only one argument for namespace is possible!"); - case 2: - x->hvector = new HVector(atom_getsymbol(argv)->s_name, - (int)atom_getfloat(argv+1)); - break; case 1: x->hvector = new HVector(atom_getsymbol(argv)->s_name); --- 353,356 ----
Index: h_map.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/PDContainer/src/h_map.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** h_map.cpp 25 Oct 2004 19:02:30 -0000 1.1.1.1 --- h_map.cpp 29 Oct 2004 11:56:14 -0000 1.2 *************** *** 22,26 **** t_object x_obj; t_canvas *x_canvas; ! t_outlet *out0, *out1; HMap *hmap; Element value; --- 22,26 ---- t_object x_obj; t_canvas *x_canvas; ! t_outlet *out0, *out1, *out2; HMap *hmap; Element value; *************** *** 142,146 ****
// if there was no Element found, put out a bang at the right outlet ! outlet_bang(x->out1); }
--- 142,146 ----
// if there was no Element found, put out a bang at the right outlet ! outlet_bang(x->out2); }
*************** *** 160,163 **** --- 160,168 ---- }
+ static void h_map_getsize(t_h_map *x) + { + outlet_float(x->out1,x->hmap->getSize()); + } + static void h_map_help(t_h_map *x) { *************** *** 243,247 ****
x->out0 = outlet_new(&x->x_obj, 0); ! x->out1 = outlet_new(&x->x_obj, &s_bang); x->x_canvas = canvas_getcurrent();
--- 248,253 ----
x->out0 = outlet_new(&x->x_obj, 0); ! x->out1 = outlet_new(&x->x_obj, &s_float); ! x->out2 = outlet_new(&x->x_obj, &s_bang); x->x_canvas = canvas_getcurrent();
*************** *** 273,276 **** --- 279,284 ---- class_addmethod(h_map_class, (t_method)h_map_remove, gensym("remove"), A_GIMME , 0); + class_addmethod(h_map_class, (t_method)h_map_getsize, + gensym("getsize"), A_DEFFLOAT , 0); class_addmethod(h_map_class, (t_method)h_map_set_namespace, gensym("namespace"), A_DEFSYMBOL , 0);
Index: h_multimap.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/PDContainer/src/h_multimap.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** h_multimap.cpp 25 Oct 2004 19:02:30 -0000 1.1.1.1 --- h_multimap.cpp 29 Oct 2004 11:56:14 -0000 1.2 *************** *** 165,168 **** --- 165,173 ---- }
+ static void h_multimap_getsize(t_h_multimap *x) + { + outlet_float(x->out2,x->hmultimap->getSize()); + } + static void h_multimap_help(t_h_multimap *x) { *************** *** 249,252 **** --- 254,258 ---- x->out0 = outlet_new(&x->x_obj, 0); x->out1 = outlet_new(&x->x_obj, &s_float); + x->out2 = outlet_new(&x->x_obj, &s_float); x->x_canvas = canvas_getcurrent();
*************** *** 277,280 **** --- 283,288 ---- class_addmethod(h_multimap_class, (t_method)h_multimap_remove, gensym("remove"), A_GIMME , 0); + class_addmethod(h_multimap_class, (t_method)h_multimap_getsize, + gensym("getsize"), A_DEFFLOAT , 0); class_addmethod(h_multimap_class, (t_method)h_multimap_set_namespace, gensym("namespace"), A_DEFSYMBOL , 0);
Index: h_set.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/PDContainer/src/h_set.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** h_set.cpp 25 Oct 2004 19:02:30 -0000 1.1.1.1 --- h_set.cpp 29 Oct 2004 11:56:14 -0000 1.2 *************** *** 21,25 **** t_object x_obj; t_canvas *x_canvas; ! t_outlet *out0; HSet *hset; } t_h_set; --- 21,25 ---- t_object x_obj; t_canvas *x_canvas; ! t_outlet *out0, *out1; HSet *hset; } t_h_set; *************** *** 72,75 **** --- 72,80 ---- }
+ static void h_set_getsize(t_h_set *x) + { + outlet_float(x->out1,x->hset->getSize()); + } + static void h_set_help(t_h_set *x) { *************** *** 147,150 **** --- 152,156 ----
x->out0 = outlet_new(&x->x_obj, &s_float); + x->out1 = outlet_new(&x->x_obj, &s_float); x->x_canvas = canvas_getcurrent();
*************** *** 171,174 **** --- 177,182 ---- class_addmethod(h_set_class, (t_method)h_set_remove, gensym("remove"), A_GIMME , 0); + class_addmethod(h_set_class, (t_method)h_set_getsize, + gensym("getsize"), A_DEFFLOAT , 0); class_addmethod(h_set_class, (t_method)h_set_set_namespace, gensym("namespace"), A_DEFSYMBOL , 0);
Index: h_deque.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/PDContainer/src/h_deque.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** h_deque.cpp 25 Oct 2004 19:02:30 -0000 1.1.1.1 --- h_deque.cpp 29 Oct 2004 11:56:14 -0000 1.2 *************** *** 434,441 **** default: post("h_deque warning: only one argument for namespace is possible!"); - case 2: - x->hdeque = new HDeque(atom_getsymbol(argv)->s_name, - (int)atom_getfloat(argv+1)); - break; case 1: x->hdeque = new HDeque(atom_getsymbol(argv)->s_name); --- 434,437 ----