|
| template<int I_location, class T_bound1, class T_functor> |
| bind_functor< I_location, T_functor, T_bound1 > | sigc::bind (const T_functor & _A_func, T_bound1 _A_b1) |
| | Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor.
|
| template <class T_type1, class T_functor> |
| bind_functor<-1, T_functor, T_type1 > | sigc::bind (const T_functor & _A_func, T_type1 _A_b1) |
| | Creates an adaptor of type sigc::bind_functor which fixes the last 1 argument(s) of the passed functor.
|
| template <class T_type1, class T_type2, class T_functor> |
| bind_functor<-1, T_functor, T_type1, T_type2 > | sigc::bind (const T_functor & _A_func, T_type1 _A_b1, T_type2 _A_b2) |
| | Creates an adaptor of type sigc::bind_functor which fixes the last 2 argument(s) of the passed functor.
|
| template <class T_type1, class T_type2, class T_type3, class T_functor> |
| bind_functor<-1, T_functor, T_type1, T_type2, T_type3 > | sigc::bind (const T_functor & _A_func, T_type1 _A_b1, T_type2 _A_b2, T_type3 _A_b3) |
| | Creates an adaptor of type sigc::bind_functor which fixes the last 3 argument(s) of the passed functor.
|
| template <class T_type1, class T_type2, class T_type3, class T_type4, class T_functor> |
| bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4 > | sigc::bind (const T_functor & _A_func, T_type1 _A_b1, T_type2 _A_b2, T_type3 _A_b3, T_type4 _A_b4) |
| | Creates an adaptor of type sigc::bind_functor which fixes the last 4 argument(s) of the passed functor.
|
| template <class T_type1, class T_type2, class T_type3, class T_type4, class T_type5, class T_functor> |
| bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5 > | sigc::bind (const T_functor & _A_func, T_type1 _A_b1, T_type2 _A_b2, T_type3 _A_b3, T_type4 _A_b4, T_type5 _A_b5) |
| | Creates an adaptor of type sigc::bind_functor which fixes the last 5 argument(s) of the passed functor.
|
| template <class T_type1, class T_type2, class T_type3, class T_type4, class T_type5, class T_type6, class T_functor> |
| bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6 > | sigc::bind (const T_functor & _A_func, T_type1 _A_b1, T_type2 _A_b2, T_type3 _A_b3, T_type4 _A_b4, T_type5 _A_b5, T_type6 _A_b6) |
| | Creates an adaptor of type sigc::bind_functor which fixes the last 6 argument(s) of the passed functor.
|
| template <class T_type1, class T_type2, class T_type3, class T_type4, class T_type5, class T_type6, class T_type7, class T_functor> |
| bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, T_type7 > | sigc::bind (const T_functor & _A_func, T_type1 _A_b1, T_type2 _A_b2, T_type3 _A_b3, T_type4 _A_b4, T_type5 _A_b5, T_type6 _A_b6, T_type7 _A_b7) |
| | Creates an adaptor of type sigc::bind_functor which fixes the last 7 argument(s) of the passed functor.
|
| 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.
|
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.
- Examples:
void foo(int, int, int);
bind_functor< I_location, T_functor, T_bound1 > bind(const T_functor &_A_func, T_bound1 _A_b1)
Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor.
Definition bind.h:2114
The functor sigc::bind() returns can be passed into sigc::signal::connect() directly.
- Example:
void foo(int);
iterator connect(const slot_type &slot_)
Add a slot to the list of slots.
Definition signal.h:3911
Convenience wrapper for the numbered sigc::signal# templates.
Definition signal.h:4055
sigc::bind_return() alters an arbitrary functor by fixing its return value to a certain value.
- Example:
void foo();
bind_return_functor< T_return, T_functor > 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 funct...
Definition bind_return.h:229
You can bind references to functors by passing the objects through the std::ref() or std::cref() functions.
- Example:
int some_int;
void foo(int&);
constexpr reference_wrapper< _Tp > ref(_Tp &__t) noexcept
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.
- Example:
void foo(bar&);
Base class for objects with auto-disconnection.
Definition trackable.h:110