diff options
Diffstat (limited to 'Project/Sum.h')
-rw-r--r-- | Project/Sum.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/Project/Sum.h b/Project/Sum.h index 72a71a5..3a5e289 100644 --- a/Project/Sum.h +++ b/Project/Sum.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + #ifndef SUM_H #define SUM_H @@ -8,7 +25,7 @@ class ConnectionLine; class Sum : public ControlElement { -public: + public: enum Signal { SIGNAL_POSITIVE = 0, SIGNAL_NEGATIVE }; Sum(int id); ~Sum(); @@ -18,20 +35,19 @@ public: virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); } virtual bool ShowForm(wxWindow* parent, Element* element); virtual void Rotate(bool clockwise = true); - + virtual std::vector<Signal> GetSignalList() const { return m_signalList; } virtual void SetSignalList(std::vector<Signal> signalList) { m_signalList = signalList; } - virtual bool Solve(double input, double timeStep); - + virtual void UpdatePoints(); void AddInNode(); void RemoveInNode(); - + virtual Element* GetCopy(); -protected: + protected: std::vector<Signal> m_signalList; }; -#endif // SUM_H +#endif // SUM_H |