#ifndef MDD_OUTPUT_H
#define MDD_OUTPUT_H
#include "IOutput.h"
#include "IInput.h"
#include "IModule.h"

namespace mdd {
    class Output : public IOutput{
    private:
        state _state;
        std::vector<double> _value;
        std::string _prefix;
        std::string _type;
        int _appendix;
        std::vector<std::shared_ptr<IInput>> _connections;
        bool _optimizable;

    protected:

    public:
        Output(const std::string& type, int appendix, const std::vector<double>& initial);
        const std::vector<double>& getValue() override;
        std::vector<double>& setValue() override;
        state setValue(const std::vector<double>& val) override;
        bool isOptimizable();
        void setOptimizability(bool state);
        state getState() override;
        void resetState() override;
        std::string setType(std::string type) override;
        std::string getType() override;
        std::string getID() override;
        std::string setPrefix(std::string prefix) override;
        std::string setAppendix(int appendix) override;
        int addConnection(std::shared_ptr<IInput> input) override;
        int removeConnection(std::shared_ptr<IInput> input) override;
        bool connect(std::shared_ptr<IInput> input) override;
        std::vector<std::shared_ptr<IInput>> getConnections() override;
    };
}
#endif
