[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Sub-classing a block defined in an _impl class
From: |
Martin Braun |
Subject: |
Re: [Discuss-gnuradio] Sub-classing a block defined in an _impl class |
Date: |
Fri, 10 Oct 2014 12:16:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
You're right -- that's one of the reasons why we try and keep the
block's guts (their kernels) elsewhere than the actual block definition.
Not all of our blocks do this, though.
M
On 10/10/2014 12:03 PM, Daniele Nicolodi wrote:
> Hello,
>
> this question my arise from my ignorance about C++, but I don't
> understand how, if it is possible, to sub-class a GNURadio block that
> has moat of his code in an _impl class.
>
> To my understanding I would need to subclass both the class defining the
> block and his _impl class. However, it seems that the _impl class is not
> part of the exposed API, therefore there is no way to subclass it. There
> is way to achieve this without copying around significant portions of code?
>
> The case at hand is subclassing gr::analog::pll_carriertracking_cc
> changing the phase_detector() method to use the regular atan2() instead
> of the fast version.
>
> Thanks!
>
> Cheers,
> Daniele
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>