Poco

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

class FunctionDelegate

File Information

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

NotifyFunction

typedef void (* NotifyFunction)(const void *, TArgs &);

Constructors

FunctionDelegate inline

FunctionDelegate(
    NotifyFunction function
);

FunctionDelegate inline

FunctionDelegate(
    const FunctionDelegate & delegate
);

Destructor

~FunctionDelegate inline

~FunctionDelegate();

Member Functions

clone inline

AbstractDelegate < TArgs > * clone() const;

disable inline

void disable();

equals inline

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

notify inline

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

operator = inline

FunctionDelegate & operator = (
    const FunctionDelegate & delegate
);

Variables

_function protected

NotifyFunction _function;

_mutex protected

Mutex _mutex;