Gr_foo_sptr (vs) gr_foo

Hello,

I did spent time working on GNU radio C++ API,
And I was stuck debugging in some point where I need to get the gr_foo
to
retrieve the values of its members whereas I already instantiated
gr_foo_sptr instead.
Is there a way to fix this issue.

Example: I already instantiated gr_msg_queue_sptr,
gr_message_source_sptr

          and I got ‘gr_msg_queue_sptr’ has no member named 

‘empty_p’
‘gr_message_source_sptr’ has no member named
‘msgq’

Do I have to get rid of sptrs and instantiate gr_msg_queue and
gr_message_source instead
Or I may get around this.

Regards,


View this message in context:
http://gnuradio.4.n7.nabble.com/gr-foo-sptr-vs-gr-foo-tp43252.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Tue, Aug 20, 2013 at 5:15 PM, NaceurElOuni [email protected]
wrote:

          and I got gr_msg_queue_sptr has no member named empty_p
                       gr_message_source_sptr has no member named

msgq

Do I have to get rid of sptrs and instantiate gr_msg_queue and
gr_message_source instead
Or I may get around this.

Regards,

Take a look at the Boost shared pointer documentation:
http://www.boost.org/doc/libs/1_54_0/libs/smart_ptr/shared_ptr.htm

You’ll want to either use the ‘->’ operator or you can get a pointer
to the original object using the get() function.


Tom
Visit us at GRCon13 Oct. 1 - 4
http://www.trondeau.com/grcon13