System::Ref method

System::Ref(DynamicWeakPtr<T, trunkMode, weakLeafs…>&) method

Creates reference to DynamicWeakPtr object. Used by translator when passing function arguments by reference.

template<typename T,SmartPtrMode,unsigned int ...> DynamicWeakPtr<T, trunkMode, weakLeafs...>::Reference System::Ref(DynamicWeakPtr<T, trunkMode, weakLeafs...> &ptr)
ParameterDescription
TPointee type.
trunkModeMode of smart pointer itself.
weakLeafsIndexes of template arguments for which SetTemplateWeakPtr method must be called.
ParameterTypeDescription
ptrDynamicWeakPtr<T, trunkMode, weakLeafs…>&Smart pointer to create reference to.

ReturnValue

Smart pointer reference.

See Also

System::Ref(const std::reference_wrapper<T>&) method

Wrapper to make sure Ref(std::ref(DynamicWeakPtr)) works.

template<typename T> decltype(Ref(std::declval<T &>())) System::Ref(const std::reference_wrapper<T> &wrapper)
ParameterDescription
TReferenced type.
ParameterTypeDescription
wrapperconst std::reference_wrapper<T>&std wrapper to unwrap.

ReturnValue

Reference type defined in System:: rather than in std.

See Also

System::Ref(T&) method

Helper function to acquire references to objects. Used to guarantee that System::DynamicWeakPtr updates referenced object after assignments.

template<typename T> T & System::Ref(T &value)
ParameterDescription
TType to create reference to.
ParameterTypeDescription
valueT&Value to create reference to.

ReturnValue

Reference to the value passed to this function.

See Also