diff options
author | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2024-06-16 09:41:19 +0200 |
---|---|---|
committer | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2024-06-16 09:41:19 +0200 |
commit | 42a564bb911618980083b9f13931d8422927a2fb (patch) | |
tree | 32fd979af47af3d4a6c4db5b1329eb5dd522b2e2 | |
parent | bb9a753477870961d776143bd37fb28b8c09c4c9 (diff) |
Nand fixed
-rw-r--r-- | GateNand.cpp | 8 | ||||
-rw-r--r-- | GateNand.h | 7 |
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); +} @@ -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; }; |