1 from Tools.CList import CList
4 # Render Converter Converter Source
6 # a bidirectional connection
9 self.downstream_elements = CList()
10 self.upstream_elements = CList()
14 def connectDownstream(self, downstream):
15 self.downstream_elements.append(downstream)
16 if self.master is None:
17 self.master = downstream
19 def connectUpstream(self, upstream):
20 self.upstream_elements.append(upstream)
21 self.source = upstream # for single-source elements (i.e., most of them.)
24 def connect(self, upstream):
25 self.connectUpstream(upstream)
26 upstream.connectDownstream(self)
28 # default action: push downstream
30 self.downstream_elements.changed()