[clam-devel] CrossCorrelation visibility

David García Garzón david.garcia at upf.edu
Sat May 28 08:00:20 PDT 2011


A Divendres 27 Maig 2011 15:09:22, Pau Arumí va escriure:
> El dg 22 de 05 de 2011 a les 05:52 +0200, en/na Nathan Stewart va
> 
> escriure:
> > I finally uncovered
> > CLAM/plugins/spacialization/src/CrossCorrelation.{hxx,cxx} - and I'm a
> > bit puzzled that not only is this buried, but the use of the namespace
> > 'Hidden' suggests it was done so on purpose.  More importantly, it's
> > not installed with the other headers. I'm actually looking to run
> > cross correlation on spectra, and I believe a 512 point spectrum will
> > adequately handle my needs - so I don't know if doing it in the
> > frequency domain is still more efficient.
> 
> Hi Nathan,
> the code you see like this one
> 
> namespace Hidden
> {
>         static const char* metadata[] = {
>                 "key", "CrossCorrelation",
>                 "category", "[plugin] New Spectral Processing",
>                 "description", "CrossCorrelation",
>                 0
>         };
>         static FactoryRegistrator<ProcessingFactory, CrossCorrelation>
>         reg = metadata;
> }
> 
> is a C++ idiom. The intention of this code is not to provide a public
> interface but to automatically set up things (register processing
> creator method and metadata) at load time. Hence the namespace Hidden.
> 
> > Is there any chance this could be moved into the installed headers for
> > CLAM, or are there reasons for not doing so?
> 
> Well it is just that the authors use this as a clam processings plugin,
> not as a library to link external code against it.
> 
> Best,
> Pau


Indeed it is, Pau. Remember that we changed all plugins so that they can be 
used as library as well. Plugins must be compiled apart, To link against them 
just use pkg-config with clam-spatialization module and you will get the flags 
to compile. You can include headers, for example, as 
<CLAM/spatialization/CrossCorrelation.hxx>



-- 
David García Garzón
(Work) david dot garcia at upf anotherdot edu
http://www.iua.upf.edu/~dgarcia



More information about the clam-devel mailing list