summaryrefslogtreecommitdiff
path: root/Gate.h
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-06-24 11:21:58 +0930
committerDaniel Jones <admin@danieljon.es>2020-06-24 11:21:58 +0930
commit167e63926ec8b06511bc03a897731c17e4564719 (patch)
treeed2e9973277613cc787e719d7760fcd7c814f35c /Gate.h
parent7c04b3433568e54d02e5b520cdd1bdd944464f4e (diff)
downloadfoxlogicgates-167e63926ec8b06511bc03a897731c17e4564719.tar.gz
foxlogicgates-167e63926ec8b06511bc03a897731c17e4564719.zip
possibly fix logic bug and add options panel
the option panel shows input types and output state. logic now updates when a new link is made
Diffstat (limited to 'Gate.h')
-rw-r--r--Gate.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/Gate.h b/Gate.h
index a900b73..655c473 100644
--- a/Gate.h
+++ b/Gate.h
@@ -16,6 +16,8 @@
#ifndef GATE_H
#define GATE_H
+#include <string>
+
class Gate
{
public:
@@ -45,13 +47,14 @@ class Gate
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; };
- Gate *get_output_gate() { return this->output_gate; };
+ //Gate *get_output_gate() { return this->output_gate; };
+ std::string get_output_type_text();
void set_x(int x) { this->x = x; };
void set_y(int y) { this->y = y; };
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; };
- void set_output_gate(Gate *gate) { this->output_gate = gate; };
+ //void set_output_gate(Gate *gate) { this->output_gate = gate; };
void update_state();
private:
@@ -66,7 +69,7 @@ class Gate
/* inputs/outputs */
Gate *input_gate1;
Gate *input_gate2;
- Gate *output_gate;
+ //Gate *output_gate;
/* states */
bool output_state = false;