# Poco

# template < class TArgs, bool hasSender = true, bool senderIsConst = true >

# class FunctionDelegate

Library: Foundation
Package: Events
Header: Poco/FunctionDelegate.h

## Description

Wraps a freestanding function or static member function for use as a Delegate.

## Inheritance

Direct Base Classes: AbstractDelegate < TArgs >

All Base Classes: AbstractDelegate < TArgs >

## Member Summary

Member Functions: clone, disable, equals, notify, operator =

## Types Aliases

### NotifyFunction

using NotifyFunction = typename Detail::FunctionDelegateNotifyType < TArgs, hasSender, senderIsConst >::Type;

## Constructors

### FunctionDelegate

FunctionDelegate() = delete;

### FunctionDelegate

FunctionDelegate(
NotifyFunction function
);

### FunctionDelegate

FunctionDelegate(
const FunctionDelegate & delegate
);

## Destructor

### ~FunctionDelegate

~FunctionDelegate() = default;

## Member Functions

### clone

AbstractDelegate < TArgs > * clone() const;

### disable

void disable();

### equals

bool equals(
const AbstractDelegate < TArgs > & other
) const;

### notify

bool notify(
const void * sender,
TArgs & arguments
);

### operator =

FunctionDelegate & operator = (
const FunctionDelegate & delegate
);

## Variables

### _function

NotifyFunction _function;

### _mutex

Mutex _mutex;