template <typename T>

class deferred_action

Defined at line 24 of file ../../sdk/lib/fit/include/lib/fit/defer.h

A move-only deferred action wrapper with RAII semantics.

This class is not thread safe.

The wrapper holds a function-like callable target with no arguments

which it invokes when it goes out of scope unless canceled, called, or

moved to a wrapper in a different scope.

See |fit::defer()| for idiomatic usage.

Public Methods

void deferred_action<T> ()

Creates a deferred action without a pending target.

Defined at line 27 of file ../../sdk/lib/fit/include/lib/fit/defer.h

void deferred_action<T> (decltype(nullptr) )

Defined at line 28 of file ../../sdk/lib/fit/include/lib/fit/defer.h

void deferred_action<T> (T target)

Creates a deferred action with a pending target.

Defined at line 31 of file ../../sdk/lib/fit/include/lib/fit/defer.h

void deferred_action<T> (deferred_action<T> && other)

Creates a deferred action with a pending target moved from another

deferred action, leaving the other one without a pending target.

Defined at line 35 of file ../../sdk/lib/fit/include/lib/fit/defer.h

void ~deferred_action<T> ()

Invokes and releases the deferred action's pending target (if any).

Defined at line 40 of file ../../sdk/lib/fit/include/lib/fit/defer.h

bool operator bool ()

Returns true if the deferred action has a pending target.

Defined at line 43 of file ../../sdk/lib/fit/include/lib/fit/defer.h

deferred_action<T> & operator= (deferred_action<T> && other)

Invokes and releases the deferred action's pending target (if any),

then move-assigns it from another deferred action, leaving the latter

one without a pending target.

Defined at line 48 of file ../../sdk/lib/fit/include/lib/fit/defer.h

void call ()

Invokes and releases the deferred action's pending target (if any).

Defined at line 58 of file ../../sdk/lib/fit/include/lib/fit/defer.h

void cancel ()

Releases the deferred action's pending target (if any) without

invoking it.

Defined at line 69 of file ../../sdk/lib/fit/include/lib/fit/defer.h

deferred_action<T> & operator= (decltype(nullptr) )

Defined at line 70 of file ../../sdk/lib/fit/include/lib/fit/defer.h

deferred_action<T> & operator= (T target)

Assigns a new target to the deferred action.

Defined at line 76 of file ../../sdk/lib/fit/include/lib/fit/defer.h

void deferred_action<T> (const deferred_action<T> & other)

Defined at line 81 of file ../../sdk/lib/fit/include/lib/fit/defer.h

deferred_action<T> & operator= (const deferred_action<T> & other)

Defined at line 82 of file ../../sdk/lib/fit/include/lib/fit/defer.h