libsigc++
2.3.1
|
sigc::compose() combines two or three arbitrary functors. More...
Classes | |
struct | sigc::compose1_functor< T_setter, T_getter > |
Adaptor that combines two functors. More... | |
struct | sigc::compose2_functor< T_setter, T_getter1, T_getter2 > |
Adaptor that combines three functors. More... | |
Functions | |
template<class T_action , class T_setter , class T_getter > | |
void | sigc::visit_each (const T_action& _A_action, const compose1_functor< T_setter, T_getter >& _A_target) |
Performs a functor on each of the targets of a functor. | |
template<class T_action , class T_setter , class T_getter1 , class T_getter2 > | |
void | sigc::visit_each (const T_action& _A_action, const compose2_functor< T_setter, T_getter1, T_getter2 >& _A_target) |
Performs a functor on each of the targets of a functor. | |
template<class T_setter , class T_getter > | |
compose1_functor< T_setter, T_getter > | sigc::compose (const T_setter& _A_setter, const T_getter& _A_getter) |
Creates an adaptor of type sigc::compose1_functor which combines two functors. | |
template<class T_setter , class T_getter1 , class T_getter2 > | |
compose2_functor< T_setter, T_getter1, T_getter2 > | sigc::compose (const T_setter& _A_setter, const T_getter1& _A_getter1, const T_getter2& _A_getter2) |
Creates an adaptor of type sigc::compose2_functor which combines three functors. | |
sigc::compose() combines two or three arbitrary functors.
On invokation, parameters are passed on to one or two getter functor(s). The return value(s) are then passed on to the setter function.
The functor sigc::compose() returns can be passed directly into sigc::signal::connect().
For a more powerful version of this functionality see the lambda library adaptor sigc::group() which can bind, hide and reorder arguments arbitrarily. Although sigc::group() is more flexible, sigc::bind() provides a means of binding parameters when the total number of parameters called is variable.
|
inline |
Creates an adaptor of type sigc::compose1_functor which combines two functors.
_A_setter | Functor that receives the return value of the invokation of _A_getter. |
_A_getter | Functor to invoke from operator()(). |
|
inline |
Creates an adaptor of type sigc::compose2_functor which combines three functors.
_A_setter | Functor that receives the return values of the invokation of _A_getter1 and _A_getter2. |
_A_getter1 | Functor to invoke from operator()(). |
_A_getter2 | Functor to invoke from operator()(). |
void sigc::visit_each | ( | const T_action & | _A_action, |
const compose1_functor< T_setter, T_getter > & | _A_target | ||
) |
Performs a functor on each of the targets of a functor.
The function overload for sigc::compose1_functor performs a functor on the functors stored in the sigc::compose1_functor object.
void sigc::visit_each | ( | const T_action & | _A_action, |
const compose2_functor< T_setter, T_getter1, T_getter2 > & | _A_target | ||
) |
Performs a functor on each of the targets of a functor.
The function overload for sigc::compose2_functor performs a functor on the functors stored in the sigc::compose2_functor object.