EventSource Class

Represents an event. EventSource member functions add, remove, and invoke event handlers.

template<
   typename TDelegateInterface
>
class EventSource;

TDelegateInterface

The interface to a delegate that represents an event handler.

Name

Description

EventSource::EventSource Constructor

Initializes a new instance of the EventSource class.

Name

Description

EventSource::Add Method

Appends the event handler represented by the specified delegate interface to the set of event handlers for the current EventSource object.

EventSource::GetSize Method

Retrieves the number of event handlers associated with the current EventSource object

EventSource::InvokeAll Method

Calls each event handler associated with the current EventSource object using the specified argument types and arguments.

EventSource::Remove Method

Deletes the event handler represented by the specified event registration token from the set of event handlers associated with the current EventSource object.

Name

Description

EventSource::addRemoveLock_ Data Member

Synchronizes access to the targets_ array when adding, removing, or invoking event handlers.

EventSource::targets_ Data Member

An array of one or more event handlers.

EventSource::targetsPointerLock_ Data Member

Synchronizes access to internal data members even while event handlers for this EventSource are being added, removed, or invoked.

Header: event.h

Namespace: Microsoft::WRL

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft