-from Tools.Event import Event
+from Components.Element import Element
-class Converter:
- def __init__(self):
- self.changed = Event(start = self.start, stop = self.stop)
-
- def connect(self, source):
- source.changed.listen(self.changed)
- self.source = source
-
- def disconnect(self):
- self.source.changed.unlisten(self.changed)
+class Converter(Element):
+ def __init__(self, arguments):
+ Element.__init__(self)
+ self.converter_arguments = arguments
- def start(self):
- pass
-
- def stop(self):
- pass
+ def __repr__(self):
+ return str(type(self)) + "(" + self.converter_arguments + ")"
+
+ def handleCommand(self, cmd):
+ self.source.handleCommand(cmd)