32 #include <fors_zeropoint_impl.h>
34 #include <fors_utils.h>
64 cpl_recipe *recipe = cpl_calloc(1,
sizeof *recipe );
65 cpl_plugin *plugin = &recipe->interface;
69 cpl_msg_error(cpl_func,
70 "I am fors_zeropoint version %d, but I am linking "
71 "against the FORS library version %d. "
72 "This will not work. "
73 "Please remove all previous installations "
74 "of the " PACKAGE_NAME
" and try again.",
79 cpl_plugin_init(plugin,
82 CPL_PLUGIN_TYPE_RECIPE,
84 fors_zeropoint_description_short,
85 fors_zeropoint_description,
86 fors_zeropoint_author,
93 cpl_pluginlist_append(list, plugin);
113 if (cpl_error_get_code() != CPL_ERROR_NONE) {
114 cpl_msg_error(cpl_func,
115 "CPL error code is set (%s), "
116 "refusing to create recipe fors_zeropoint",
117 cpl_error_get_message());
125 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE) {
126 recipe = (cpl_recipe *)plugin;
136 recipe->parameters = cpl_parameterlist_new();
138 fors_zeropoint_define_parameters(recipe->parameters);
140 if (cpl_error_get_code() != CPL_ERROR_NONE) {
141 cpl_msg_error(cpl_func,
142 "Could not create fors_zeropoint parameters");
161 cpl_errorstate initial_errorstate = cpl_errorstate_get();
163 if (cpl_error_get_code() != CPL_ERROR_NONE) {
164 cpl_msg_error(cpl_func,
165 "CPL error code is set (%s), "
166 "refusing to execute recipe fors_zeropoint",
167 cpl_error_get_message());
171 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE) {
172 recipe = (cpl_recipe *)plugin;
178 if (recipe->frames == NULL) {
179 cpl_msg_error(cpl_func,
184 if (recipe->parameters == NULL) {
185 cpl_msg_error(cpl_func,
186 "Null parameter list");
191 fors_zeropoint_description_short);
193 fors_zeropoint(recipe->frames, recipe->parameters);
195 return fors_end(recipe->frames, initial_errorstate);
211 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE) {
212 recipe = (cpl_recipe *)plugin;
218 cpl_parameterlist_delete(recipe->parameters);
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.
int fors_end(const cpl_frameset *frames, cpl_errorstate before_exec)
End recipe execution.
void fors_begin(cpl_frameset *frames, const char *description_short)
Start recipe execution.
static int fors_zeropoint_destroy(cpl_plugin *)
Destroy what has been created by the 'create' function.
int fors_get_version_binary(void)
Get FORS library binary version number.
static int fors_zeropoint_create(cpl_plugin *)
Setup the recipe options.
static int fors_zeropoint_exec(cpl_plugin *)
Execute the plugin instance given by the interface.
const char * fors_get_license(void)
Get the pipeline copyright and license.