1 #ifndef teca_programmable_algorithm_h
2 #define teca_programmable_algorithm_h
4 #include "teca_config.h"
5 #include "teca_algorithm.h"
7 #include "teca_metadata.h"
8 #include "teca_dataset.h"
14 typedef void* report_callback_t;
15 typedef void* request_callback_t;
16 typedef void* execute_callback_t;
17 typedef void* threaded_execute_callback_t;
21 unsigned int,
const std::vector<teca_metadata>&)>;
24 using request_callback_t = std::function<std::vector<teca_metadata>(
25 unsigned int,
const std::vector<teca_metadata> &,
29 using execute_callback_t = std::function<const_p_teca_dataset(
30 unsigned int,
const std::vector<const_p_teca_dataset> &,
34 using threaded_execute_callback_t = std::function<const_p_teca_dataset(
35 unsigned int,
const std::vector<const_p_teca_dataset> &,
102 {
return this->class_name; }
140 TECA_ALGORITHM_CALLBACK_PROPERTY(report_callback_t, report_callback)
153 TECA_ALGORITHM_CALLBACK_PROPERTY(request_callback_t, request_callback)
167 TECA_ALGORITHM_CALLBACK_PROPERTY(execute_callback_t, execute_callback)
183 const_p_teca_dataset execute(
185 const std::vector<const_p_teca_dataset> &input_data,
188 report_callback_t report_callback;
189 request_callback_t request_callback;
190 execute_callback_t execute_callback;
191 char class_name[128];
The interface to TECA pipeline architecture.
Definition: teca_algorithm.h:244
void set_number_of_output_ports(unsigned int n)
void set_number_of_input_connections(unsigned int n)
An algorithm implemented with user provided callbacks.
Definition: teca_programmable_algorithm.h:87
void use_default_execute_action()
void use_default_request_action()
const char * get_class_name() const override
get the name differntiating this instance in the pipeline.
Definition: teca_programmable_algorithm.h:101
void use_default_report_action()
virtual int set_name(const std::string &name)
An threaded algorithm implemented with user provided callbacks.
Definition: teca_threaded_programmable_algorithm.h:67
p_teca_error_handler error_handler TECA_EXPORT
The global error handler instance.