end
class WakeUpNode
-special Node
+ super Node
fun wake_up is abstract
# Wake up the node
fun wake_up_in(d: Int)
end
class NodeSource
-special Node
+ super Node
var _nexts: nullable ArraySet[NodeSink] = null
fun attach(n: NodeSink)
# Add the sink `n' the the connected nodes
end
class NodeSink
-special Node
+ super Node
fun recieve(n: NodeSource) is abstract
# the `n' has emeted a signal
end
#
class BeepSource
-special NodeSource
-special WakeUpNode
+ super NodeSource
+ super WakeUpNode
redef fun wake_up
do
send
end
class CountSink
-special NodeSink
+ super NodeSink
readable var _count: Int = 0
redef fun recieve(n: NodeSource)
do
end
class SimpleCountSink
-special CountSink
+ super CountSink
init(name: String)
do
end
class NodeAlternate
-special NodeSink
-special NodeSource
+ super NodeSink
+ super NodeSource
var _last: nullable NodeSource
redef fun recieve(n: NodeSource)
do
end
class NodeEat
-special CountSink
-special NodeSource
+ super CountSink
+ super NodeSource
var _limit: Int
redef fun recieve(n: NodeSource)
do
end
class NodeDelay
-special NodeSource
-special NodeSink
-special WakeUpNode
+ super NodeSource
+ super NodeSink
+ super WakeUpNode
var _delay: Int
redef fun recieve(n: NodeSource)
do