senf::ppi::detail::Callback< Arg > Struct Template Reference

Provide callbacks with a single optional argument. More...

#include <senf/PPI/detail/Callback.hh>

List of all members.


Detailed Description

template<class Arg = void>
struct senf::ppi::detail::Callback< Arg >

Provide callbacks with a single optional argument.

This helper implements callbacks with an optional single argument. In addition to boost::function, this helper provides the following functionality:

  • It allows the callback to ignore the argument: A callable with no argument may be used as callback.
  • It allows to use member function pointers as callbacks. These will be automatically bound to the owner argument of make().
The callbacks follow the same restrictions as Boost.Function: They must be either function, member function pointers or callable objects defining the appropriate typedef members.

Definition at line 54 of file Callback.hh.


Public Types

typedef boost::function< void(Arg)>  type

Static Public Member Functions

template<class Owner , class FnClass >
static type  make (void(FnClass::*memfn)(), Owner &owner)
template<class Owner , class FnClass , class FnArg >
static type  make (void(FnClass::*memfn)(FnArg arg), Owner &owner)
template<class Owner >
static type  make (type callable, Owner &)
template<class Owner >
static type  make (boost::function< void()> callable, Owner &)

Member Typedef Documentation

template<class Arg = void>
typedef boost::function<void (Arg)> senf::ppi::detail::Callback< Arg >::
type

Definition at line 56 of file Callback.hh.


Member Function Documentation

template<class Arg >
template<class Owner >
senf::ppi::detail::Callback< Arg >::type senf::ppi::detail::Callback< Arg >::
make ( boost::function< void()>  callable,
Owner &  )

Definition at line 64 of file Callback.cti.

template<class Arg >
template<class Owner >
senf::ppi::detail::Callback< void >::type senf::ppi::detail::Callback< Owner >::
make ( type  callable,
Owner &  )

Definition at line 56 of file Callback.cti.

template<class Arg >
template<class Owner , class FnClass , class FnArg >
senf::ppi::detail::Callback< Arg >::type senf::ppi::detail::Callback< Arg >::
make ( void(FnClass::*)(FnArg arg)  memfn,
Owner &  owner )

Definition at line 48 of file Callback.cti.

template<class Arg >
template<class Owner , class FnClass >
senf::ppi::detail::Callback< void >::type senf::ppi::detail::Callback< Owner, FnClass >::
make ( void(FnClass::*)()  memfn,
Owner &  owner )

Definition at line 40 of file Callback.cti.


The documentation for this struct was generated from the following files: