From 167e63926ec8b06511bc03a897731c17e4564719 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 24 Jun 2020 11:21:58 +0930 Subject: 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 --- Gate.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Gate.h') 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 + 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; -- cgit v1.2.3