discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] constructor of block is not private


From: Activecat
Subject: [Discuss-gnuradio] constructor of block is not private
Date: Thu, 23 Jan 2014 14:33:09 +0800

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]