Add iterate() to FunctionSequence for #6156
Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
_functions.push_back(std::move(function));
}
+void FunctionSequence::iterate(const std::function<void(IFunction &)> &fn)
+{
+ for (const auto &func : _functions)
+ {
+ fn(*func);
+ }
+}
+
} // namespace exec
} // namespace neurun
#include <memory>
#include <vector>
+#include <functional>
#include "exec/IFunction.h"
*/
void append(std::unique_ptr<IFunction> &&function);
+ void iterate(const std::function<void(IFunction &)> &fn);
+
private:
std::vector<std::unique_ptr<IFunction>> _functions;
};