Statistics
| Branch: | Tag: | Revision:

root / gnuradio-core / src / lib / runtime / gr_basic_block.i @ 4cb301de

History | View | Annotate | Download (1.7 kB)

1
/* -*- c++ -*- */
2
/*
3
 * Copyright 2006 Free Software Foundation, Inc.
4
 * 
5
 * This file is part of GNU Radio
6
 * 
7
 * GNU Radio is free software; you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation; either version 3, or (at your option)
10
 * any later version.
11
 * 
12
 * GNU Radio is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 * 
17
 * You should have received a copy of the GNU General Public License
18
 * along with GNU Radio; see the file COPYING.  If not, write to
19
 * the Free Software Foundation, Inc., 51 Franklin Street,
20
 * Boston, MA 02110-1301, USA.
21
 */
22
23
class gr_basic_block;
24
typedef boost::shared_ptr<gr_basic_block> gr_basic_block_sptr;
25
%template(gr_basic_block_sptr) boost::shared_ptr<gr_basic_block>;
26
27
// support vectors of these...
28
namespace std {
29
  %template(x_vector_gr_basic_block_sptr) vector<gr_basic_block_sptr>;
30
};
31
32
class gr_basic_block
33
{
34
protected:
35
    gr_basic_block();
36
37
public:
38
    virtual ~gr_basic_block();
39
    std::string name() const;
40
    gr_io_signature_sptr input_signature() const;
41
    gr_io_signature_sptr output_signature() const;
42
    long unique_id() const;
43
    gr_basic_block_sptr basic_block();
44
    bool check_topology (int ninputs, int noutputs);
45
};
46
47
%rename(block_ncurrently_allocated) gr_basic_block_ncurrently_allocated;
48
long gr_basic_block_ncurrently_allocated();
49
50
%pythoncode %{
51
gr_basic_block_sptr.__repr__ = lambda self: "<gr_basic_block %s (%d)>" % (self.name(), self.unique_id ())
52
%}