Re: [sigc] libsigc++-2.0 functor and adaptor names



Martin Schulze wrote:

Currently, in libsigc++-1.9.11 the functions called
to create functors (replacing SigC::slot()) are named
as following:

  sigc::ptr_fun() (stores a function pointer)
sigc::mem_fun() (stores a member function pointer; optionally together with a reference or pointer to an object instance)

The functors returned (no equivalent in libsigc++-1.2) are called:

  sigc::pointer_functor#<>
  sigc::[bound_][const_][volatile_]mem_functor#<>

The generic container for arbitrary functors (equivalent but much more powerful than SigC::Slot#) is called:

  sigc::slot<>


Technically, which sould be the preferred method for programmers to create functors, with sigc::ptr_fun#() and sigc::mem_fun#(), or sigc::slot<>, or doesn't it matter.

Jeff.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]