Files
@ 93e3a00b7cfc
Branch filter:
Location: light9/flax/Ports.py - annotation
93e3a00b7cfc
737 B
text/x-python
KC had a new DoubleVar bug where setting from 0 to 1 would result in 0.000
Ignore-this: 30e08a24aef112c79cde7c9b62d1e45a
Ignore-this: 30e08a24aef112c79cde7c9b62d1e45a
45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 45b12307c695 | # super rough code
class AbstractPort:
def __init__(self):
pass
def put_data(self, value):
pass
def get_data(self):
pass
class Port(AbstractPort):
"Connects from a node to exactly one node."
def __init__(self, value=None):
AbstractPort.__init__(self)
self.value = value
def put_data(self, value):
self.value = value
def get_data(self):
return self.value
class MultiPort(AbstractPort):
"Connects from a node to any number of nodes."
def __init__(self, values=None):
AbstractPort.__init__(self)
self.values = values
def put_data(self, values):
self.values = values
def get_data(self):
return self.values
|