DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
DotNetDupe::System::Action<> Class Reference

#include <Action.h>

Public Member Functions

 Action ()
 Default constructor creating an empty unassigned Action.
 Action (Action &&other) noexcept
 Move constructor transferring delegate ownership.
 Action (const Action &other)
 Copy constructor performing deep clone of target delegate.
 Action (decltype(nullptr))
 Constructs an empty Action from nullptr.
template<typename F, typename = std::enable_if_t<!std::is_same_v<std::decay_t<F>, Action> && std::is_invocable_v<std::decay_t<F>>>>
 Action (F &&func)
 Constructs an Action wrapping the specified callable functor.
 ~Action ()
 Destructor releasing target callable holder.
void Invoke () const
 Invokes the wrapped action delegate.
 operator bool () const
 Boolean conversion testing whether a target delegate is bound.
void operator() () const
 Function call operator executing Invoke.
Actionoperator= (Action &&other) noexcept
 Move assignment operator.
Actionoperator= (const Action &other)
 Copy assignment operator.

Detailed Description

Definition at line 51 of file Action.h.

Constructor & Destructor Documentation

◆ Action() [1/5]

DotNetDupe::System::Action<>::Action ( )
inline

Default constructor creating an empty unassigned Action.

Definition at line 54 of file Action.h.

Referenced by Action(), Action(), operator=(), and operator=().

◆ Action() [2/5]

DotNetDupe::System::Action<>::Action ( decltype(nullptr) )
inline

Constructs an empty Action from nullptr.

Definition at line 57 of file Action.h.

◆ Action() [3/5]

template<typename F, typename = std::enable_if_t<!std::is_same_v<std::decay_t<F>, Action> && std::is_invocable_v<std::decay_t<F>>>>
DotNetDupe::System::Action<>::Action ( F && func)
inline

Constructs an Action wrapping the specified callable functor.

Template Parameters
FThe callable functor type.
Parameters
funcThe callable object.

Definition at line 63 of file Action.h.

◆ Action() [4/5]

DotNetDupe::System::Action<>::Action ( const Action<> & other)
inline

Copy constructor performing deep clone of target delegate.

Parameters
otherThe Action to copy.

Definition at line 67 of file Action.h.

References Action().

◆ Action() [5/5]

DotNetDupe::System::Action<>::Action ( Action<> && other)
inlinenoexcept

Move constructor transferring delegate ownership.

Parameters
otherThe Action to move from.

Definition at line 71 of file Action.h.

References Action().

◆ ~Action()

Destructor releasing target callable holder.

Definition at line 95 of file Action.h.

Member Function Documentation

◆ Invoke()

void DotNetDupe::System::Action<>::Invoke ( ) const
inline

Invokes the wrapped action delegate.

Definition at line 101 of file Action.h.

Referenced by operator()().

◆ operator bool()

DotNetDupe::System::Action<>::operator bool ( ) const
inlineexplicit

Boolean conversion testing whether a target delegate is bound.

Definition at line 111 of file Action.h.

◆ operator()()

void DotNetDupe::System::Action<>::operator() ( ) const
inline

Function call operator executing Invoke.

Definition at line 106 of file Action.h.

References Invoke().

◆ operator=() [1/2]

Action & DotNetDupe::System::Action<>::operator= ( Action<> && other)
inlinenoexcept

Move assignment operator.

Definition at line 85 of file Action.h.

References Action().

◆ operator=() [2/2]

Action & DotNetDupe::System::Action<>::operator= ( const Action<> & other)
inline

Copy assignment operator.

Definition at line 76 of file Action.h.

References Action().


The documentation for this class was generated from the following file: