Using virtual member functions

Hello all,

I’m about to use member functions of the abstract base class of qtgui
classes to adjust visualization parameters such as “set_title”,
“set_line_label”
etc.

There is an explanation of virtual based classes in [1]. So it’s
possible
to use pure virtual functions by the derived classes.

When we’re in GNURadio, there is an abstract class and an implementation
class which is derived from the abstract class. So I expect to be able
of
using the pure virtual functions declared in abstract class by having a
pointer of the implementation class. However the members aren’t
accessible.
What can I do to use them?

Best,
Mostafa

[1] http://www.cplusplus.com/doc/tutorial/polymorphism/

When you ‘make’ a block, it actually returns you a _impl version of the
class, even though only the abstract class is declared publically. All
the methods are actually defined in the _impl, where also the members
reside.

If you’re having trouble understanding the polymorphism concepts, I
suggest having another look at some C++ literature. If it’s the actual
GNU Radio block design, have another look at examples of blocks (e.g. in
gr-blocks) to see how the abstract methods interact with their
definitions.

Cheers,
M

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs