use Ezc::Env instead of Ezc::FunInfo

Ezc::FunInfo has been renamed to Ezc::Env in the pikotools library.
This commit is contained in:
2024-12-06 17:07:58 +01:00
parent af242dfba6
commit 4f8ef38002

View File

@@ -51,7 +51,7 @@
#include "wrapper.h"
#ifdef MORM_HAS_EZC_LIBRARY
#include "funinfo.h"
#include "env.h"
#endif
@@ -81,13 +81,13 @@
#ifdef MORM_HAS_EZC_LIBRARY
#define MORM_MODEL_MEMBER_FIELD_EZC(ClassName) \
void field(const wchar_t * field_name, void (ClassName::*method)(Ezc::FunInfo &), const morm::FT & field_type = morm::FT::default_type) \
void field(const wchar_t * field_name, void (ClassName::*method)(Ezc::Env &), const morm::FT & field_type = morm::FT::default_type) \
{ \
field(field_name, field_name, method, field_type); \
} \
void field(const wchar_t * db_field_name, const wchar_t * flat_field_name, void (ClassName::*method)(Ezc::FunInfo &), const morm::FT & field_type = morm::FT::default_type) \
void field(const wchar_t * db_field_name, const wchar_t * flat_field_name, void (ClassName::*method)(Ezc::Env &), const morm::FT & field_type = morm::FT::default_type) \
{ \
typedef void (Model::*ModelMember)(Ezc::FunInfo &); \
typedef void (Model::*ModelMember)(Ezc::Env &); \
ModelMember model_member = static_cast<ModelMember>(method); \
field_member_ezc(db_field_name, flat_field_name, model_member, field_type); \
} \
@@ -268,7 +268,7 @@ public:
#ifdef MORM_HAS_EZC_LIBRARY
bool get_raw_value(const wchar_t * db_field_name, const wchar_t * flat_field_name, ModelData * model_data,
Ezc::FunInfo & fun_info, pt::Stream & stream, bool clear_stream = true)
Ezc::Env & fun_info, pt::Stream & stream, bool clear_stream = true)
{
if( clear_stream )
{
@@ -938,7 +938,7 @@ protected:
#ifdef MORM_HAS_EZC_LIBRARY
void field_member_ezc(const wchar_t * db_field_name, const wchar_t * flat_field_name, void (Model::*method)(Ezc::FunInfo &), const FT & field_type)
void field_member_ezc(const wchar_t * db_field_name, const wchar_t * flat_field_name, void (Model::*method)(Ezc::Env &), const FT & field_type)
{
if( model_connector && model_env && model_env->ezc_fun_info && model_env->ezc_fun_info_typeinfo && model_env->model )
{
@@ -960,16 +960,16 @@ protected:
}
void field_member_ezc_put_field_value_to_stream(const wchar_t * db_field_name, const wchar_t * flat_field_name, void (Model::*method)(Ezc::FunInfo &), const FT & field_type)
void field_member_ezc_put_field_value_to_stream(const wchar_t * db_field_name, const wchar_t * flat_field_name, void (Model::*method)(Ezc::Env &), const FT & field_type)
{
if( (is_empty_field(model_env->db_field_name) || is_the_same_field(db_field_name, model_env->db_field_name)) &&
(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;
if( typeid(Ezc::FunInfo) == *model_env->ezc_fun_info_typeinfo )
if( typeid(Ezc::Env) == *model_env->ezc_fun_info_typeinfo )
{
Ezc::FunInfo * ezc_fun_info = reinterpret_cast<Ezc::FunInfo*>(model_env->ezc_fun_info);
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
}