+template<typename T>
+void Tool::set_run(Task *(*f)(const T &))
+{
+ set_run([f](const Target &t){ return f(dynamic_cast<const T &>(t)); });
+}
+
+template<typename T>
+void Tool::set_run_internal(bool (*f)(const T &))
+{
+ set_run([f](const Target &t){
+ const T &ct = dynamic_cast<const T &>(t);
+ return new InternalTask([f, &ct]{ return f(ct); });
+ });
+}
+
+