Poco::Util

template < class C >

class OptionCallback

Library: Util
Package: Options
Header: Poco/Util/OptionCallback.h

Description

This class is used as an argument to Option::callback().

It stores a pointer to an object and a pointer to a member function of the object's class.

Inheritance

Direct Base Classes: AbstractOptionCallback

All Base Classes: AbstractOptionCallback

Member Summary

Member Functions: clone, invoke, operator =

Inherited Functions: clone, invoke

Types

void

typedef void (C::* Callback)(const std::string & name, const std::string & value);

Constructors

OptionCallback inline

OptionCallback(
    const OptionCallback & cb
);

Creates an OptionCallback from another one.

OptionCallback inline

OptionCallback(
    C * pObject,
    Callback method
);

Creates the OptionCallback for the given object and member function.

Destructor

~OptionCallback virtual inline

~OptionCallback();

Destroys the OptionCallback.

Member Functions

clone virtual inline

AbstractOptionCallback * clone() const;

invoke virtual inline

void invoke(
    const std::string & name,
    const std::string & value
) const;

operator = inline

OptionCallback & operator = (
    const OptionCallback & cb
);