FT field_type changed to const FT & field_type in functions arguments

This commit is contained in:
2021-05-12 04:53:23 +02:00
parent c7797ff2f1
commit aadc5be350
14 changed files with 235 additions and 235 deletions

View File

@@ -76,7 +76,7 @@ public:
template<typename FieldValue>
void field(const wchar_t * field_name, const FieldValue & field_value, FT field_type, ModelEnv * model_env)
void field(const wchar_t * field_name, const FieldValue & field_value, const FT & field_type, ModelEnv * model_env)
{
if( out_stream && can_field_be_generated(field_type) )
{
@@ -127,7 +127,7 @@ public:
template<typename FieldValue>
void put_field_value_or_null(const FieldValue & field_value, FT field_type, ModelEnv * model_env)
void put_field_value_or_null(const FieldValue & field_value, const FT & field_type, ModelEnv * model_env)
{
if( field_type.is_primary_key() )
{
@@ -164,7 +164,7 @@ public:
template<typename ModelContainer>
void field_list(const wchar_t * field_name, ModelContainer & field_value, FT field_type, ModelConnector * model_connector, ModelEnv * model_env)
void field_list(const wchar_t * field_name, ModelContainer & field_value, const FT & field_type, ModelConnector * model_connector, ModelEnv * model_env)
{
if( out_stream && can_field_be_generated(field_type) )
{
@@ -187,7 +187,7 @@ public:
}
template<typename ModelClass>
void field_model(const wchar_t * field_name, ModelClass & field_model, FT field_type, ModelEnv * model_env)
void field_model(const wchar_t * field_name, ModelClass & field_model, const FT & field_type, ModelEnv * model_env)
{
if( out_stream && can_field_be_generated(field_type) )
{
@@ -215,7 +215,7 @@ public:
}
template<typename FieldValue>
void field_to_stream(PT::TextStream & stream, const wchar_t * field_name, const FieldValue & field_value, FT field_type, ModelEnv * model_env)
void field_to_stream(PT::TextStream & stream, const wchar_t * field_name, const FieldValue & field_value, const FT & field_type, ModelEnv * model_env)
{
this->out_stream = &stream;
field(field_name, field_value, field_type, model_env);
@@ -247,35 +247,35 @@ public:
* esc for: signed char, wchar_t, char16_t, char32_t
*
*/
virtual void esc(char val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(unsigned char val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(char val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(unsigned char val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(wchar_t val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(wchar_t val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(const std::wstring & val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const wchar_t * val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const std::wstring & val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(const wchar_t * val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(const std::string & val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const char * val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const std::string & val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(const char * val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(bool val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(short val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(unsigned short val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(int val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(unsigned int val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(long val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(unsigned long val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(long long val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(unsigned long long val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(float val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(double val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(long double val, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(bool val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(short val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(unsigned short val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(int val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(unsigned int val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(long val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(unsigned long val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(long long val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(unsigned long long val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(float val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(double val, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(long double val, PT::TextStream & stream, const FT & field_type = FT::default_type);
//virtual void esc(void* val, PT::TextStream & stream);
virtual void esc(const PT::Date & date, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const PT::TextStream & val,PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const PT::WTextStream & val,PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const PT::Space & space, PT::TextStream & stream, FT field_type = FT::default_type);
virtual void esc(const PT::Date & date, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(const PT::TextStream & val,PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(const PT::WTextStream & val,PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual void esc(const PT::Space & space, PT::TextStream & stream, const FT & field_type = FT::default_type);
virtual bool is_long_field_name(const wchar_t * field_name);
virtual bool is_long_field_name(const PT::TextStream & table_name);
@@ -294,17 +294,17 @@ protected:
virtual void before_generate_from_model();
virtual void after_generate_from_model();
virtual bool can_field_be_generated(FT);
virtual bool can_field_be_generated(const FT &);
virtual void field_before();
virtual void field_after();
virtual void put_field_name(const wchar_t * field_name, FT field_type, ModelEnv * model_env);
virtual void put_field_name(const wchar_t * field_name, const FT & field_type, ModelEnv * model_env);
virtual void save_foreign_key(const wchar_t * field_name, FT field_type, ModelEnv * model_env);
virtual void save_foreign_key(const wchar_t * field_name, const FT & field_type, ModelEnv * model_env);
virtual void dump_additional_info(Model & model);
template<typename FieldValue>
void put_field_value(const FieldValue & field_value, FT field_type)
void put_field_value(const FieldValue & field_value, const FT & field_type)
{
if( out_stream )
{
@@ -632,37 +632,37 @@ protected:
virtual void put_long_field_name(const wchar_t * field_name);
virtual void put_short_field_name(const wchar_t * field_name, ModelEnv * model_env);
virtual void before_field_value(const std::wstring &, FT field_type);
virtual void after_field_value(const std::wstring &, FT field_type);
virtual void before_field_value(const std::wstring &, const FT & field_type);
virtual void after_field_value(const std::wstring &, const FT & field_type);
virtual void before_field_value(const std::string &, FT field_type);
virtual void after_field_value(const std::string &, FT field_type);
virtual void before_field_value(const std::string &, const FT & field_type);
virtual void after_field_value(const std::string &, const FT & field_type);
virtual void before_field_value(const wchar_t *, FT field_type);
virtual void after_field_value(const wchar_t *, FT field_type);
virtual void before_field_value(const wchar_t *, const FT & field_type);
virtual void after_field_value(const wchar_t *, const FT & field_type);
virtual void before_field_value(const char *, FT field_type);
virtual void after_field_value(const char *, FT field_type);
virtual void before_field_value(const char *, const FT & field_type);
virtual void after_field_value(const char *, const FT & field_type);
virtual void before_field_value(wchar_t, FT field_type);
virtual void after_field_value(wchar_t, FT field_type);
virtual void before_field_value(wchar_t, const FT & field_type);
virtual void after_field_value(wchar_t, const FT & field_type);
virtual void before_field_value(char, FT field_type);
virtual void after_field_value(char, FT field_type);
virtual void before_field_value(char, const FT & field_type);
virtual void after_field_value(char, const FT & field_type);
virtual void before_field_value(const PT::Date &, FT field_type);
virtual void after_field_value(const PT::Date &, FT field_type);
virtual void before_field_value(const PT::Date &, const FT & field_type);
virtual void after_field_value(const PT::Date &, const FT & field_type);
virtual void before_field_value(const PT::Space &, FT field_type);
virtual void after_field_value(const PT::Space &, FT field_type);
virtual void before_field_value(const PT::Space &, const FT & field_type);
virtual void after_field_value(const PT::Space &, const FT & field_type);
template<typename FieldValue>
void before_field_value(const FieldValue &, FT field_type)
void before_field_value(const FieldValue &, const FT & field_type)
{
}
template<typename FieldValue>
void after_field_value(const FieldValue &, FT field_type)
void after_field_value(const FieldValue &, const FT & field_type)
{
}
@@ -714,13 +714,13 @@ protected:
virtual void before_field_value_string(FT field_type);
virtual void after_field_value_string(FT field_type);
virtual void before_field_value_string(const FT & field_type);
virtual void after_field_value_string(const FT & field_type);
char char_to_hex_part(char c);
void char_to_hex(char c, PT::TextStream & stream);
void esc(const wchar_t * val, bool has_known_length, size_t len, PT::TextStream & stream, FT field_type = FT::default_type);
void esc(const wchar_t * val, bool has_known_length, size_t len, PT::TextStream & stream, const FT & field_type = FT::default_type);
};