[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] constructor of block is not private
From: |
Marcus Müller |
Subject: |
Re: [Discuss-gnuradio] constructor of block is not private |
Date: |
Thu, 23 Jan 2014 08:07:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Activecat,
the _impl classes are usually not instantiated by themselves; in fact,
their symbols are usually not exported and not wrapped by swig.
Instead, an instance of them is usually generated using the
superclass' ::make method. So there is need for at least that make
method being able to access the constructor.
Hope that cleared things up a little!
Greetings,
Marcus
On 23.01.2014 07:33, Activecat wrote:
> Dear Sir,
>
> From the documentation, the constructor of user-defined block is
> often private. But how come it is defined as public, refer below
> code. This is a typical code generated by gr_modtool:
>
> Filename: byte_source_impl.h
>
> /* -*- c++ -*- */#ifndef INCLUDED_HOWTO_BYTE_SOURCE_IMPL_H#define
> INCLUDED_HOWTO_BYTE_SOURCE_IMPL_H #include <howto/byte_source.h>
> namespace gr { namespace howto {
>
> class byte_source_impl : public byte_source { private: unsigned int
> counter;
>
>
> public: byte_source_impl(); // constructor is public ??
> ~byte_source_impl();
>
> void forecast (int noutput_items, gr_vector_int
> &ninput_items_required);
>
> int general_work(int noutput_items, gr_vector_int &ninput_items,
> gr_vector_const_void_star &input_items, gr_vector_void_star
> &output_items); };
>
> } // namespace howto } // namespace gr #endif /*
> INCLUDED_HOWTO_BYTE_SOURCE_IMPL_H */
>
>
>
> Please advise, thanks.
>
> Regards. address@hidden
>
>
>
> _______________________________________________ Discuss-gnuradio
> mailing list address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJS4L+lAAoJEAFxB7BbsDrLzKgH/3hXX64ZTxL0jMsns+Iukaqv
D8dp31yTa2dLDlaB/C+/SuZx1bRRjSEwUSWSl9/heqL90M80R7FLbr4AiGBlmPWu
o/c5kSTimPjSmEjND2yDJbEBacK7p4ha2S77BRNXi1eFcWCYBrDDJD3gkisGlFop
Tw0sYZHnGrt6RydNm/BCPSTufY9hpdM0dnYIEOIG0ox5DOXK5ZIKZvbEnfG+GZW9
yiN0sUgZQa+RSuxpbHL8IOwXgXN1s+XkrMFpqSIzeXN6GRduuXKl0+qYw2sJEV94
mPvO2deLBeaBEafioCMubO25w3sEJzv41Et7gld45VlMwhY69+DusJXH37gJwcU=
=2xFR
-----END PGP SIGNATURE-----