Files
Sourcetrail/src/lib/utility/scheduling/TaskDecoratorRepeat.h
T
mlangkabel a1dd1a77c9 logic: allow the user to discard an aborted indexer run
* keep old database on filesystem while indexing
* migrate old ".coatiproject" settings to new ".srctrlprj" extension when loading project
* send new errors in MessageErrorCountUpdate after injecting
* recheck filepath exist() in FileSystem's remove, rename, copy and create functions
* updated tasks to new "override" policy
2018-07-03 18:54:53 +02:00

31 lines
730 B
C++

#ifndef TASK_DECORATOR_REPEAT_H
#define TASK_DECORATOR_REPEAT_H
#include <vector>
#include "utility/scheduling/TaskDecorator.h"
#include "utility/scheduling/TaskRunner.h"
class TaskDecoratorRepeat
: public TaskDecorator
{
public:
enum ConditionType
{
CONDITION_WHILE_SUCCESS
};
TaskDecoratorRepeat(ConditionType condition, TaskState exitState);
private:
void doEnter(std::shared_ptr<Blackboard> blackboard) override;
TaskState doUpdate(std::shared_ptr<Blackboard> blackboard) override;
void doExit(std::shared_ptr<Blackboard> blackboard) override;
void doReset(std::shared_ptr<Blackboard> blackboard) override;
const ConditionType m_condition;
const TaskState m_exitState;
};
#endif // TASK_DECORATOR_REPEAT_H