omni::event2::operator[]
NAME

omni::event2::operator[]

A member operator of omni::event2

#include <omni/delegate/2.hpp>
omni::delegate2< Ret, PT1, PT2 >& omni::event2::operator[](std::size_t idx)

SYNOPSIS

Access a delegate directly by index.

top

DESCRIPTION

The [int] operator can be used to access a specific delegate in the invocation list directly.

top

RETURN VALUES

A reference to the delegate instance at the specified index

top


ERRORS

An omni::exceptions::index_out_of_range will be thrown if the index requested is outside the range of this instance

top


CONSIDERATIONS

If the OMNI_SAFE_EVENT defines are not enabled, it is undefined if this event is invoked and edited at the same time; i.e. a race condition can occur if you detach to an event from one thread while invoking from another.

top