connect()

MulticastDelegate< ReturnType(ArgumentTypes…)>::connect(Callback) method

Adds the specified delegate to the collection.

MulticastDelegate & System::MulticastDelegate<ReturnType(ArgumentTypes...)>::connect(Callback callback)

Arguments

ParameterTypeDescription
callbackCallbackThe delegate to add to the collection

Return Value

A reference to the self

MulticastDelegate< ReturnType(ArgumentTypes…)>::connect(std::function<R(Args…)>) method

Adds the specified function object to the delegate collection. The function object is converted to the Callback delegate type before being added to the collection.

template<class R,class...> MulticastDelegate & System::MulticastDelegate<ReturnType(ArgumentTypes...)>::connect(std::function<R(Args...)> f)

Template parameters

ParameterDescription
RThe return type of the function object to add to the collection
ArgsThe argument list of the function object to add to the collection

Arguments

ParameterTypeDescription
fstd::function<R(Args…)>The function object to add to the collection

Return Value

A reference to the self

MulticastDelegate< ReturnType(ArgumentTypes…)>::connect(MulticastDelegate&) method

Adds the specified MulticastDelegate object to the delegate collection.

MulticastDelegate & System::MulticastDelegate<ReturnType(ArgumentTypes...)>::connect(MulticastDelegate &other)

Arguments

ParameterTypeDescription
otherMulticastDelegate&An instance of the MulticastDelegate class to add to the delegate collection

Return Value

A reference to the self

MulticastDelegate< ReturnType(ArgumentTypes…)>::connect(MemberType ClassType::*, ClassType *) method

Adds the specified non-static method of the specified object to the delegate collection.

template<class MemberType,class ClassType> MulticastDelegate & System::MulticastDelegate<ReturnType(ArgumentTypes...)>::connect(MemberType ClassType::*member, ClassType *obj)

Template parameters

ParameterDescription
MemberTypeThe type of the non-static method that is to be added to the delegate collection
ClassTypeThe type of the object method of which is to be added to the delegate

Arguments

ParameterTypeDescription
memberMemberType ClassType::*A pointer to the non-static method of the specified object
objClassType *A pointer to an object member method of which is to be added to the delegate collection

Return Value

A reference to the self

MulticastDelegate< ReturnType(ArgumentTypes…)>::connect(MemberType ClassType::*, const SharedPtr<ClassType>&) method

Adds the specified non-static method of the specified object to the delegate collection.

template<class MemberType,class ClassType> MulticastDelegate & System::MulticastDelegate<ReturnType(ArgumentTypes...)>::connect(MemberType ClassType::*member, const SharedPtr<ClassType> &obj)

Template parameters

ParameterDescription
MemberTypeThe type of the non-static method that is to be added to the delegate collection
ClassTypeThe type of the object method of which is to be added to the delegate collection

Arguments

ParameterTypeDescription
memberMemberType ClassType::*A pointer to the non-static method of the specified object
objconst SharedPtr<ClassType>&A shared pointer to an object member method of which is to be added to the delegate collection

Return Value

A reference to the self

See Also