summaryrefslogtreecommitdiff
path: root/grc/base/Block.py
diff options
context:
space:
mode:
authorJosh Blum2009-08-26 13:29:28 -0700
committerJosh Blum2009-08-26 13:29:28 -0700
commitdc9e9db16047ec589a7b0488fac04c5bb682903c (patch)
tree1a97913e4f1ab6acd0627757f034ee6c9eb4672f /grc/base/Block.py
parent854bed10dfb61e9f9feab5259a75e809941089ab (diff)
downloadgnuradio-dc9e9db16047ec589a7b0488fac04c5bb682903c.tar.gz
gnuradio-dc9e9db16047ec589a7b0488fac04c5bb682903c.tar.bz2
gnuradio-dc9e9db16047ec589a7b0488fac04c5bb682903c.zip
added rewrite methods to element to separate from validation logic
Diffstat (limited to 'grc/base/Block.py')
-rw-r--r--grc/base/Block.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/grc/base/Block.py b/grc/base/Block.py
index 491c594cc..d2266e783 100644
--- a/grc/base/Block.py
+++ b/grc/base/Block.py
@@ -140,6 +140,14 @@ class Block(Element):
"""
self.get_param('_enabled').set_value(str(enabled))
+ def rewrite(self):
+ """
+ Rewrite critical structures.
+ Call rewrite on all sub elements.
+ """
+ Element.rewrite(self)
+ for elem in self.get_ports() + self.get_params(): elem.rewrite()
+
def validate(self):
"""
Validate the block.