template <class T> inline dword ValueTypeNo(const T&) { return StaticTypeNo<T>() + 0x8000000;; } template<> inline dword ValueTypeNo(const int&) { return INT_V; } template<> inline dword ValueTypeNo(const int64&) { return INT64_V; } template<> inline dword ValueTypeNo(const double&) { return DOUBLE_V; } template<> inline dword ValueTypeNo(const bool&) { return BOOL_V; } template<> inline dword ValueTypeNo(const String&) { return STRING_V; } template<> inline dword ValueTypeNo(const WString&) { return WSTRING_V; } template<> inline dword ValueTypeNo(const Date&) { return DATE_V; } template<> inline dword ValueTypeNo(const Time&) { return TIME_V; } template <class T, dword type, class B = EmptyClass> class AssignValueTypeNo : public B { public: friend dword ValueTypeNo(const T&) { return type; } void operator=(const AssignValueTypeNo&) {} // MSC 6.0 empty base class bug fix }; template <class T> bool IsType(const Value& x, T* = 0) { return ValueTypeNo(*(T *)NULL) == x.GetType(); } template <class T> inline bool Value::Is() const { return IsType<T>(*this); }
Report message to a moderator