discuss-gnuradio
[Top][All Lists]
Advanced

[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: Daniele Nicolodi
Subject: Re: [Discuss-gnuradio] Sub-classing a block defined in an _impl class
Date: Fri, 10 Oct 2014 12:22:13 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

Hello Martin,

I'm not sure I understand. Are you saying that there is no way of doing
what I want without copying over to my class the implementation of the
block that is in the _impl class?

Why is this a good thing?

Cheers,
Daniele



On 10/10/14 12:16, Martin Braun wrote:
> 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
>>
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]