void data_address(TTPtr self, t_symbol *address) { WrappedModularInstancePtr x = (WrappedModularInstancePtr)self; // Avoid succession of address changes if (!EXTRA->changingAddress) { EXTRA->changingAddress = YES; // filter repetitions if (!(x->arrayAddress == TTAddress(address->s_name))) { if (!x->iterateInternals) { // unregister internals wrappedModularClass_unregister(x); x->arraySize = 0; // rebuild internals defer(self,(method)data_new_address, address, 0, NULL); // for array mode : output the array once afterward if (x->arrayAttrFormat == gensym("array")) { TTValue array; t_symbol *msg; long argc = 0; t_atom *argv = NULL; TTBoolean shifted = NO; data_edit_array(self, array); jamoma_ttvalue_to_typed_Atom(array, &msg, &argc, &argv, shifted); // avoid blank before data if (msg == _sym_nothing) outlet_atoms(x->outlets[data_out], argc, argv); else outlet_anything(x->outlets[data_out], msg, argc, argv); if (shifted) argv--; sysmem_freeptr(argv); } } } EXTRA->changingAddress = NO; return; } object_error((t_object*)x, "can't change to %s address. Please defer low", address->s_name); }
void data_address(TTPtr self, t_symbol *address) { WrappedModularInstancePtr x = (WrappedModularInstancePtr)self; long argc = 0; t_atom *argv = NULL; // unregister wrapped object (or internals) wrappedModularClass_unregister(x); // use stored arguments jamoma_ttvalue_to_Atom(*(EXTRA->arrayArgs), &argc, &argv); // rebuild wrapped object (or internals) defer_low(self,(method)data_new_address, address, argc, argv); }
void wrappedModularClass_free(WrappedModularInstancePtr x) { ModularSpec* spec = (ModularSpec*)x->wrappedClassDefinition->specificities; // call specific free method before freeing internal stuff if (spec && spec->_free) spec->_free(x); wrappedModularClass_unregister(x); if (x->argv) sysmem_freeptr(x->argv); x->argv = NULL; delete x->internals; x->internals = NULL; }