ObjectExt
Contents
[
Hide
]ObjectExt class
Provides static methods that emulate C# Object methods called for non-Object C++ types (strings, numbers, etc.). This is a static type with no instance services. You should never create instances of it by any means.
class ObjectExt : public System::ObjectType
Methods
Method | Description |
---|---|
static std::enable_if<(std::is_fundamental<To>::value), std::array<To, sizeof…(From)>>::type ArrayInitializerCast(From …) | Converts array fundamental values (which C# does implicitly but C++ apparently does not). |
static std::enable_if<std::is_enum<T>::value, System::SmartPtr<System::Object>>::type Box(const T&) | Boxes value types for converting to Object. Implementation for enum types. |
static std::enable_if<!std::is_enum<T>::value&&!IsNullable<T>::value, System::SmartPtr<System::Object>>::type Box(const T&) | Boxes value types for converting to Object. Implementation for non-enum types. |
static std::enable_if<IsNullable<T>::value, System::SmartPtr<System::Object>>::type Box(const T&) | Boxes Nullable types for converting to Object. |
static SmartPtr<Object> Box(const String&) | Boxes string values. |
static SmartPtr<System::BoxedValueBase> BoxEnum(T) | Boxes enum types for being propagated as Object. |
static SmartPtr<System::Collections::IList> CastToIList(const SmartPtr<Object>&) | |
static auto Coalesce(T0, T1) | Implementation of ‘??’ operator translation for non-nullable types. |
static T0 Coalesce(System::Nullable<T0>, T1) | Implementation of ‘??’ operator translation for nullable types. |
static std::conditional<std::is_convertible<RT2, RT1>::value, RT1, RT2>::type CoalesceInternal(RT1, F) | Implementation of ‘??’ operator translation for non-nullable types. Overload for case if RT2 is convertable to RT1. |
static std::enable_if<IsExceptionWrapper<T>::value, bool>::type Equals(const T&, const T2&) | |
static std::enable_if<IsSmartPtr<T>::value, bool>::type Equals(const T&, const T2&) | Substitution for C# Object.Equals calls working for any type in C++. Overload for smart pointer types. |
static std::enable_if<!IsExceptionWrapper<T>::value&&!IsSmartPtr<T>::value&&!std::is_scalar<T>::value, bool>::type Equals(T, const T2&) | Substitution for C# Object.Equals calls working for any type in C++. Overload for structure types. |
static std::enable_if<!IsSmartPtr<T>::value&&std::is_scalar<T>::value, bool>::type Equals(const T&, const T2&) | Substitution for C# Object.Equals calls working for any type in C++. Overload for scalar types. |
static bool Equals(const char_t(&), String) | Substitution for C# Object.Equals calls working for any type in C++. Overload for string literal with string comparison. |
static bool Equals(const float&, const float&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
static bool Equals(const double&, const double&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
static std::enable_if<System::IsBoxable<T>::value, System::SharedPtr<System::Object>>::type ExplicitCastToObject(const T&) | |
static std::enable_if<System::IsSmartPtr<T>::value, System::SharedPtr<System::Object>>::type ExplicitCastToObject(const T&) | |
static int GetHashCode(const T&) | Implements GetHashCode() calls; works on both Object subclasses and unrelated types. |
static std::enable_if<IsSmartPtr<T>::value, constSystem::TypeInfo&>::type GetType(const T&) | Implements typeof() translation. Overload for smart pointers. |
static std::enable_if<!IsExceptionWrapper<T>::value&&!IsSmartPtr<T>::value&&!std::is_fundamental<T>::value&&!std::is_enum<T>::value&&!IsNullable<T>::value, constSystem::TypeInfo&>::type GetType(const T&) | Implements typeof() translation. Overload for structures. |
static std::enable_if<IsExceptionWrapper<T>::value, constSystem::TypeInfo&>::type GetType(const T&) | Implements typeof() translation. Overload for exceptions. |
static std::enable_if<std::is_fundamental<T>::value | |
static std::enable_if<IsNullable<T>::value, constSystem::TypeInfo&>::type GetType(const T) | Implements typeof() translation. Overload for Nullable types. |
static std::enable_if<std::is_fundamental<T>::value&&!std::is_enum<T>::value, constSystem::TypeInfo&>::type GetType() | Implements typeof() translation. Overload for primitive types. |
static std::enable_if<std::is_enum<T>::value, constSystem::TypeInfo&>::type GetType() | Implements typeof() translation. Overload for enum types. |
static std::enable_if<(!std::is_fundamental<T>::value&&!std::is_enum<T>::value&&!IsBoxable<T>::value) | |
static std::enable_if<IsNullable<T>::value, constSystem::TypeInfo&>::type GetType() | Implements typeof() translation. Overload for Nullable. |
static std::enable_if<detail::is_a<T, MulticastDelegate>::value, constSystem::TypeInfo&>::type GetType() | Implements typeof() translation. Overload for MutlicastDelegate. |
static std::enable_if<!std::is_fundamental<T>::value&&!std::is_enum<T>::value&&IsBoxable<T>::value&&!detail::is_a<T, MulticastDelegate>::value&&!IsNullable<T>::value, constSystem::TypeInfo&>::type GetType() | Implements typeof() translation. Overload for structures and pointers. |
static const System::TypeInfo& GetType(const String&) | Implements typeof() translation. Overload for string type. |
static const System::TypeInfo& GetType() | Implements typeof() translation. Overload for uint8_t. |
static const System::TypeInfo& GetType() | Implements typeof() translation. Overload for uint8_t. |
static const System::TypeInfo& GetType() | Implements typeof() translation. Overload for uint8_t. |
static const System::TypeInfo& GetType() | Implements typeof() translation. Overload for uint8_t. |
static const System::TypeInfo& GetType() | Implements typeof() translation. Overload for uint8_t. |
static const System::TypeInfo& GetType() | Implements typeof() translation. Overload for uint8_t. |
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 Is(const U&) | Implements ‘is’ operator translation. Specialization for pointer types optimized for ‘final’ classes. |
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 Is(const U&) | Implements ‘is’ operator translation. Specialization for pointer types. |
static std::enable_if<std::is_convertible<T, Object>::value, bool>::type Is(const Object&) | Implements ‘is’ operator translation. Specialization for value types. |
static std::enable_if<!std::is_convertible<T, Object>::value, bool>::type Is(const Object&) | Implements ‘is’ operator translation. Specialization for unconvertible types. |
static std::enable_if<IsSmartPtr<T>::value, bool>::type Is(const SmartPtr<U>&) | Implements ‘is’ operator translation. Specialization for pointer types. |
static std::enable_if<IsExceptionWrapper<T>::value, bool>::type Is(const ExceptionWrapper<U>&) | Implements ‘is’ operator translation. Specialization for exception wrapper types. |
static std::enable_if<IsNullable<T>::value, bool>::type Is(const SmartPtr<Object>&) | Implements ‘is’ operator translation. Specialization for nullable types. |
static std::enable_if<System::IsBoxable<T>::value&&!IsNullable<T>::value&&!std::is_enum<T>::value&&detail::has_operator_equal<T>::value, bool>::type Is(const SmartPtr<Object>&) | Implements ‘is’ operator translation. Specialization for boxable types with == operator defined. |
static std::enable_if<System::IsBoxable<T>::value&&!IsNullable<T>::value&&!std::is_enum<T>::value&&!detail::has_operator_equal<T>::value, bool>::type Is(const SmartPtr<Object>&) | Implements ‘is’ operator translation. Specialization for boxable types without defined ==. |
static std::enable_if<std::is_enum<T>::value, bool>::type Is(const SmartPtr<U>&) | Implements ‘is’ operator translation. Specialization for enum types. |
static std::enable_if<std::is_enum<T>::value, bool>::type Is(const WeakPtr<U>&) | Implements ‘is’ operator translation. Specialization for enum types vs weak pointers. |
static bool Is(const Nullable<U>&) | Implements ‘is’ operator translation. Specialization for Nullable type. |
static bool Is(const char16_t *) | Implements ‘is’ operator translation. Specialization for string literal. |
static bool Is(int32_t) | Implements ‘is’ operator translation. Specialization for integer literal. |
static bool IsBoxedValue(const SmartPtr<Object>&) | Checks if object is a boxed value. |
static std::enable_if<IsSmartPtr<T>::value, T>::type ObjectToUnknown(SmartPtr<Object>) | Converts Object to unknown type, handling both smart pointer type and bpxed value situations. |
static std::enable_if<!IsSmartPtr<T>::value, T>::type ObjectToUnknown(SmartPtr<Object>) | Converts Object to unknown type, handling both smart pointer type and boxed value situations. |
static String ToString(const char_t *) | Substitution for C# ToString method to work on any C++ type. |
static String ToString(const Nullable<T>&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<std::is_enum<T>::value, String>::type ToString(const T&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<IsSmartPtr<T>::value, String>::type ToString(const T&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<IsSmartPtr<T>::value | |
static std::enable_if<!IsSmartPtr<T>::value&&std::is_scalar<T>::value&&!std::is_enum<T>::value, String>::type ToString(T&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<!IsSmartPtr<T>::value&&std::is_scalar<T>::value&&!std::is_enum<T>::value, String>::type ToString(T&&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<!IsExceptionWrapper<T>::value&&!IsSmartPtr<T>::value&&!std::is_scalar<T>::value&&!IsNullable<T>::value, String>::type ToString(T&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<!IsSmartPtr<T>::value&&!std::is_scalar<T>::value&&!IsNullable<T>::value, String>::type ToString(const T&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<!IsSmartPtr<T>::value&&!std::is_scalar<T>::value&&!IsNullable<T>::value&&!std::is_reference<T>::value, String>::type ToString(T&&) | Substitution for C# ToString method to work on any C++ type. |
static std::enable_if<std::is_enum<T>::value, T>::type Unbox(const SmartPtr<Object>&) | Unboxes value types after converting to Object. Implementation for enum types. |
static std::enable_if<!std::is_enum<T>::value&&detail::has_operator_equal<T>::value, T>::type Unbox(const SmartPtr<Object>&) | Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types. |
static std::enable_if<!std::is_enum<T>::value&&!detail::has_operator_equal<T>::value, T>::type Unbox(const SmartPtr<Object>&) | Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types. |
static std::enable_if<std::is_enum<E>::value&&std::numeric_limits<T>::is_integer, T>::type Unbox(E) | Unboxes enum types to integer. |
static std::enable_if<std::is_enum<E>::value&&std::is_enum<T>::value, T>::type Unbox(E) | Converts enum types. |
static String Unbox(const SmartPtr<Object>&) | Unboxes string values. |
static String UnboxStringSafe(const SmartPtr<Object>&) | Unboxes string from boxed value. |
static Nullable<T> UnboxToNullable(const SmartPtr<Object>&, bool) | Unboxes object to nullable type. |
static std::enable_if<!std::is_scalar<T>::value, bool>::type UnknownIsNull(T) | Checks whether unknown type object is nullptr. Overload for non-scalar types. |
static std::enable_if<std::is_scalar<T>::value, bool>::type UnknownIsNull(T) | Checks whether unknown type object is nullptr. Overload for scalar types. |
static std::enable_if<IsSmartPtr<T>::value, System::SmartPtr<Object>>::type UnknownToObject(T) | Converts unknown type to Object, handling both smart pointer type and value type situations. |
static std::enable_if<!IsSmartPtr<T>::value, System::SmartPtr<Object>>::type UnknownToObject(const T&) | Converts unknown type to Object, handling both smart pointer type and value type situations. |
See Also
- Class ObjectType
- Namespace System
- Library Aspose.Slides