/* * Copyright (C) 2017 Thales Lima Oliveira * * 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 . */ #ifndef CONTROLELEMENTCONTAINER_H #define CONTROLELEMENTCONTAINER_H #include class ControlEditor; class ControlElement; #include "ConnectionLine.h" #include "Constant.h" #include "Exponential.h" #include "Gain.h" #include "IOControl.h" #include "Limiter.h" #include "Multiplier.h" #include "RateLimiter.h" #include "Sum.h" #include "TransferFunction.h" #include "Divider.h" #include "MathExpression.h" /** * @class ControlElementContainer * @author Thales Lima Oliveira * @date 05/10/2017 * @brief Class that can contain all control elements. * Can identify (using RTTI) the elements from a generic list and store them separately. * @file ControlElementContainer.h */ class ControlElementContainer { public: ControlElementContainer(); ~ControlElementContainer(); virtual void FillContainer(ControlEditor* editor); virtual void FillContainer(std::vector controlElementList, std::vector connectionLineList); virtual void GetContainerCopy(std::vector& controlElementList, std::vector& connectionLineList); virtual void ClearContainer(); std::vector GetControlElementsList() const { return m_ctrlElementsList; } std::vector GetConnectionLineList() const { return m_cLineList; } std::vector GetConstantList() const { return m_constantList; } std::vector GetExponentialList() const { return m_exponentialList; } std::vector GetGainList() const { return m_gainList; } std::vector GetIOControlList() const { return m_ioControlList; } std::vector GetLimiterList() const { return m_limiterList; } std::vector GetMultiplierList() const { return m_multiplierList; } std::vector GetRateLimiterList() const { return m_rateLimiterList; } std::vector GetSumList() const { return m_sumList; } std::vector GetTFList() const { return m_tfList; } std::vector GetDividerList() const { return m_dividerList; } std::vector GetMathExprList() const { return m_mathExprList; } protected: std::vector m_ctrlElementsList; std::vector m_constantList; std::vector m_cLineList; std::vector m_exponentialList; std::vector m_gainList; std::vector m_ioControlList; std::vector m_limiterList; std::vector m_multiplierList; std::vector m_rateLimiterList; std::vector m_sumList; std::vector m_tfList; std::vector m_dividerList; std::vector m_mathExprList; }; #endif // CONTROLELEMENTCONTAINER_H