WIP: add a Val struct as an input/output when calling a function

This commit is contained in:
2024-12-11 17:30:13 +01:00
parent 4f8ef38002
commit 04144e81be
2 changed files with 9 additions and 9 deletions

View File

@@ -285,13 +285,13 @@ public:
model_env->model_data = model_data;
model_env->stream = &stream;
model_env->ezc_fun_info = &fun_info;
model_env->ezc_fun_info_typeinfo = &typeid(fun_info);
model_env->ezc_fun_info_typeinfo = &typeid(fun_info); // now we don't need to check types, Env is not a template now
model_env->model = this;
try
{
fields();
fun_info.res = model_env->ezc_fun_result;
//fun_info.res = model_env->ezc_fun_result;
}
catch(...)
{
@@ -800,7 +800,7 @@ protected:
}
#ifdef MORM_HAS_EZC_LIBRARY
model_env->ezc_fun_result = convert_to_bool(field_value);
//model_env->ezc_fun_result = convert_to_bool(field_value);
#endif
}
}
@@ -971,7 +971,7 @@ protected:
{
Ezc::Env * ezc_fun_info = reinterpret_cast<Ezc::Env*>(model_env->ezc_fun_info);
(model_env->model->*method)(*ezc_fun_info);
model_env->ezc_fun_result = ezc_fun_info->res; // ezc_fun_info->res is overwritten in get_raw_value() after fields() method call so we have to remember it in model_env
//model_env->ezc_fun_result = ezc_fun_info->res; // ezc_fun_info->res is overwritten in get_raw_value() after fields() method call so we have to remember it in model_env
}
else
{
@@ -1006,7 +1006,7 @@ protected:
(is_empty_field(model_env->flat_field_name) || is_the_same_field(flat_field_name, model_env->flat_field_name)) )
{
model_env->was_field_found = true;
model_env->ezc_fun_result = (model_env->model->*method)();
//model_env->ezc_fun_result = (model_env->model->*method)();
}
}
}
@@ -1033,7 +1033,7 @@ protected:
(is_empty_field(model_env->flat_field_name) || is_the_same_field(flat_field_name, model_env->flat_field_name)) )
{
model_env->was_field_found = true;
model_env->ezc_fun_result = (model_env->model->*method)();
//model_env->ezc_fun_result = (model_env->model->*method)();
}
}
}

View File

@@ -98,7 +98,7 @@ public:
#ifdef MORM_HAS_EZC_LIBRARY
void * ezc_fun_info;
bool ezc_fun_result;
//bool ezc_fun_result;
const std::type_info * ezc_fun_info_typeinfo;
#endif
@@ -157,7 +157,7 @@ public:
#ifdef MORM_HAS_EZC_LIBRARY
ezc_fun_info = e.ezc_fun_info;
ezc_fun_result = e.ezc_fun_result;
//ezc_fun_result = e.ezc_fun_result;
ezc_fun_info_typeinfo = e.ezc_fun_info_typeinfo;
#endif
@@ -216,7 +216,7 @@ public:
#ifdef MORM_HAS_EZC_LIBRARY
ezc_fun_info = nullptr;
ezc_fun_result = false;
//ezc_fun_result = false;
ezc_fun_info_typeinfo = nullptr;
#endif
}