System::SmartPtr::SmartPtr constructor

SmartPtr::SmartPtr(const SmartPtr<Array<Y>>&, SmartPtrMode) constructor

Converts type of referenced array by creating a new array of different type. Useful if in C# there is an array type cast which is unsupported in C++.

template<typename Y> System::SmartPtr<T>::SmartPtr(const SmartPtr<Array<Y>> &src, SmartPtrMode mode=SmartPtrMode::Shared)
ParameterDescription
YType of source array.
ParameterTypeDescription
srcconst SmartPtr<Array<Y>>&Pointer to array to create a copy of, but with different type of elements.
modeSmartPtrModePointer mode.

See Also

SmartPtr::SmartPtr(const SmartPtr<P>&, Pointee_ *, SmartPtrMode) constructor

Constructs a SmartPtr which shares ownership information with the initial value of ptr, but holds an unrelated and unmanaged pointer p.

template<typename P> System::SmartPtr<T>::SmartPtr(const SmartPtr<P> &ptr, Pointee_ *p, SmartPtrMode mode=SmartPtrMode::Shared)
ParameterTypeDescription
ptrconst SmartPtr<P>&Another smart pointer to share the ownership to the ownership from.
pPointee_ *Pointer to an object to manage.
modeSmartPtrModePointer mode.

See Also

SmartPtr::SmartPtr(const SmartPtr<Q>&, SmartPtrMode) constructor

Copy constructs SmartPtr object. Both pointers point to the same object afterwards. Performs type conversion if allowed.

template<class Q,typename> System::SmartPtr<T>::SmartPtr(const SmartPtr<Q> &x, SmartPtrMode mode=SmartPtrMode::Shared)
ParameterDescription
QType of object pointed by x.
ParameterTypeDescription
xconst SmartPtr<Q>&Pointer to copy.
modeSmartPtrModePointer mode.

See Also

SmartPtr::SmartPtr(const SmartPtr_&, SmartPtrMode) constructor

Copy constructs SmartPtr object. Both pointers point to the same object afterwards.

System::SmartPtr<T>::SmartPtr(const SmartPtr_ &ptr, SmartPtrMode mode=SmartPtrMode::Shared)
ParameterTypeDescription
ptrconst SmartPtr_&Pointer to copy.
modeSmartPtrModePointer mode.

See Also

SmartPtr::SmartPtr(const Y&) constructor

Initializes empty array. Used to translate some C# code constructs.

template<typename Y,typename> System::SmartPtr<T>::SmartPtr(const Y &)
ParameterDescription
YPlaceholder of EmptyArrayInitializer type.

See Also

SmartPtr::SmartPtr(Pointee_ *, SmartPtrMode) constructor

Creates SmartPtr pointing to specified object, or converts raw pointer to SmartPtr.

System::SmartPtr<T>::SmartPtr(Pointee_ *object, SmartPtrMode mode=SmartPtrMode::Shared)
ParameterTypeDescription
objectPointee_ *Pointee.
modeSmartPtrModePointer mode.

See Also

SmartPtr::SmartPtr(SmartPtr_&&, SmartPtrMode) constructor

Move constructs SmartPtr object. Effectively, swaps two pointers, if they are both of same mode. x may be unusable after call.

System::SmartPtr<T>::SmartPtr(SmartPtr_ &&x, SmartPtrMode mode=SmartPtrMode::Shared) noexcept
ParameterTypeDescription
xSmartPtr_&&Pointer to move.
modeSmartPtrModePointer mode.

See Also

SmartPtr::SmartPtr(SmartPtrMode) constructor

Creates SmartPtr object of required mode.

System::SmartPtr<T>::SmartPtr(SmartPtrMode mode)
ParameterTypeDescription
modeSmartPtrModePointer mode.

See Also

SmartPtr::SmartPtr(std::nullptr_t, SmartPtrMode) constructor

Creates null-pointer SmartPtr object of required mode.

System::SmartPtr<T>::SmartPtr(std::nullptr_t=nullptr, SmartPtrMode mode=SmartPtrMode::Shared)
ParameterTypeDescription
modestd::nullptr_tPointer mode.

See Also