diff options
author | Daniel Jones <admin@danieljon.es> | 2020-06-24 11:21:58 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-06-24 11:21:58 +0930 |
commit | 167e63926ec8b06511bc03a897731c17e4564719 (patch) | |
tree | ed2e9973277613cc787e719d7760fcd7c814f35c /Gate.h | |
parent | 7c04b3433568e54d02e5b520cdd1bdd944464f4e (diff) | |
download | foxlogicgates-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.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; |