On 10/10/14 14:29, Daniele Nicolodi wrote:
> I copied the _impl definition, however, I would prefer to do not copy
> the interface definition, therefore I defined my block as follows:
> 
> namespace gr {
>   namespace baz {
> 
>     class BAZ_API pll_carriertracking_cc
>       : public gr::analog::pll_carriertracking_cc
>     {
>     public:
>       typedef boost::shared_ptr<pll_carriertracking_cc> sptr;
>       static sptr make(float loop_bw, float max_freq, float min_freq);
>     };
> 
>   } // namespace baz
> } // namespace gr
> 
> Then I copied the definition of the pll_carriertracking_cc_impl class
> implementation into my project and changed it where I wanted.
> 
> However, in this way, swig is not happy:

It seems to be a limitation of SWIG (which I don't know much, so I may
still be doing something wrong). If I define a virtual method in the
definition of my block interface, SWIG generates the correct C++ code.

I ended up adding a definition for the work() virtual method to fix the
issue. Again, not the most elegant thing to do, but it works...

Cheers,
Daniele


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to