void inquisitor_get(t_inquisitor *x, t_symbol *name) { if(!x->subject){ t_object* b = jpatcher_get_firstobject(x->patcher); while(b){ if(x->name == jbox_get_varname(b)){ x->subject = jbox_get_object(b); break; } b = jbox_get_nextobject(b); } } if(x->subject && !NOGOOD(x->subject)){ t_atom* av = NULL; long ac = 0; t_max_err err; err = object_attr_getvalueof(x->subject, name, &ac, &av); if(!err && ac && av){ for(long i=0; i<ac; i++){ if(atom_gettype(av+i) != A_LONG && atom_gettype(av+i) != A_FLOAT && atom_gettype(av+i) != A_SYM){ object_error((t_object*)x, "The type of data returned for this attribute value is not usable by tap.inquisitor: %s", name->s_name); err = MAX_ERR_GENERIC; break; } } if(!err) outlet_anything(x->outlet, name, ac, av); } else{ object_error((t_object*)x, "problem getting attribute value for %s", name->s_name); } if(ac && av) sysmem_freeptr(av); } }
void hub_free(t_hub *x) { subscriberIterator i; subscriberList *subscriber = x->subscriber; t_atom a[2]; object_free(x->preset_interface); jamoma_hub_remove(x->osc_name); atom_setsym(a, x->attr_name); atom_setsym(a+1, x->osc_name); object_method_typed(g_jcom_send_notifications, gensym("module.removed"), 2, a, NULL); critical_enter(0); for(i = subscriber->begin(); i != subscriber->end(); ++i) { // notify the subscriber that the hub is going away if(!NOGOOD((*i)->object)) object_method((*i)->object, jps_release); sysmem_freeptr(*i); } critical_exit(0); object_free(x->textEditor); if(x->textSize) free(x->text); hub_internals_destroy(x); hub_presets_clear(x, NULL, 0, NULL); qelem_free(x->init_qelem); if(x->jcom_send) object_free(x->jcom_send); if(x->jcom_receive) object_free(x->jcom_receive); x->subscriber->clear(); delete x->subscriber; delete x->preset; }
void testterminate_free(t_testterminate *x) { // Notify the test harness that we are done so it can start another test if desired if (x->x_test && !NOGOOD(x->x_test)) object_method(x->x_test, gensym("terminate")); }
void receive_bind(t_receive *x) { if (!NOGOOD(g_receivemaster_object)) object_method(g_receivemaster_object, jps_add, x->attr_name, x); }