W dniu 02.06.2016 o 10:46, Andrej Rode pisze:
> Hello Piotr,
>
>
> > Is it possible to do what I want with use of inheritance? If yes -
> > how to do it so I wouldn't have to copy the code?
>
> If your extension of the block is a general enhancement someone else
> could make use of. It is best to directly modify the general_work
> function of the block and contribute back your results.
>
> If your extension is specialized for your use case take a look at
> $(class)_impl. It should be possible to inherit from
> fractional_resampler_impl and then reimplement or modify the functions
> you want to extend.
>
> Maybe there is some other, even better way of achieving your goal I
> don't know yet.
>
> Best Regards,
> Andrej
Hi Andrej,

There are cases when my modifications could benefit others (on a side
note: in my opinion what would benefit everyone would be ability to
access setters of all of the blocks with use of stream tags and
messages), but there are also cases when I want to add some
modifications specific to my project and it doesn't make sense to even
try to make these changes included in the GNU Radio.

If I can inherit from *_impl classes - are you able to present how to do
it? *_impl.h headers are not installed together with GNU Radio so I'm
not able include them. And this is just a start - then I don't know how
prepare CMake files so derived class is linked correctly, and how to
prepare SWIG input file. If you are able to spare some time to describe
it I would greatly appreciate that.

Best Regards,
Piotr




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

Reply via email to