[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] gr_foo_sptr (vs) gr_foo
From: |
Tom Rondeau |
Subject: |
Re: [Discuss-gnuradio] gr_foo_sptr (vs) gr_foo |
Date: |
Tue, 20 Aug 2013 17:23:23 -0400 |
On Tue, Aug 20, 2013 at 5:15 PM, NaceurElOuni <address@hidden> wrote:
> 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,
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