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
No comments:
Post a Comment