diff options
author | Daniel Jones <admin@danieljon.es> | 2020-06-29 23:14:23 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-06-29 23:14:23 +0930 |
commit | 193fda2d270f63c127edc5b1082ef14ad12b1175 (patch) | |
tree | 8423cc822fd704f4c7b659f0ff6c9580147c4b2a /Gate.h | |
parent | 1e76ef7d2df9d49a905f416774f33fdedfcf6f34 (diff) | |
download | foxlogicgates-193fda2d270f63c127edc5b1082ef14ad12b1175.tar.gz foxlogicgates-193fda2d270f63c127edc5b1082ef14ad12b1175.zip |
further work deriving gates from Object
Diffstat (limited to 'Gate.h')
-rw-r--r-- | Gate.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -45,7 +45,6 @@ class Gate : public Object GATE_TYPE get_gate_type() { return this->gate_type; }; Gate *get_input_gate1() { return this->input_gate1; }; Gate *get_input_gate2() { return this->input_gate2; }; - std::string get_output_type_text(); void set_state(bool state) { this->output_state = state; }; void set_input_gate1(Gate *gate) { this->input_gate1 = gate; }; void set_input_gate2(Gate *gate) { this->input_gate2 = gate; }; @@ -54,6 +53,8 @@ class Gate : public Object void remove_input_gate(int id); void update_state(); + std::string get_object_name() override { return get_output_type_text(); }; + private: GATE_TYPE gate_type; @@ -62,6 +63,8 @@ class Gate : public Object Gate *input_gate1; Gate *input_gate2; + std::string get_output_type_text(); + /* states */ bool output_state = false; }; |