aboutsummaryrefslogtreecommitdiff
path: root/oop2w6/Visitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'oop2w6/Visitor.h')
-rw-r--r--oop2w6/Visitor.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/oop2w6/Visitor.h b/oop2w6/Visitor.h
new file mode 100644
index 0000000..31188d3
--- /dev/null
+++ b/oop2w6/Visitor.h
@@ -0,0 +1,14 @@
+#pragma once
+
+class Resistor;
+class Capacitor;
+class Inductor;
+class Visitor {
+public:
+ Visitor() {}
+ virtual ~Visitor() {}
+public:
+ virtual void visit(Resistor&) {}
+ virtual void visit(Capacitor&) {}
+ virtual void visit(Inductor&) {}
+};