Is()

ObjectExt::Is(const U&) method

Implements ‘is’ operator translation. Specialization for pointer types optimized for ‘final’ classes.

template<class T,class U> static std::enable_if<std::is_convertible<T, Object>::value &&std::is_final<T>::value &&!System::IsBoxable<T>::value &&System::IsSmartPtr<U>::value, bool>::type System::ObjectExt::Is(const U &obj)

Template parameters

ParameterDescription
TTarget type.
UTested type.

Arguments

ParameterTypeDescription
objconst U&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const U&) method

Implements ‘is’ operator translation. Specialization for pointer types.

template<class T,class U> static std::enable_if<std::is_convertible<T, Object>::value &&!std::is_final<T>::value &&!System::IsBoxable<T>::value &&System::IsSmartPtr<U>::value, bool>::type System::ObjectExt::Is(const U &obj)

Template parameters

ParameterDescription
TTarget type.
UTested type.

Arguments

ParameterTypeDescription
objconst U&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const Object&) method

Implements ‘is’ operator translation. Specialization for value types.

template<class T> static std::enable_if<std::is_convertible<T, Object>::value, bool>::type System::ObjectExt::Is(const Object &obj)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
objconst Object&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const Object&) method

Implements ‘is’ operator translation. Specialization for unconvertible types.

template<class T> static std::enable_if<!std::is_convertible<T, Object>::value, bool>::type System::ObjectExt::Is(const Object &obj)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
objconst Object&Object to test for ‘is’ operator.

Return Value

Always returns false as types are unconvertible.

ObjectExt::Is(const SmartPtr<U>&) method

Implements ‘is’ operator translation. Specialization for pointer types.

template<class T,class U> static std::enable_if<IsSmartPtr<T>::value, bool>::type System::ObjectExt::Is(const SmartPtr<U> &obj)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
objconst SmartPtr<U>&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const ExceptionWrapper<U>&) method

Implements ‘is’ operator translation. Specialization for exception wrapper types.

template<class T,class U> static std::enable_if<IsExceptionWrapper<T>::value, bool>::type System::ObjectExt::Is(const ExceptionWrapper<U> &obj)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
objconst ExceptionWrapper<U>&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const SmartPtr<Object>&) method

Implements ‘is’ operator translation. Specialization for nullable types.

template<class T> static std::enable_if<IsNullable<T>::value, bool>::type System::ObjectExt::Is(const SmartPtr<Object> &obj)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
objconst SmartPtr<Object>&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const SmartPtr<Object>&) method

Implements ‘is’ operator translation. Specialization for boxable types with == operator defined.

template<class T> static std::enable_if<System::IsBoxable<T>::value &&!IsNullable<T>::value &&!std::is_enum<T>::value &&detail::has_operator_equal<T>::value, bool>::type System::ObjectExt::Is(const SmartPtr<Object> &obj)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
objconst SmartPtr<Object>&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const SmartPtr<Object>&) method

Implements ‘is’ operator translation. Specialization for boxable types without defined ==.

template<class T> static std::enable_if<System::IsBoxable<T>::value &&!IsNullable<T>::value &&!std::is_enum<T>::value &&!detail::has_operator_equal<T>::value, bool>::type System::ObjectExt::Is(const SmartPtr<Object> &obj)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
objconst SmartPtr<Object>&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const SmartPtr<U>&) method

Implements ‘is’ operator translation. Specialization for enum types.

template<class T,class U> static std::enable_if<std::is_enum<T>::value, bool>::type System::ObjectExt::Is(const SmartPtr<U> &obj)

Template parameters

ParameterDescription
TTarget type.
UType of the pointed object.

Arguments

ParameterTypeDescription
objconst SmartPtr<U>&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const WeakPtr<U>&) method

Implements ‘is’ operator translation. Specialization for enum types vs weak pointers.

template<class T,class U> static std::enable_if<std::is_enum<T>::value, bool>::type System::ObjectExt::Is(const WeakPtr<U> &obj)

Template parameters

ParameterDescription
TTarget type.
UType of the pointed object.

Arguments

ParameterTypeDescription
objconst WeakPtr<U>&Object to test for ‘is’ operator.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const Nullable<U>&) method

Implements ‘is’ operator translation. Specialization for Nullable type.

template<class T,class U> static bool System::ObjectExt::Is(const Nullable<U> &value)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
valueconst Nullable<U>&Nullable type.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(const char16_t *) method

Implements ‘is’ operator translation. Specialization for string literal.

template<class T> static bool System::ObjectExt::Is(const char16_t *str)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
strconst char16_t *String literal.

Return Value

True if ‘is’ returns true, false otherwise.

ObjectExt::Is(int32_t) method

Implements ‘is’ operator translation. Specialization for integer literal.

template<class T> static bool System::ObjectExt::Is(int32_t value)

Template parameters

ParameterDescription
TTarget type.

Arguments

ParameterTypeDescription
valueint32_tinteger literal.

Return Value

True if ‘is’ returns true, false otherwise.

See Also