summaryrefslogtreecommitdiff
path: root/Gate.h
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-06-29 23:14:23 +0930
committerDaniel Jones <admin@danieljon.es>2020-06-29 23:14:23 +0930
commit193fda2d270f63c127edc5b1082ef14ad12b1175 (patch)
tree8423cc822fd704f4c7b659f0ff6c9580147c4b2a /Gate.h
parent1e76ef7d2df9d49a905f416774f33fdedfcf6f34 (diff)
downloadfoxlogicgates-193fda2d270f63c127edc5b1082ef14ad12b1175.tar.gz
foxlogicgates-193fda2d270f63c127edc5b1082ef14ad12b1175.zip
further work deriving gates from Object
Diffstat (limited to 'Gate.h')
-rw-r--r--Gate.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Gate.h b/Gate.h
index a0d8cf6..e5a6115 100644
--- a/Gate.h
+++ b/Gate.h
@@ -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;
};