#ifndef MDD_PROCESSORSTANDARD_H
#define MDD_PROCESSORSTANDARD_H
#include "ProcessorBase.h"
#include "Output.h"
#include <chrono>
namespace mdd {
    enum priority {
        MANUAL,
        STATIC,
        DYNAMIC,
        TIME
    };

    class ProcessorStandard : public ProcessorBase {
    private:
        struct module_priority{
            std::shared_ptr<IModule> module_ptr;
            size_t inputCounter;
            size_t changeCounter;
            size_t outputCounter;
            int time_priority;
            module_priority(std::shared_ptr<IModule> module, size_t inputs = 0, size_t outputs = 0, size_t change = 0);
        };
        std::vector<module_priority> _priority_list;

    public:
        int maxIterations;
        priority priorityEvaluation;

        ProcessorStandard(priority priorityEvaluation = MANUAL, int maxIterations = -1);
        std::string addModule(std::shared_ptr<IModule> module) override;
        void removeModule(std::shared_ptr<IModule> module) override;
        std::vector<std::shared_ptr<IModule>> getModulePriority();
        state update() override;
        std::shared_ptr<IOutput> getIteration();
    };
}

#endif //MDD_PROCESSORMANUAL_H
