26 lines
No EOL
423 B
C++
26 lines
No EOL
423 B
C++
#pragma once
|
|
|
|
#include "Context.hpp"
|
|
|
|
|
|
namespace drp::task {
|
|
|
|
|
|
/**
|
|
* The base to define a task.
|
|
* A task is a state for the machine, defining how it shall behave.
|
|
*/
|
|
class BaseTask {
|
|
public:
|
|
virtual ~BaseTask() = default;
|
|
|
|
/**
|
|
* The handle of the task.
|
|
* Contain the behavior of that specific task.
|
|
* @param context the context to use.
|
|
*/
|
|
virtual void handle(Context& context) = 0;
|
|
};
|
|
|
|
|
|
} |