|
|
@ -158,6 +158,7 @@ type GraphNode interface {
|
|
|
|
RegisterChannel(listener chan GraphSignal)
|
|
|
|
RegisterChannel(listener chan GraphSignal)
|
|
|
|
UnregisterChannel(listener chan GraphSignal)
|
|
|
|
UnregisterChannel(listener chan GraphSignal)
|
|
|
|
UpdateChannel() chan GraphSignal
|
|
|
|
UpdateChannel() chan GraphSignal
|
|
|
|
|
|
|
|
Update(signal GraphSignal)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func NewBaseNode(name string, description string, id string) BaseNode {
|
|
|
|
func NewBaseNode(name string, description string, id string) BaseNode {
|
|
|
@ -183,6 +184,10 @@ type BaseNode struct {
|
|
|
|
listeners map[chan GraphSignal]chan GraphSignal
|
|
|
|
listeners map[chan GraphSignal]chan GraphSignal
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (node * BaseNode) Update(signal GraphSignal) {
|
|
|
|
|
|
|
|
node.signal <- signal
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (node * BaseNode) Name() string {
|
|
|
|
func (node * BaseNode) Name() string {
|
|
|
|
return node.name
|
|
|
|
return node.name
|
|
|
|
}
|
|
|
|
}
|
|
|
|