| 53 | } |
| 54 | |
| 55 | std::shared_ptr<core::Processor> ExecutionPlan::addCallback(void *obj, |
| 56 | std::function<void(core::ProcessSession*, core::ProcessContext *)> ontrigger_callback, |
| 57 | std::function<void(core::ProcessContext *)> onschedule_callback) { |
| 58 | |
| 59 | if (finalized) { |
| 60 | return nullptr; |
| 61 | } |
| 62 | |
| 63 | auto proc = createCallback(obj, ontrigger_callback, onschedule_callback); |
| 64 | |
| 65 | if (!proc) |
| 66 | return nullptr; |
| 67 | |
| 68 | return addProcessor(proc, CallbackProcessorName, core::Relationship("success", "description"), true); |
| 69 | } |
| 70 | |
| 71 | bool ExecutionPlan::setProperty(const std::shared_ptr<core::Processor>& proc, const std::string &prop, const std::string &value) { |
| 72 | uint32_t i = 0; |
no test coverage detected