diff --git a/uppsrc/Core/Format.h b/uppsrc/Core/Format.h index 581af444a..1a33bf0d3 100644 --- a/uppsrc/Core/Format.h +++ b/uppsrc/Core/Format.h @@ -30,7 +30,6 @@ template<> inline String AsString(const long& a) { return FormatInt64 template<> inline String AsString(const unsigned long& a) { return Format64(a); } template<> inline String AsString(const double& a) { return FormatDouble(a); } template<> inline String AsString(const float& a) { return FormatDouble(a); } -//template<> inline String AsString(const bool& a) { return FormatBool(a); } // TRC: moved to String.h by CXL template<> inline String AsString(const int64& a) { return FormatInt64(a); } template<> inline String AsString(const uint64& a) { return Format64(a); } diff --git a/uppsrc/Core/Value.h b/uppsrc/Core/Value.h index ca7335474..cc896aba6 100644 --- a/uppsrc/Core/Value.h +++ b/uppsrc/Core/Value.h @@ -206,6 +206,16 @@ inline bool operator==(const wchar *x, const Value& v) { return (WString)v == x inline bool operator!=(const Value& v, const wchar *x) { return (WString)v != x; } inline bool operator!=(const wchar *x, const Value& v) { return (WString)v != x; } +inline bool IsVoidValueTypeNo(int q) { return q == VOID_V; } +inline bool IsErrorValueTypeNo(int q) { return q == ERROR_V; } +inline bool IsStringValueTypeNo(int q) { return q == STRING_V || q == WSTRING_V; } + +inline bool IsIntegerValueTypeNo(int q) { return q == INT_V || q == INT64_V || q == BOOL_V; } +inline bool IsFloatValueTypeNo(int q) { return q == DOUBLE_V; } + +inline bool IsNumberValueTypeNo(int q) { return IsIntegerValueTypeNo(q) || IsFloatValueTypeNo(q); } +inline bool IsDateTimeValueTypeNo(int q) { return q == DATE_V || q == TIME_V; } + inline bool IsVoid(const Value& v) { return v.GetType() == VOID_V; } inline bool IsError(const Value& v) { return v.GetType() == ERROR_V; } inline bool IsString(const Value& v) { return v.GetType() == STRING_V || v.GetType() == WSTRING_V; }