[PD-dev] [flext] how to call the right setup function

Georg Holzmann grhPD at gmx.at
Mon Oct 31 17:26:49 CET 2005


Hallo!

Unfortunately I have still some problem:
when I make it in the way as below, the constructor of class A will be 
called before the setup function ... is that correct behauviour?
The problem is, that I have to setup some stuff (at setup time), which 
is also needed by calls A ... :(

Thanks,
LG
Georg


> 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
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
> 
> 


-- 
=%)!:?"§<§0&-"|>*
http://grh.mur.at




More information about the Pd-dev mailing list