Event

A multicast list of void delegate(T...) handlers.

Add handlers with ~=, invoke them all with fire, and remove one with disconnect. Firing with no registered handlers is a no-op. Handlers are invoked in registration order.

Members

Functions

clear
void clear()

Remove all handlers.

connect
void connect(void delegate(T) handler)

Subscribe a handler (named-method equivalent of ~=).

disconnect
void disconnect(void delegate(T) handler)

Remove a previously-subscribed handler. Unknown handlers are ignored.

fire
void fire(T args)

Invoke every subscribed handler, in order, with the given arguments.

length
size_t length()

Number of currently-subscribed handlers.

opOpAssign
typeof(this) opOpAssign(void delegate(T) handler)

Subscribe a handler: event ~= &handler.

Meta