X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Flib%2Fruntime%2Fgr_block.i;h=c2e2aa4b8babff1e9d3bcf8c7490632c9e218c91;hb=ea29b08aeb54227e6628f655ccfdb96fe4d8c378;hp=3bfd243676c3c901574c3b13c95f636c65f3149b;hpb=18a684bf3dc144c48fc4cc6cc72f5070febd8074;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/lib/runtime/gr_block.i b/gnuradio-core/src/lib/runtime/gr_block.i index 3bfd2436..c2e2aa4b 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.i +++ b/gnuradio-core/src/lib/runtime/gr_block.i @@ -6,7 +6,7 @@ * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, @@ -20,6 +20,8 @@ * Boston, MA 02110-1301, USA. */ +%include + class gr_block; typedef boost::shared_ptr gr_block_sptr; %template(gr_block_sptr) boost::shared_ptr; @@ -29,26 +31,21 @@ namespace std { %template(x_vector_gr_block_sptr) vector; }; -class gr_block { +class gr_block : public gr_basic_block { protected: gr_block (const std::string &name, - gr_io_signature_sptr input_signature, - gr_io_signature_sptr output_signature); + gr_io_signature_sptr input_signature, + gr_io_signature_sptr output_signature); public: virtual ~gr_block (); - std::string name () const; - gr_io_signature_sptr input_signature () const; - gr_io_signature_sptr output_signature () const; - long unique_id () const; unsigned history () const; int output_multiple () const; double relative_rate () const; - bool check_topology (int ninputs, int noutputs); bool start(); bool stop(); @@ -57,9 +54,6 @@ class gr_block { void set_detail (gr_block_detail_sptr detail) { d_detail = detail; } }; -%rename(block_ncurrently_allocated) gr_block_ncurrently_allocated; -long gr_block_ncurrently_allocated (); - %pythoncode %{ gr_block_sptr.__repr__ = lambda self: "" % (self.name(), self.unique_id ()) gr_block_sptr.block = lambda self: self