methods Model::get_raw_value(...) now returns boolean - true if a field was found
This commit is contained in:
13
src/model.h
13
src/model.h
@@ -255,14 +255,14 @@ public:
|
||||
Model * get_model(const wchar_t * db_field_name, const wchar_t * flat_field_name, bool put_log_if_not_found = true);
|
||||
ModelWrapper * get_model_wrapper(const wchar_t * db_field_name, const wchar_t * flat_field_name, bool put_log_if_not_found = true);
|
||||
|
||||
void get_raw_value(const wchar_t * db_field_name, const wchar_t * flat_field_name, pt::TextStream & stream, bool clear_stream = true, bool put_log_if_not_found = true);
|
||||
void get_raw_value(const wchar_t * db_field_name, const wchar_t * flat_field_name, ModelData * model_data, pt::TextStream & stream, bool clear_stream = true, bool put_log_if_not_found = true);
|
||||
bool get_raw_value(const wchar_t * db_field_name, const wchar_t * flat_field_name, pt::TextStream & stream, bool clear_stream = true, bool put_log_if_not_found = true);
|
||||
bool get_raw_value(const wchar_t * db_field_name, const wchar_t * flat_field_name, ModelData * model_data, pt::TextStream & stream, bool clear_stream = true, bool put_log_if_not_found = true);
|
||||
|
||||
|
||||
|
||||
#ifdef MORM_HAS_EZC_LIBRARY
|
||||
template<typename FunInfoStreamType>
|
||||
void get_raw_value(const wchar_t * db_field_name, const wchar_t * flat_field_name, ModelData * model_data,
|
||||
bool get_raw_value(const wchar_t * db_field_name, const wchar_t * flat_field_name, ModelData * model_data,
|
||||
Ezc::FunInfo<FunInfoStreamType> & fun_info, pt::TextStream & stream, bool clear_stream = true)
|
||||
{
|
||||
if( clear_stream )
|
||||
@@ -295,6 +295,7 @@ public:
|
||||
}
|
||||
|
||||
model_env = nullptr;
|
||||
return model_env_local.was_field_found;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -760,6 +761,8 @@ protected:
|
||||
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( model_env->stream )
|
||||
{
|
||||
(*model_env->stream) << field_value;
|
||||
@@ -890,6 +893,8 @@ protected:
|
||||
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<FunInfoStreamType>) == *model_env->ezc_fun_info_typeinfo )
|
||||
{
|
||||
Ezc::FunInfo<FunInfoStreamType> * ezc_fun_info = reinterpret_cast<Ezc::FunInfo<FunInfoStreamType>*>(model_env->ezc_fun_info);
|
||||
@@ -928,6 +933,7 @@ protected:
|
||||
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;
|
||||
model_env->ezc_fun_result = (model_env->model->*method)();
|
||||
}
|
||||
}
|
||||
@@ -954,6 +960,7 @@ protected:
|
||||
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;
|
||||
model_env->ezc_fun_result = (model_env->model->*method)();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user