[PD-dev] [flext] how to call the right setup function
Georg Holzmann
grhPD at gmx.at
Mon Oct 31 17:05:51 CET 2005
Hallo!
I just read the documentation on how to write libs in flext (should have
done that before ... :) - and so it works:
(but maybe there is also an other solution ? - because I don't need a
library, I need only this single object ... ?)
class A : public flext_dsp
{
FLEXT_HEADER(A,flext_dsp)
[...]
// no setup function here
}
class B : public A
{
FLEXT_HEADER_S(B,A,setup)
[...]
private:
static void setup(t_classid c);
FLEXT_CALLBACK(some_methods_from_A_or_B)
};
FLEXT_LIB_DSP_V("B",B)
void B::setup(t_classid c)
{
[...]
}
static void lib_setup()
{
// call the objects' setup routines
FLEXT_DSP_SETUP(B);
}
// setup the library
FLEXT_LIB_SETUP(B,lib_setup)
LG
Georg
More information about the Pd-dev
mailing list