From 74d795cb074b6ae9aa93bcfacee8995d7e6d5945 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 6 May 2017 18:28:23 -0300 Subject: Streight control solver implemented Buggy, running 2x... Why?? --- Project/ControlElement.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Project/ControlElement.h') diff --git a/Project/ControlElement.h b/Project/ControlElement.h index 8e377b2..e2b9a29 100644 --- a/Project/ControlElement.h +++ b/Project/ControlElement.h @@ -63,14 +63,13 @@ class ControlElement : public Element std::vector GetNodeList() const { return m_nodeList; } virtual void DrawNodes() const; - void SetInput(double input) { m_input = input; } - double GetInput() const { return m_input; } - double GetOutput() const { return m_output; } - virtual bool Solve() { return false; } + virtual bool IsSolved() const { return m_solved; } + virtual void SetSolved(bool solved = true) { m_solved = solved; } + virtual bool Solve(double input) { return true; } + virtual double GetOutput() const { return m_output; } protected: std::vector m_nodeList; - - double m_input = 0.0; + bool m_solved = false; double m_output = 0.0; }; -- cgit