10 #ifndef WRENCH_CUSTOM_ACTION_H
11 #define WRENCH_CUSTOM_ACTION_H
15 #include "wrench/action/Action.h"
29 CustomAction(
const std::string& name, std::shared_ptr<CompoundJob> job,
31 unsigned long num_cores,
32 const std::function<
void (std::shared_ptr<ActionExecutor> action_executor)> &lambda_execute,
33 const std::function<
void (std::shared_ptr<ActionExecutor> action_executor)> &lambda_terminate);
39 void execute(std::shared_ptr<ActionExecutor> action_executor)
override;
40 void terminate(std::shared_ptr<ActionExecutor> action_executor)
override;
44 unsigned long num_cores;
46 std::function<void (std::shared_ptr<ActionExecutor> action_executor)> lambda_execute;
47 std::function<void (std::shared_ptr<ActionExecutor> action_executor)> lambda_terminate;
51 #endif //WRENCH_CUSTOM_ACTION_H
void execute(std::shared_ptr< ActionExecutor > action_executor) override
Method to execute the action.
Definition: CustomAction.cpp:39
A class that implements a custom action.
Definition: CustomAction.h:22
CustomAction(const std::string &name, std::shared_ptr< CompoundJob > job, double ram, unsigned long num_cores, const std::function< void(std::shared_ptr< ActionExecutor > action_executor)> &lambda_execute, const std::function< void(std::shared_ptr< ActionExecutor > action_executor)> &lambda_terminate)
Constructor.
Definition: CustomAction.cpp:27
void terminate(std::shared_ptr< ActionExecutor > action_executor) override
Method called when the action terminates.
Definition: CustomAction.cpp:47
unsigned long getMaxNumCores() const override
Returns the action's maximum number of required cores.
Definition: CustomAction.cpp:63
Definition: Action.cpp:28
unsigned long getMinNumCores() const override
Returns the action's minimum number of required cores.
Definition: CustomAction.cpp:55
double getMinRAMFootprint() const override
Returns the action's minimum required memory footprint.
Definition: CustomAction.cpp:71
An abstract class that implements the concept of an action.
Definition: Action.h:28
A compound job.
Definition: CompoundJob.h:47