Skip to content
Snippets Groups Projects
Commit 61b3ceea authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

class rework Gridsearch.cc

parent e0f0f9b2
No related branches found
No related tags found
1 merge request!78M300433/class reworks/multiple class reworks 8
......@@ -224,28 +224,53 @@ cell_search(int gridIDsrc, int gridIDtgt)
Free(srch_add);
}
void *
Gridsearch(void *process)
class ModuleGridsearch
{
cdo_initialize(process);
int operatorID;
int gridID1;
int gridID2;
int CSEARCH, PSEARCH;
public:
void
init(void *process)
{
cdo_initialize(process);
// clang-format off
const auto PSEARCH = cdo_operator_add("testpointsearch", 0, 0, nullptr);
(void)PSEARCH;
const auto CSEARCH = cdo_operator_add("testcellsearch", 0, 0, nullptr);
// clang-format on
PSEARCH = cdo_operator_add("testpointsearch", 0, 0, nullptr);
CSEARCH = cdo_operator_add("testcellsearch", 0, 0, nullptr);
const auto operatorID = cdo_operator_id();
operatorID = cdo_operator_id();
operator_input_arg("source and target grid description file or name");
operator_check_argc(2);
operator_input_arg("source and target grid description file or name");
operator_check_argc(2);
const auto gridID1 = cdo_define_grid(cdo_operator_argv(0));
const auto gridID2 = cdo_define_grid(cdo_operator_argv(1));
gridID1 = cdo_define_grid(cdo_operator_argv(0));
gridID2 = cdo_define_grid(cdo_operator_argv(1));
}
void
run()
{
if (operatorID == CSEARCH) cell_search(gridID1, gridID2);
}
if (operatorID == CSEARCH) cell_search(gridID1, gridID2);
void
close()
{
cdo_finish();
}
};
void *
Gridsearch(void *process)
{
ModuleGridsearch gridsearch;
cdo_finish();
gridsearch.init(process);
gridsearch.run();
gridsearch.close();
return nullptr;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment