aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-04-17 11:17:53 +0200
committerlonkaars <loek@pipeframe.xyz>2024-04-17 11:17:53 +0200
commit37f89ed05f64f5d4ab3883713e42c476f38ab6c0 (patch)
tree1d5a7a33cf4e028c8c1fda835bc62a622ae64354
parent5364db9f1069cb75c51d696c075c6e535fdb0411 (diff)
add WIP class diagram
-rw-r--r--docs/.gitignore1
-rw-r--r--docs/class-diag.puml49
2 files changed, 50 insertions, 0 deletions
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 0000000..756b22f
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1 @@
+*.svg
diff --git a/docs/class-diag.puml b/docs/class-diag.puml
new file mode 100644
index 0000000..fc4cafd
--- /dev/null
+++ b/docs/class-diag.puml
@@ -0,0 +1,49 @@
+@startuml
+
+abstract class Node { /' (also ConcreteObserver) '/
+ + update()
+}
+class Net { /' (also ConcreteSubject) '/
+ + setLevel(SignalLevel level)
+}
+
+class Subject {
+ + attach(Observer* observer)
+ + detach(Observer* observer)
+ + notify()
+}
+interface Observer {
+ + update()
+}
+
+class GateAnd
+class GateNand
+class GateNor
+class GateNot
+class GateOr
+class GateXor
+class NodeOutput
+class NodeInput
+
+enum SignalLevel {
+ LOW
+ HIGH
+ UNDEFINED
+}
+
+Node <|-[dashed]-- GateAnd
+Node <|-[dashed]-- GateNand
+Node <|-[dashed]-- GateNor
+Node <|-[dashed]-- GateNot
+Node <|-[dashed]-- GateOr
+Node <|-[dashed]-- GateXor
+Node <|-[dashed]-- NodeOutput
+Node <|-[dashed]-- NodeInput
+
+Subject <|-- Net
+Observer <|-[dashed]- Node
+Node -> "owner" Net
+Observer "*" - Subject
+
+
+@enduml