System::MulticastDelegate< ReturnType(ArgumentTypes...)> class

MulticastDelegate< ReturnType(ArgumentTypes…)> class

Represents a collection of delegates. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

template<class ReturnType,class...>class MulticastDelegate< ReturnType(ArgumentTypes...)> : public System::Details::DelegateHoldingVariables
ParameterDescription
ReturnTypeReturn type of the invokable entities pointed to by each delegate in the collection
ArgumentTypesArgument list of the invokable entities pointed to by each delegate in the collection

Methods

MethodDescription
BeginInvoke(ArgumentTypes…, const AsyncCallback&, const CallbackArgumentType&)NOT IMPLEMENTED.
connect(Callback)Adds the specified delegate to the collection.
connect(std::function<R(Args…)>)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.
connect(MulticastDelegate&)Adds the specified MulticastDelegate object to the delegate collection.
connect(MemberType ClassType::*, ClassType *)Adds the specified non-static method of the specified object to the delegate collection.
connect(MemberType ClassType::*, const SharedPtr<ClassType>&)Adds the specified non-static method of the specified object to the delegate collection.
disconnect(Callback)Removes the specified delegate from the delegate collection.
disconnect(MemberType ClassType::*, ClassType *)Removes the specified non-static method of the specified object from the delegate collection.
disconnect(MemberType ClassType::*, const SharedPtr<ClassType>&)Removes the specified non-static method of the specified object from the delegate collection.
disconnect(MulticastDelegate&)Removes the specified MulticastDelegate object from the delegate collection.
disconnect_all_slots()Removes all delegates from the delegate collection.
empty() constDetermines whether the delegate collection is empty.
EndInvoke(const SharedPtr<IAsyncResult>&)NOT IMPLEMENTED.
GetHashCode() const
GetType() const
invoke(ArgumentTypes…) constInvokes all delegates currently present in the delegates collection. Delegates are invoked in the same order as they were added to the collection. The method blocks while the delegates are executed.
IsNull() constDetermines whether the delegate collection is empty.
MulticastDelegate()Constructs an empty collection.
MulticastDelegate(std::nullptr_t)Equivalent to defalt constructor.
MulticastDelegate(const MulticastDelegate&)Performs a shallow copy of the delegate collection.
MulticastDelegate(MulticastDelegate&&)Moving constructor.
MulticastDelegate(Callback&&)Constructs an instance and puts the specified delegate to the delegates collection.
MulticastDelegate(T)Constructs an instance and puts the specified value to the delegates collection.
MulticastDelegate(std::function<ReturnType(ArgumentTypes…)>)Constructs an instance and puts the specified value to the delegates collection.
operator!=(const std::nullptr_t&) constDetermines whether the delegate collection is not empty.
operator!=(const MulticastDelegate&) constDetermines whether two instances of MulticastDelegate - the current object and the specified object - are inequal.
operator()(ArgumentTypes…) constInvokes all delegates currently present in the delegates collection. Delegates are invoked in the same order as they were added to the collection. The operator blocks while the delegates are executed.
operator+=(Callback)Adds the specified delegate to the collection.
operator-=(Callback)Removes the specified delegate from the delegate collection.
operator=(const MulticastDelegate&)Assigns the collection of delegates represented by the specified object to the current object. As a result both objects point to the same collection of delegates.
operator=(MulticastDelegate&&)Moving assignment operator.
operator==(const std::nullptr_t&) constDetermines whether the delegate collection is empty.
operator==(const MulticastDelegate&) constDetermines whether two instances of MulticastDelegate - the current object and the specified object - are equal.
remove_empty_callbacks() constCleans out contained callbacks that are empty (not actually calling anything).
ToString() const
static Type()Returns a reference to the TypeInfo object representing the MulticastDelegate class type information.
~MulticastDelegate()Destructor.

Typedefs

TypedefDescription
CallbackThe type of the delegates represented by the MulticastDelegate class.

See Also