aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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