nw::ut::Signal7::CreateAndConnect Member Function

Syntax

template <typename TFunction>
SlotType * CreateAndConnect(
     TFunction function,
     AllocatorType * allocator
);

Template Arguments

Name Description
TFunction Type of function pointer or function object.

Arguments

Name Description
in function Function pointer or function object
in allocator Allocator.

Return Values

The slot that was created.

Description

Creates a slot and connects to it.

Allocates memory within the function.

When the "NW_SIGNAL_MULTI_SLOT_ENABLED" definition for "nw/ut/ut_Config.h" is disabled, the number of slots that can be connected to the signal is one.

When the "NW_SIGNAL_MULTI_SLOT_ENABLED" is disabled, be sure to Disconnect before Connecting. If not Disconnected, it will stop with an assert.


CONFIDENTIAL