#ifndef BASECOMMAND_H
#define BASECOMMAND_H

class ExecutableCommand {
public:
    ExecutableCommand() : finished(false) {
    }

    virtual ~ExecutableCommand() = default;

    virtual void Execute() = 0;

    void RequestStop() {
        stopRequested = true;
    }

    bool IsStopRequested() const {
        return stopRequested;
    }

    bool IsFinished() const {
        return finished;
    }

protected:
    void MarkFinished() {
        finished = true;
    }

    bool stopRequested = false;

private:
    bool finished;
};

#endif //BASECOMMAND_H
