47 void receivemaster_dispatch(t_jcom_receivemaster *x, t_symbol *name, t_symbol *msg,
long argc, t_atom *argv);
69 static t_class *s_receivemaster_class = NULL;
70 static t_hashtab *s_receive_lists = NULL;
75 void receivemaster_initclass()
78 s_receivemaster_class = class_new(
"j.receivemaster",
81 sizeof(t_jcom_receivemaster),
88 class_addmethod(s_receivemaster_class, (method)
receivemaster_add,
"add", A_CANT, 0L);
92 class_register(CLASS_NOBOX, s_receivemaster_class);
97 t_jcom_receivemaster *x = (t_jcom_receivemaster *)object_alloc(s_receivemaster_class);
100 s_receive_lists = hashtab_new(0);
116 t_linklist *list = NULL;
118 hashtab_lookup(s_receive_lists, name, (t_object **)&list);
120 linklist_methodall(list, jps_dispatch, msg, argc, argv);
125 t_linklist *list = NULL;
127 hashtab_lookup(s_receive_lists, name, (t_object **)&list);
129 list = (t_linklist *)linklist_new();
130 hashtab_store(s_receive_lists, name, (t_object *)list);
132 linklist_append(list, obj);
158 t_linklist *list = NULL;
160 hashtab_lookup(s_receive_lists, name, (t_object **)&list);
161 linklist_chuckobject(list, obj);
162 if (!linklist_getsize(list))
163 hashtab_chuckkey(s_receive_lists, name);
void receivemaster_remove(t_jcom_receivemaster *x, t_symbol *name, t_object *obj)
Remove an object from the linked list of receiving objects associated with a certain name...
void receivemaster_add(t_jcom_receivemaster *x, t_symbol *name, t_object *obj)
Add an object to a linked list of receiving objects associated with a certain name.
void receivemaster_free(t_jcom_receivemaster *x)
Method called when the object is freed.
void * receivemaster_new(t_symbol *msg, long argc, t_atom *argv)
This method is called when a object is instantiated.
void receivemaster_dispatch(t_jcom_receivemaster *x, t_symbol *name, t_symbol *msg, long argc, t_atom *argv)
Send message to an object by remote communiction.