Commit d35f9902 authored by Martin Vala's avatar Martin Vala

Implemented interface

parent f4498d66
Pipeline #1443 passed with stage
in 15 minutes and 16 seconds
......@@ -19,9 +19,13 @@ public:
TaskExecutor();
virtual ~TaskExecutor();
virtual bool init() = 0;
/// Init
virtual bool init() = 0;
/// Assigne
virtual bool assigne() = 0;
virtual bool run() = 0;
virtual bool exit() = 0;
/// Running
virtual bool run() = 0;
/// Exit
virtual bool exit() = 0;
};
} // namespace Salsa
......@@ -14,5 +14,33 @@ TaskExecutorFake::~TaskExecutorFake()
/// Destructor
///
}
bool TaskExecutorFake::init()
{
///
/// Init
///
return true;
}
bool TaskExecutorFake::assigne()
{
///
/// Assigne
///
return true;
}
bool TaskExecutorFake::run()
{
///
/// Run
///
return true;
}
bool TaskExecutorFake::exit()
{
///
/// Exit
///
return true;
}
} // namespace Salsa
......@@ -18,5 +18,10 @@ class TaskExecutorFake : public TaskExecutor
public:
TaskExecutorFake();
virtual ~TaskExecutorFake();
virtual bool init();
virtual bool assigne();
virtual bool run();
virtual bool exit();
};
} // namespace Salsa
......@@ -81,6 +81,14 @@ void TaskState::task(TaskInfo * t)
mTask = t;
}
TaskExecutor * TaskState::executor()
{
///
/// Returns task executor
///
return mTaskExecutor;
}
void TaskState::killTask()
{
///
......
......@@ -30,16 +30,17 @@ public:
TaskState(TaskExecutor * te = nullptr);
virtual ~TaskState();
void id(uint32_t id);
uint32_t id() const;
void state(State s);
State state() const;
TaskInfo * task() const;
void task(TaskInfo * t);
void print(bool verbose = false) const;
void pid(uint32_t pid);
uint32_t pid() const;
void killTask();
void id(uint32_t id);
uint32_t id() const;
void state(State s);
State state() const;
TaskInfo * task() const;
void task(TaskInfo * t);
void print(bool verbose = false) const;
void pid(uint32_t pid);
uint32_t pid() const;
void killTask();
TaskExecutor * executor();
protected:
uint32_t mId = 0; ///< ID of task state
......
......@@ -14,5 +14,33 @@ TaskExecutorForkZmq::~TaskExecutorForkZmq()
/// Destructor
///
}
bool TaskExecutorForkZmq::init()
{
///
/// Init
///
return true;
}
bool TaskExecutorForkZmq::assigne()
{
///
/// Assigne
///
return true;
}
bool TaskExecutorForkZmq::run()
{
///
/// Run
///
return true;
}
bool TaskExecutorForkZmq::exit()
{
///
/// Exit
///
return true;
}
} // namespace Salsa
......@@ -18,5 +18,10 @@ class TaskExecutorForkZmq : public TaskExecutor
public:
TaskExecutorForkZmq();
virtual ~TaskExecutorForkZmq();
virtual bool init();
virtual bool assigne();
virtual bool run();
virtual bool exit();
};
} // namespace Salsa
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment