[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3887 - in gnuradio/branches/developers/jcorgan/hier/g
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r3887 - in gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src: lib/runtime python/gnuradio/gr |
Date: |
Fri, 27 Oct 2006 20:21:36 -0600 (MDT) |
Author: jcorgan
Date: 2006-10-27 20:21:35 -0600 (Fri, 27 Oct 2006)
New Revision: 3887
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/hier_block2.py
Log:
Work in progress.
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
2006-10-28 01:46:05 UTC (rev 3886)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
2006-10-28 02:21:35 UTC (rev 3887)
@@ -29,7 +29,7 @@
%template(x_vector_gr_basic_block_sptr) vector<gr_basic_block_sptr>;
};
-class gr_basic_block
+class gr_basic_block
{
protected:
gr_basic_block();
@@ -47,5 +47,5 @@
%pythoncode %{
gr_basic_block_sptr.__repr__ = lambda self: "<gr_basic_block %s (%d)>" %
(self.name(), self.unique_id ())
-gr_basic_block_sptr.block = lambda self: self
+gr_basic_block_sptr.basic_block = lambda self: self
%}
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/hier_block2.py
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/hier_block2.py
2006-10-28 01:46:05 UTC (rev 3886)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/hier_block2.py
2006-10-28 02:21:35 UTC (rev 3887)
@@ -25,14 +25,19 @@
# This hack forces a 'has-a' relationship to look like an 'is-a' one.
#
# It allows Python classes to subclass this one, while passing through
-# method calls to the C++ class.
+# method calls to the C++ class shared pointer from SWIG.
#
# It also allows us to intercept method calls if needed
#
class hier_block2(object):
def __init__(self, name, input_signature, output_signature):
- print "hier_block2.__init__: called for ", name
self._hb = hier_block2_swig(name, input_signature, output_signature)
def __getattr__(self, name):
return getattr(self._hb, name)
+
+ def define_component(self, name, comp):
+ print "Passing through call to define_component"
+ print type(comp)
+ print type(comp.basic_block())
+ return self._hb.define_component(name, comp.basic_block())
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3887 - in gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src: lib/runtime python/gnuradio/gr,
jcorgan <=