[Clam-devel] Frontend for automatic generation of plugin code
David García Garzón
dgarcia at iua.upf.edu
Thu Aug 7 04:15:23 PDT 2008
On Dijous 07 Agost 2008, Hernán Ordiales wrote:
> On Mon, Aug 4, 2008 at 5:23 AM, David García Garzón <dgarcia at iua.upf.edu>
wrote:
> > Cool work, Hernan! You have a nice ability of turn crazy suggestions into
> > reality. :-)
> >
> :-D
> :
> > Some other suggestions to enhance the interface: ;-)
> >
> >> - Using the CLAM::ProcessingDataPlugin to get the available port types
> >> (pity that they don't include the needed header)
> >
> > I just added a types() static method to ProcessingDataPlugin that gets
> > the list of registered types. Anyway i just noticed that this would
> > require the python bindings because the script is in python, so, let's
> > wait for that.
>
> I added ProcessingDataPlugin class to the bindings, not sure why but
> this is what i'm getting:
>
> import clam
> types_list = [item for item in clam.ProcessingDataPlugin.types()] #
> workaround: to get a 'python list'
>
> for item in types_list:
> print item
>
> N4CLAM11FundamentalE
> N4CLAM11MelCepstrumE
> N4CLAM11MelSpectrumE
> N4CLAM17SpectralPeakArrayE
> N4CLAM5AudioE
> N4CLAM7LPModelE
> N4CLAM8SpectrumE
> St6vectorISt4pairIffESaIS1_EE
> St6vectorIfSaIfEE
> f
Those are the keys used in an internal static dictionary that holds the type
plugins. They are the type_info::name() of the type which is the mangled form
of the type the compiler/linker uses, and we use it to get uniqueness. But
methods in PDP do not lookup for such a key but by a std::type_info object
which i think is not available on python.
I propose to duplicata the interface (lookUp, colorFor, displayNameFor) to
pass it also a string (mangled name).
> > - Provide 'Add' buttons instead so many port and control lines
>
> Yes, that was my original idea too, but thanks to python and its
> getattr feature that was the easiest/fastest way i figured... anyway,
> now implemented better using +/- buttons and a qtable
> > - AutoDefault to 'Generate' button (or better use a QButtonBox)
>
> done (AutoDefault)
>
> > - Use keepAspectRatio on the clam logo
>
> done
>
> Bonus:
> * shortcuts + tooltip added
>
Cool!
--
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080807/8a5f4595/attachment-0001.sig>
More information about the clam-devel
mailing list