32 void *
send_new(t_symbol *s,
long argc, t_atom *argv);
51 t_max_err send_setaddress(
t_send *x,
void *attr, AtomCount argc, AtomPtr argv);
52 t_max_err send_getaddress(
t_send *x,
void *attr, AtomCount *argc, AtomPtr *argv);
54 t_max_err send_setattribute(
t_send *x,
void *attr, AtomCount argc, AtomPtr argv);
55 t_max_err send_getattribute(
t_send *x,
void *attr, AtomCount *argc, AtomPtr *argv);
86 static t_class *s_send_class;
98 c = class_new(
"j.send",
107 class_addmethod(c, (method)
send_bang,
"bang", 0L);
108 class_addmethod(c, (method)
send_int,
"int", A_LONG, 0L);
109 class_addmethod(c, (method)
send_float,
"float", A_FLOAT, 0L);
110 class_addmethod(c, (method)
send_list,
"list", A_GIMME, 0L);
111 class_addmethod(c, (method)
send_list,
"anything", A_GIMME, 0L);
112 class_addmethod(c, (method)
send_assist,
"assist", A_CANT, 0L);
113 class_addmethod(c, (method)object_obex_dumpout,
"dumpout", A_CANT,0);
116 attr = attr_offset_new(
"address", _sym_symbol, 0,
117 (method)send_getaddress, (method)send_setaddress, NULL);
118 class_addattr(c, attr);
121 attr = attr_offset_new(
"attribute", _sym_symbol, 0,
122 (method)send_getattribute, (method)send_setattribute, NULL);
123 class_addattr(c, attr);
126 class_register(CLASS_BOX, c);
135 void *
send_new(t_symbol *s,
long argc, t_atom *argv)
137 long attrstart = attr_args_offset(argc, argv);
141 object_obex_store((
void *)x, _sym_dumpout, (
object *)outlet_new(x, NULL));
143 attr_args_process(x, argc, argv);
155 TTObjectRelease(TTObjectHandle(&x->
sender));
166 strcpy(dst,
"input to dispatch to j.receive objects");
168 strcpy(dst,
"dumpout");
172 t_max_err send_setaddress(
t_send *x,
void *attr, AtomCount argc, AtomPtr argv)
176 if (atom_gettype(argv) == A_SYM) {
178 v.
append(
TT(atom_getsym(argv)->s_name));
183 return MAX_ERR_GENERIC;
188 t_max_err send_getaddress(
t_send *x,
void *attr, AtomCount *argc, AtomPtr *argv)
196 *argv = (t_atom *)sysmem_newptr(
sizeof(t_atom));
201 atom_setsym(*argv, gensym((
char*)s.
c_str()));
204 return MAX_ERR_GENERIC;
210 t_max_err send_setattribute(
t_send *x,
void *attr, AtomCount argc, AtomPtr argv)
214 if (atom_gettype(argv) == A_SYM) {
216 v.
append(
TT(atom_getsym(argv)->s_name));
221 return MAX_ERR_GENERIC;
226 t_max_err send_getattribute(
t_send *x,
void *attr, AtomCount *argc, AtomPtr *argv)
234 *argv = (t_atom *)sysmem_newptr(
sizeof(t_atom));
239 atom_setsym(*argv, gensym((
char*)s.
c_str()));
242 return MAX_ERR_GENERIC;
256 atom_setlong(&a, value);
265 atom_setfloat(&a, value);
275 if (msg->s_name[0] == C_SEPARATOR)
void * send_new(t_symbol *s, long argc, t_atom *argv)
Called at object instantiation.
void send_list(t_send *x, t_symbol *msg, long argc, t_atom *argv)
Forward a list or message to the associated receive objects.
TTErr getAttributeValue(const TTSymbol name, TTValue &value)
Get an attribute value for an object.
TTErr setAttributeValue(const TTSymbol name, TTValue &value)
Set an attribute value for an object.
void send_int(t_send *x, long value)
Forward an int to the associated receive objects.
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
void append(const T &anElementValueToAppend)
Insert a single TTElement at the end.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
void get(const TTUInt16 index, T &returnedElementValue) const
DEPRECATED.
void send_bang(t_send *x)
Forward a bang to the associated receive objects.
const char * c_str() const
Return a pointer to the internal string as a C-string.
void send_assist(t_send *x, void *b, long msg, long arg, char *dst)
Method for displaying assist strings for inlets and outlets.
void send_free(t_send *x)
Free up and dispose of the object.
TTSenderPtr sender
the TTObject class to send data
t_object ob
REQUIRED: Our object.
[doxygenAppendixC_copyExample]
void send_float(t_send *x, double value)
Forward a float to the associated receive objects.