Jamoma API  0.6.0.a19
PureData/source/j.namespace/j.namespace.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup implementationPdExternals
4  *
5  * @brief j.namespace - deal with the Jamoma Namespace
6  *
7  * @details
8  *
9  * @authors Théo de la Hogue, Trond Lossius, Antoine Villeret
10  *
11  * @copyright Copyright © 2010 Théo de la Hogue @n
12  * Copyright © 2015, Antoine Villeret@n
13  * This code is licensed under the terms of the "New BSD License" @n
14  * http://creativecommons.org/licenses/BSD/
15  */
16 
17 
19 
20 #define data_out 0
21 #define size_out 1
22 #define dump_out 2
23 
24 // Definitions
25 void WrapTTExplorerClass(WrappedClassPtr c);
26 void WrappedExplorerClass_new(TTPtr self, long argc, t_atom *argv);
27 void WrappedExplorerClass_free(TTPtr self);
28 
29 void nmspc_assist(TTPtr self, void *b, long m, long a, char *s);
30 
31 void nmspc_return_value(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
32 
33 void nmspc_return_selection(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
34 
35 void nmspc_bang(TTPtr self);
36 void nmspc_symbol(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
37 
38 void nmspc_subscribe(TTPtr self);
39 
40 void nmspc_return_model_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
41 
42 t_max_err nmspc_get_format(TTPtr self, TTPtr attr, long *ac, t_atom **av);
43 t_max_err nmspc_set_format(TTPtr self, TTPtr attr, long ac, t_atom *av);
44 
45 t_max_err nmspc_get_relative(TTPtr self, TTPtr attr, long *ac, t_atom **av);
46 t_max_err nmspc_set_relative(TTPtr self, TTPtr attr, long ac, t_atom *av);
47 
48 /*
49 void nmspc_add_max_namespace(TTPtr self);
50 long nmspc_myobject_iterator(TTPtr self, (t_object*) b);
51 */
52 
53 //t_symbol *nmspc_filter_underscore_instance(t_symbol *a);
54 
55 
56 extern "C" void JAMOMA_EXPORT_MAXOBJ setup_j0x2enamespace(void)
57 {
58  ModularSpec *spec = new ModularSpec;
59  spec->_wrap = &WrapTTExplorerClass;
60  spec->_new = &WrappedExplorerClass_new;
61  spec->_free = &WrappedExplorerClass_free;
62  spec->_any = NULL;
63 
64  return (void)wrapTTModularClassAsPdClass(kTTSym_Explorer, "j.namespace", NULL, spec);
65 }
66 
67 void WrapTTExplorerClass(WrappedClassPtr c)
68 {
69  // add methods
70  eclass_addmethod(c->pdClass, (method)nmspc_assist, "assist", A_CANT, 0);
71 
72  eclass_addmethod(c->pdClass, (method)nmspc_return_value, "return_value", A_CANT, 0);
73 
74  eclass_addmethod(c->pdClass, (method)nmspc_return_model_address,"return_model_address", A_CANT, 0);
75 
76  eclass_addmethod(c->pdClass, (method)nmspc_return_selection, "return_selection", A_CANT, 0);
77 
78  eclass_addmethod(c->pdClass, (method)nmspc_bang, "bang", A_NULL, 0);
79 
80  eclass_addmethod(c->pdClass, (method)nmspc_symbol, "anything", A_GIMME, 0);
81 
82  eclass_addmethod(c->pdClass, (method)nmspc_bang, "explore", A_NULL, 0); // overwrite explore message to use the bang method
83 
84  eclass_addmethod(c->pdClass, (method)NULL, "loadbang", A_NULL, 0); // overwrite explore message to use the bang method
85 
86  //eclass_addmethod(c->pdClass, (method)nmspc_add_max_namespace, "add_max_namespace", 0);
87 
88  // TODO restore those attributes
89  // CLASS_ATTR_ENUM(c->pdClass, "output", 0, "descendants children brothers attributes");
90 
91  // CLASS_ATTR_SYM(c->pdClass, "format", 0, WrappedModularInstance, msg); // use msg member to store format
92  CLASS_ATTR_ACCESSORS(c->pdClass, "format", nmspc_get_format, nmspc_set_format);
93  // CLASS_ATTR_ENUM(c->pdClass, "format", 0, "none umenu umenu_prefix jit.cellblock coll");
94 
95  CLASS_ATTR_LONG(c->pdClass, "relative", 0, WrappedModularInstance, index); // use index member to store relative
96  CLASS_ATTR_ACCESSORS(c->pdClass, "relative", nmspc_get_relative, nmspc_set_relative);
97  CLASS_ATTR_STYLE(c->pdClass, "relative", 0, "onoff");
98 }
99 
100 void WrappedExplorerClass_new(TTPtr self, long argc, t_atom *argv)
101 {
103  long attrstart = attr_args_offset(argc, argv); // support normal arguments
104  t_symbol* name;
105  TTAddress address;
106  TTValue v, args;
107 
108  // create the explorer
109  jamoma_explorer_create((t_object*)x, x->wrappedObject);
110 
111  // read first argument to know if the explorer handles a namespace
112  if (attrstart && argv) {
113 
114  if (atom_gettype(argv) == A_SYM) {
115 
116  name = atom_getsym(argv);
117  x->wrappedObject.set(kTTSym_namespace, TTSymbol(name->s_name));
118  }
119  else
120  pd_error((t_object*)x, "argument not expected");
121  }
122 
123  // Make two outlets
124  x->outlets = (TTHandle)sysmem_newptr(sizeof(TTPtr) * 2);
125  x->outlets[size_out] = outlet_new((t_object*)x, NULL);
126  x->outlets[data_out] = outlet_new((t_object*)x, NULL);
127 
128  x->msg = _sym_none;
129 
130  // handle attribute args
131  attr_args_process(x, argc, argv);
132 }
133 
134 void WrappedExplorerClass_free(TTPtr self)
135 {
137  x->wrappedObject.set(kTTSym_namespace, kTTSymEmpty);
138 }
139 
140 void nmspc_assist(TTPtr self, void *b, long msg, long arg, char *dst)
141 {
142  if (msg==1) // Inlet
143  strcpy(dst, "input");
144  else { // Outlets
145  switch(arg) {
146  case data_out:
147  strcpy(dst, "result of exploration");
148  break;
149  case size_out:
150  strcpy(dst, "size of the result (after the result)");
151  break;
152  case dump_out:
153  strcpy(dst, "dumpout");
154  break;
155  }
156  }
157 }
158 
159 void nmspc_subscribe(TTPtr self)
160 {
162  TTValue v;
163  TTAddress contextAddress = kTTAdrsEmpty;
164  TTAddress absoluteAddress, returnedAddress;
165  TTNodePtr returnedNode;
166  TTNodePtr returnedContextNode;
167  TTObject anObject, empty;
168 
169  jamoma_patcher_get_info(((t_eobj*)x)->o_canvas, &x->patcherPtr, x->patcherContext, x->patcherClass, x->patcherName);
170 
171  if (!jamoma_subscriber_create((t_eobj*)x, empty, kTTAdrsEmpty, x->subscriberObject, returnedAddress, &returnedNode, &returnedContextNode)) {
172 
173  // get the context address to make
174  // a receiver on the contextAddress/model:address attribute
175  x->subscriberObject.get("contextAddress", v);
176  contextAddress = v[0];
177  }
178 
179  // bind on the model:address attribute
180  if (contextAddress != kTTAdrsEmpty) {
181 
182  absoluteAddress = contextAddress.appendAddress(x->address);
183  x->wrappedObject.set(kTTSym_address, x->address);
184 
185  makeInternals_receiver(x, contextAddress, TTSymbol("/model:address"), gensym("return_model_address"), anObject, YES); // YES : we want to deferlow this method
186  }
187 
188  // while the context node is not registered : try to binds again :(
189  // (to -- this is not a good way todo. For binding we should make a subscription
190  // to a notification mechanism and each time an TTObjet subscribes to the namespace
191  // using jamoma_subscriber_create we notify all the externals which have used
192  // jamoma_subscriber_create with NULL object to bind)
193  else {
194 
195  // release the subscriber
196  x->subscriberObject = TTObject();
197 
198  // The following must be deferred because we have to interrogate our box,
199  // and our box is not yet valid until we have finished instantiating the object.
200  // Trying to use a loadbang method instead is also not fully successful (as of Max 5.0.6)
201  nmspc_subscribe(x);
202 // defer_low((t_object*)x, (method)nmspc_subscribe, NULL, 0, 0);
203  }
204 }
205 
206 void nmspc_return_model_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
207 {
209  TTAddress absoluteAddress;
210 
211  // the wrapped object is maybe destroyed
212  if (!x->wrappedObject.valid())
213  return;
214 
215  if (argc && argv) {
216 
217  // set address attribute of the wrapped Receiver object
218  absoluteAddress = TTAddress(atom_getsym(argv)->s_name).appendAddress(x->address);
219  x->wrappedObject.set(kTTSym_address, absoluteAddress);
220  x->wrappedObject.send("Explore");
221  }
222 }
223 
224 void nmspc_return_value(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
225 {
227  TTValue v;
228  TTSymbol output;
229  TTAddress address;
230  t_symbol *s;
231  TTInt32 i;
232  t_atom a[1], c[2], j[3];
233 
234  // the wrapped object is maybe destroyed
235  if (!x->wrappedObject.valid())
236  return;
237 
238  // Ask Explorer object
239  x->wrappedObject.get("output", v);
240  output = v[0];
241 
242  x->wrappedObject.get(kTTSym_address, v);
243  address = v[0];
244 
245  // UMENU OR UMENU_PREFIX FORMAT
246  if (x->msg == gensym("umenu") || x->msg == gensym("umenu_prefix")) {
247 
248  // clear menu
249  outlet_anything((t_outlet*)x->outlets[data_out], _sym_clear, 0, NULL);
250 
251  // prepare umenu prefix to be concatenated
252  if (x->msg == gensym("umenu_prefix")) {
253 
254  atom_setlong(a, 0);
255  outlet_anything((t_outlet*)x->outlets[data_out], gensym("prefix_mode"), 1, a);
256 
257  // prepare umenu prefix
258  if (address.getName() == S_SEPARATOR) {
259 
260  TTString prefix = address.c_str();
261 
262  if (output == kTTSym_attributes)
263  prefix += ":";
264 
265  atom_setsym(a, gensym((char*)prefix.data()));
266  }
267  else {
268  TTString prefix = address.c_str();
269 
270  if (output == kTTSym_children)
271  prefix += "/";
272  else if (output == kTTSym_brothers)
273  prefix += ".";
274  else if (output == kTTSym_attributes)
275  prefix += ":";
276  else
277  prefix += "/";
278 
279  atom_setsym(a, gensym((char*)prefix.data()));
280  }
281 
282  outlet_anything((t_outlet*)x->outlets[data_out], gensym("prefix"), 1, a);
283  }
284 
285  // fill umenu
286  // output argv
287  for (i = 0; i < argc; i++) {
288  s = atom_getsym(argv+i);
289 
290  if (output == kTTSym_descendants && address.getName() == S_SEPARATOR)
291  if (s->s_name[0] == C_SEPARATOR)
292  s = gensym(s->s_name+1); // remove the / in this case
293 
294  if (output == kTTSym_attributes)
295  s = jamoma_TTName_To_PdName(TTSymbol(s->s_name));
296 
297  if (output == kTTSym_brothers && s == _sym_bang)
298  s = gensym("0");
299 
300  if (s) {
301  atom_setsym(a, s);
302  outlet_anything((t_outlet*)x->outlets[data_out], _sym_append, 1, a);
303  }
304  }
305  }
306 
307  // JIT CELLBLOCK FORMAT
308  else if (x->msg == gensym("jit.cellblock")) {
309 
310  // clear jit.cellblock
311  atom_setsym(a, gensym("all"));
312  outlet_anything((t_outlet*)x->outlets[data_out], _sym_clear, 1, a);
313 
314  // prepare jit.cellblock structure
315  atom_setlong(a, argc);
316  outlet_anything((t_outlet*)x->outlets[data_out], gensym("rows"), 1, a);
317 
318  // fill jit.cellblock
319  // output argv
320  for (i = 0; i < argc; i++) {
321  s = atom_getsym(argv+i);
322 
323  if (output == kTTSym_attributes)
324  s = jamoma_TTName_To_PdName(TTSymbol(s->s_name));
325 
326  if (output == kTTSym_brothers && s == _sym_bang)
327  s = gensym("0");
328 
329  if (s) {
330  atom_setlong(j, 0);
331  atom_setlong(j+1, i);
332  atom_setsym(j+2, s);
333  outlet_anything((t_outlet*)x->outlets[data_out], _sym_set, 3, j);
334  }
335  }
336  }
337 
338  // COLL FORMAT
339  else if (x->msg == gensym("coll")) {
340 
341  // clear coll
342  outlet_anything((t_outlet*)x->outlets[data_out], _sym_clear, 0, NULL);
343 
344  // fill coll
345  // output argv
346  for (i=0; i<argc; i++) {
347  s = atom_getsym(argv+i);
348 
349  if (output == kTTSym_attributes)
350  s = jamoma_TTName_To_PdName(TTSymbol(s->s_name));
351 
352  if (output == kTTSym_brothers && s == _sym_bang)
353  s = gensym("0");
354 
355  if (s) {
356  atom_setsym(c, s);
357  atom_setlong(c+1, 0); // any data to avoid storage error
358  outlet_anything((t_outlet*)x->outlets[data_out], _sym_store, 2, c);
359  }
360  }
361  }
362 
363  // NO FORMAT
364  else if (x->msg == gensym("none") || x->msg == _sym_nothing) {
365  if (argc)
366  outlet_anything((t_outlet*)x->outlets[data_out], _sym_nothing, argc, argv);
367  else if (msg != _sym_nothing)
368  outlet_anything((t_outlet*)x->outlets[data_out], msg, argc, argv);
369  }
370 
371  // output the size of the result after the result
372  // to perform auto selection in case the result contains only 1 item
373  atom_setlong(a, argc);
374  outlet_anything((t_outlet*)x->outlets[size_out], _sym_int, 1, a);
375 }
376 
377 void nmspc_return_selection(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
378 {
380  TTValue v;
381  TTSymbol output;
382  TTUInt32 i, state;
383  t_atom u[2], j[6];
384 
385  // the wrapped object is maybe destroyed
386  if (!x->wrappedObject.valid())
387  return;
388 
389  // Ask Explorer object
390  x->wrappedObject.get("output", v);
391  output = v[0];
392 
393  // UMENU OR UMENU_PREFIX FORMAT
394  if (x->msg == gensym("umenu") || x->msg == gensym("umenu_prefix")) {
395 
396  // clear check item
397  outlet_anything((t_outlet*)x->outlets[data_out], gensym("clearchecks"), 0, NULL);
398 
399  // update check item
400  for (i = 0; i < (TTUInt32) argc; i++) {
401  state = atom_getlong(argv+i);
402  atom_setlong(u, i);
403  atom_setlong(u+1, state);
404  outlet_anything((t_outlet*)x->outlets[data_out], gensym("checkitem"), 2, u);
405  }
406  }
407 
408  // JIT CELLBLOCK FORMAT
409  else if (x->msg == gensym("jit.cellblock")) {
410 
411  // update background color
412  for (i = 0; i < (TTUInt32) argc; i++) {
413 
414  atom_setlong(j, 0);
415  atom_setlong(j+1, i);
416  atom_setsym(j+2, gensym("brgb"));
417 
418  state = atom_getlong(argv+i);
419 
420  if (state) {
421  atom_setlong(j+3, 158);
422  atom_setlong(j+4, 0);
423  atom_setlong(j+5, 92);
424  }
425  else {
426  atom_setlong(j+3, 0);
427  atom_setlong(j+4, 0);
428  atom_setlong(j+5, 0);
429  }
430 
431  outlet_anything((t_outlet*)x->outlets[data_out], gensym("cell"), 6, j);
432  }
433  }
434 
435  // COLL FORMAT
436  else if (x->msg == gensym("coll")) {
437  ;
438  }
439 
440  // NO FORMAT
441  else if (x->msg == gensym("none") || x->msg == _sym_nothing)
442  outlet_anything((t_outlet*)x->outlets[data_out], gensym("selection"), argc, argv);
443 }
444 
445 void nmspc_bang(TTPtr self)
446 {
448 
449  // UMENU OR UMENU_PREFIX FORMAT : clear umenu
450  if (x->msg == gensym("umenu") || x->msg == gensym("umenu_prefix"))
451  outlet_anything((t_outlet*)x->outlets[data_out], _sym_clear, 0, NULL);
452 
453  x->wrappedObject.send("Explore");
454 }
455 
456 void nmspc_symbol(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
457 {
459  TTValue v;
460  TTAddress adrs, absoluteAddress;
461 
462  // for absolute address
463  adrs = TTAddress(msg->s_name);
464  if (adrs.getType() == kAddressAbsolute) {
465  v.append(adrs);
466  }
467  else {
468 
469  // if the relative attribute is on
470  if (x->index) {
471  absoluteAddress = x->patcherAddress.appendAddress(adrs);
472  v.append(absoluteAddress);
473  }
474  else {
475  pd_error((t_object*)x, "set relative attribute on before to send relative address");
476  return;
477  }
478  }
479 
480  x->wrappedObject.set(kTTSym_address, v);
481 
482  // UMENU OR UMENU_PREFIX FORMAT : clear umenu
483  if (x->msg == gensym("umenu") || x->msg == gensym("umenu_prefix"))
484  outlet_anything((t_outlet*)x->outlets[data_out], _sym_clear, 0, NULL);
485 
486  x->wrappedObject.send("Explore");
487 }
488 
489 /*
490 void nmspc_add_max_namespace(t_nmspc *x)
491 {
492  t_object *patcher;
493  t_max_err err;
494  long result = 0;
495 
496  err = object_obex_lookup(x, gensym("#P"), &patcher);
497 
498  object_method(patcher, gensym("iterate"), nmspc_myobject_iterator, (void *)x, PI_WANTBOX | PI_DEEP, &result);
499 }
500 
501 long nmspc_myobject_iterator(t_nmspc *x, t_object *b)
502 {
503  TTNodePtr newTTNode;
504  bool newInstanceCreated;
505  char temp[256];
506  t_symbol *varname = object_attr_getsym(b, gensym("varname"));
507  uint i;
508 
509  // Make sure we are dealing with valid OSC input by looking for a leading slash
510  if (varname) {
511  if (varname->s_name[0] == C_SEPARATOR) {
512  newInstanceCreated = false;
513 
514  // put all scripting name in a /max node
515  snprintf(temp,256,"/max%s", varname->s_name);
516 
517  // search for [ and ] cause this is how max declare instance.
518  for (i=0; i<strlen(temp); i++) {
519  if (temp[i] == '[')
520  temp[i] = '.';
521  else if (temp[i] == ']')
522  temp[i] = 0;
523  }
524 
525  jamoma_directory_register(gensym(temp), gensym("maxobject"), (t_object *)b, &newTTNode, &newInstanceCreated);
526 
527  // add varname and maxclass as properties of the node
528  //TODO : max_node_attribute_add(newTTNode,gensym("varname"), b);
529  //TODO : max_node_attribute_add(newTTNode,gensym("maxclass"), b);
530 
531  //if (newInstanceCreated)
532  // object_warn((t_object *)x,"%s : this scripting name is already registered in the tree", varname->s_name);
533  }
534  }
535 
536  return 0;
537 }
538  */
539 
540 t_max_err nmspc_get_format(TTPtr self, TTPtr attr, long *ac, t_atom **av)
541 {
543 
544  if ((*ac)&&(*av)) {
545  //memory passed in, use it
546  } else {
547  //otherwise allocate memory
548  *ac = 1;
549  if (!(*av = (t_atom*)getbytes(sizeof(t_atom)*(*ac)))) {
550  *ac = 0;
551  return -4; // MAX_ERR_OUT_OF_MEM;
552  }
553  }
554 
555  atom_setsym(*av, x->msg);
556 
557  return 0; // MAX_ERR_NONE;
558 }
559 
560 t_max_err nmspc_set_format(TTPtr self, TTPtr attr, long ac, t_atom *av)
561 {
563 
564  if (ac&&av) {
565  x->msg = atom_getsym(av);
566  } else {
567  // no args, set to none
568  x->msg = _sym_none;
569  }
570  return 0; // MAX_ERR_NONE;
571 }
572 
573 t_max_err nmspc_get_relative(TTPtr self, TTPtr attr, long *ac, t_atom **av)
574 {
576 
577  if ((*ac)&&(*av)) {
578  //memory passed in, use it
579  } else {
580  //otherwise allocate memory
581  *ac = 1;
582  if (!(*av = (t_atom*)getbytes(sizeof(t_atom)*(*ac)))) {
583  *ac = 0;
584  return -4; // MAX_ERR_OUT_OF_MEM;
585  }
586  }
587 
588  atom_setlong(*av, x->index);
589 
590  return 0; // MAX_ERR_NONE;
591 }
592 
593 t_max_err nmspc_set_relative(TTPtr self, TTPtr attr, long ac, t_atom *av)
594 {
596 
597  if (ac&&av) {
598  x->index = atom_getlong(av);
599 
600  if (x->index) {
601  // The following must be deferred because we have to interrogate our box,
602  // and our box is not yet valid until we have finished instantiating the object.
603  // Trying to use a loadbang method instead is also not fully successful (as of Max 5.0.6)
604  nmspc_subscribe(x);
605 // defer_low((t_object*)x, (method)nmspc_subscribe, NULL, 0, 0);
606  }
607 
608  } else {
609  // no args
610  x->index = 0;
611  }
612  return 0; // MAX_ERR_NONE;
613 }
TTErr JAMOMA_EXPORT jamoma_patcher_get_info(t_object *obj, t_object **returnedPatcher, TTSymbol &returnedContext, TTSymbol &returnedClass, TTSymbol &returnedName)
Get all context info from an object (his patcher and the context, the class and the name of his patch...
TTAddress appendAddress(const TTAddress &toAppend)
Return a new TTAddress with the appended part.
Definition: TTAddress.h:167
TTObject subscriberObject
The instance of a TTSubscriber object used to register the wrapped object in the tree structure...
TTErr send(const TTSymbol aName)
Send a message to this object with no arguments.
Definition: TTObject.cpp:135
TTHandle outlets
an array of outlet
TTErr JAMOMA_EXPORT jamoma_explorer_create(t_object *x, TTObject &returnedExplorer)
Create a TTExplorer object.
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
Definition: TTNode.h:59
TTAddress address
sometime external needs to store an address (e.g. send, receive, view, ...)
TTSymbol patcherClass
the patcher class in which the external is
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
Create and use Jamoma object instances.
Definition: TTObject.h:29
t_object * patcherPtr
the patcher in which the external is (ignoring subpatcher)
void append(const T &anElementValueToAppend)
Insert a single TTElement at the end.
Definition: TTValue.h:243
void * TTPtr
A generic pointer.
Definition: TTBase.h:248
TTErr get(const TTSymbol aName, T &aReturnedValue) const
Get an attribute value for an object.
TTErr set(const TTSymbol aName, T aValue)
Set an attribute value for an object.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTAddress patcherAddress
the patcher address in which the external is
TTObject wrappedObject
The instance of the Jamoma object we are wrapping.
this flag means that an address have a leading slash
Definition: TTAddressBase.h:65
t_symbol JAMOMA_EXPORT * jamoma_TTName_To_PdName(TTSymbol TTName)
Convert a TTSymbol "MyObjectMessage" into a t_symbol *"my/object/message" or return NULL if the TTSym...
const char * c_str() const
Return a pointer to the internal string as a C-string.
Definition: TTSymbol.h:77
std::int32_t TTInt32
32 bit signed integer
Definition: TTBase.h:177
Wraps Jamoma Core classes as objects for PureData.
Data Structure for this object.
TTAddressType getType()
Get the type.
Definition: TTAddress.h:136
std::uint32_t TTUInt32
32 bit unsigned integer
Definition: TTBase.h:178
TTSymbol patcherContext
the patcher context in which the external is (model, view)
TTSymbol patcherName
the patcher name in which the external is
TTErr JAMOMA_EXPORT jamoma_subscriber_create(t_object *x, TTObject &anObject, TTAddress relativeAddress, TTObject &returnedSubscriber, TTSymbol &returnedAddress, TTNodePtr *returnedNode, TTNodePtr *returnedContextNode)
Create a #TTSubscriber object and register a TTObject into the tree or, if aTTObject is NULL...
The TTString class is used to represent a string.
Definition: TTString.h:34
long index
index of the inlet used
TTBoolean valid() const
Determine if the object contained by this TTObject is truly ready for use.
Definition: TTObject.cpp:179
TTSymbol & getName()
Get the name part.
Definition: TTAddress.h:118
WrappedModularInstance * WrappedModularInstancePtr
Pointer to a wrapped instance of our object.
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
TTErr wrapTTModularClassAsPdClass(TTSymbol &ttblueClassName, const char *pdClassName, WrappedClassPtr *c, ModularSpec *specificities)
Wrap a Jamoma class as a Pd class.