[Clam-devel] To snollux: factory registration

David García Garzón dgarcia at iua.upf.edu
Wed Mar 5 03:10:20 PST 2008


Snollux, i am sorry every time you ask questions on the irc i am not 
available.

The problem you have when recompiling your code with the new version is 
because we changed the way of registering processings in the Factory to be 
able to add more metadata. For example, we can add the category for the 
processing tree that formerly had to be manually added on the NetworkEditor 
code by hand. See the details here:

http://clam.iua.upf.edu/wikis/clam/index.php/Creating_a_minimal_processing_object

As you see, we updated the documentation. But changes are often are scattered 
and of course people won't read the whole documentation every time we do a 
release, so we normally compile version incompatibilities in a handy "Version 
migration guide":

http://clam.iua.upf.edu/wikis/clam/index.php/Version_Migration_Guide

In summary your problem is the following one:
Instead of:
static CLAM::Factory<CLAM::Processing>::Registrator<MyProcessing>
        myProcessingRegistrator("MyProcessing");
You should:
static const char * metadata[] = {
        "key", "MyProcessing",
        "category", "Birds call recognition",
        0
        };
static CLAM::FactoryRegistrator<CLAM::ProcessingFactory, MyProcessing> 
registrator(metadata);

Hernan was right saying that it would be nice to convert your processings into 
a plugin, but you don't need that now and you'd better fix the actual problem 
and then, if you want, make it a plugin. Also maybe it is time to rename 
MyProcessing to something more meaningful. But just take one step at a 
time. :-)

-- 
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/20080305/c4083c87/attachment.sig>


More information about the clam-devel mailing list