aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GateNand.cpp8
-rw-r--r--GateNand.h7
2 files changed, 9 insertions, 6 deletions
diff --git a/GateNand.cpp b/GateNand.cpp
index 5e43618..2d4d9c6 100644
--- a/GateNand.cpp
+++ b/GateNand.cpp
@@ -2,7 +2,7 @@
GateNand GateNand::instance(GateNand::type);
-GateNand::GateNand(const char * type) : GateAnd(type) { }
+// GateNand::GateNand(const char * type) : GateAnd(type) { }
SignalLevel GateNand::level() {
SignalLevel lvl = GateAnd::level();
@@ -13,7 +13,7 @@ SignalLevel GateNand::level() {
// GateNand::GateNand(const GateNand * prototype) : GateAnd() { }
-// GateNand * GateNand::clone() const {
-// return new GateNand(this);
-// }
+GateNand * GateNand::clone() const {
+ return new GateNand(this);
+}
diff --git a/GateNand.h b/GateNand.h
index 5ed9956..fb9d788 100644
--- a/GateNand.h
+++ b/GateNand.h
@@ -4,13 +4,16 @@
#include "GateAnd.h"
class GateNand : public GateAnd {
- using GateAnd::GateAnd;
+public:
+ virtual GateNand * clone() const;
protected:
SignalLevel level();
+ using GateAnd::GateAnd;
private:
- GateNand(const char * type);
+ GateNand(const GateNand *) : GateAnd() {}
+ // GateNand(const char * type);
constexpr static const char * type = "nand";
static GateNand instance;
};