libsigc++
2.99.2
|
sigc::bind() alters an arbitrary functor by fixing arguments to certain values. More...
Classes | |
struct | sigc::bind_functor< I_location, T_functor, T_bound > |
Adaptor that binds arguments to the wrapped functor. More... | |
struct | sigc::bind_functor<-1, T_functor, T_type...> |
Adaptor that binds argument(s) to the wrapped functor. More... | |
struct | sigc::bind_return_functor< T_return, T_functor > |
Adaptor that fixes the return value of the wrapped functor. More... | |
Functions | |
template<int I_location, class T_functor , class... T_bound> | |
decltype(auto) | sigc::bind (const T_functor& _A_func, T_bound..._A_b) |
Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor. More... | |
template<class T_functor , class... T_type> | |
decltype(auto) | sigc::bind (const T_functor& _A_func, T_type..._A_b) |
Creates an adaptor of type sigc::bind_functor which fixes the last arguments of the passed functor. More... | |
template<class T_return , class T_functor > | |
bind_return_functor< T_return, T_functor > | sigc::bind_return (const T_functor& _A_functor, T_return _A_ret_value) |
Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed functor to the passed argument. More... | |
sigc::bind() alters an arbitrary functor by fixing arguments to certain values.
Up to 7 arguments can be bound at a time. For single argument binding, overloads of sigc::bind() are provided that let you specify the zero-based position of the argument to fix with the first template parameter. (A value of -1
fixes the last argument so sigc::bind<-1>() gives the same result as sigc::bind().) The types of the arguments can optionally be specified if not deduced.
The functor sigc::bind() returns can be passed into sigc::signal::connect() directly.
sigc::bind_return() alters an arbitrary functor by fixing its return value to a certain value.
You can bind references to functors by passing the objects through the std::ref() helper function.
If you bind an object of a sigc::trackable derived type to a functor by reference, a slot assigned to the bind adaptor is cleared automatically when the object goes out of scope.
|
inline |
Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor.
The optional template argument I_location specifies the zero-based position of the argument to be fixed (-1
stands for the last argument).
_A_func | Functor that should be wrapped. |
_A_b1 | Argument to bind to _A_func. |
|
inline |
Creates an adaptor of type sigc::bind_functor which fixes the last arguments of the passed functor.
This function overload fixes the last arguments of _A_func.
_A_func | Functor that should be wrapped. |
_A_b | Arguments to bind to _A_func. |
|
inline |
Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed functor to the passed argument.
_A_functor | Functor that should be wrapped. |
_A_ret_value | Argument to fix the return value of _A_functor to. |