1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef MDD_OUTPUT_H
- #define MDD_OUTPUT_H
- #include "IOutput.h"
- #include "IModule.h"
- namespace mdd {
- class Output : public IOutput{
- private:
- state _state;
- std::vector<double> _value;
- std::string _name;
- int _appendix;
- std::vector<std::shared_ptr<IInput>> _connections;
- bool _optimizable;
- IModule* _parent;
- protected:
- std::string type;
- std::string key;
- public:
- Output(IModule* parent, const std::string& name, 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 getType() override;
- std::string getGeneratorKey() override;
- std::string setName(const std::string& name) override;
- std::string getName() override;
- std::string setAppendix(int appendix) override;
- int getAppendix() override;
- std::string getID() override;
- std::string getParentID() 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;
- void disconnect() override;
- bool configure(const std::string& config) override;
- std::string getConfiguration() override;
- void load(const json& j) override;
- json dump() override;
- };
- }
- #endif
|