[PD] nosferatu namespaces
Krzysztof Czaja
czaja at chopin.edu.pl
Wed Nov 23 22:06:52 CET 2005
hi all,
Hans-Christoph Steiner wrote:
...
>> - this should be local to each abstraction (otherwise reausability of
>> abstractions is not guaranteed - there could be nameclashes ...)
>
>
> Yes, for sure. But that'll be a much bigger project. For now, [using]
should not be too hard. The main points could be:
. add new member "t_symbol *me_libname" to struct _methodentry;
. fill that member with an extern name, when calling
class_addmethod() in class_new();
. define struct _libentry {t_symbol *le_name; t_libentry *le_next};
. add new member "t_libentry *gl_liblist" to struct _glist;
. duplicate (for speed) the main loop in pd_typedmess() for the
special case of pd_objectmaker target, for which the test for
a method name would be extended with current glist's library
list traversal; other targets ignore the me_libname member;
. in canvas_saveto() run the gobj_save() loop in two passes: first
for objects of well-known classes (declarations), like "using",
second for the rest;
. inherit parent's library list when creating child canvases;
. define the "using" class itself (or rather, "declare libs", if
possible); it would just append its args to the current glist's
gl_liblist, but before the inherited part.
Krzysztof
More information about the Pd-list
mailing list