Model and BaseExpression: changed the template taking a container to std::list
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1121 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
13
src/model.h
13
src/model.h
@@ -39,7 +39,8 @@
|
||||
|
||||
#include "textstream/textstream.h"
|
||||
#include "modelconnector.h"
|
||||
|
||||
#include "dbexpression.h"
|
||||
#include "flatexpression.h"
|
||||
|
||||
|
||||
|
||||
@@ -457,8 +458,10 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
template<typename ModelClass>
|
||||
void field_list(const wchar_t * db_field_name, const wchar_t * flat_field_name, std::list<ModelClass> & field_list, bool insertable, bool updatable, bool is_primary_key)
|
||||
// template<typename ModelClass>
|
||||
// void field_list(const wchar_t * db_field_name, const wchar_t * flat_field_name, std::list<ModelClass> & field_list, bool insertable, bool updatable, bool is_primary_key)
|
||||
template<typename ModelContainer>
|
||||
void field_list(const wchar_t * db_field_name, const wchar_t * flat_field_name, ModelContainer & field_container, bool insertable, bool updatable, bool is_primary_key)
|
||||
{
|
||||
// IMPLEMENTME what about db?
|
||||
if( model_connector )
|
||||
@@ -476,14 +479,14 @@ protected:
|
||||
// IMPROVE ME
|
||||
// what about model_data and save_mode?
|
||||
// may it should be placed inside some structure?
|
||||
flat_expression->field_list(flat_field_name, field_list, insertable, updatable, is_primary_key, model_connector, model_connector_mode);
|
||||
flat_expression->field_list(flat_field_name, field_container, insertable, updatable, is_primary_key, model_connector, model_connector_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( model_connector_mode == MORM_MODEL_CONNECTOR_MODE_CLEARING_VALUE )
|
||||
{
|
||||
field_list.clear();
|
||||
field_container.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user