Functors are used to encapsulate functions and member functions. There are a number of classes provided for different numbers of arguments. Functions and member functions are somewhat unified in that they both are goFunctorBase type objects, so e.g. for callbacks you can use either a function or a member function; they use the same interface. It is usually recommended to use the goFunction and goMemberFunction helper functions, which create goAutoPtr objects pointing to functor objects. To use a simple callback mechanism, you can utilise the goCaller classes, which provide an easy to use interface to connect to functors. If you then invoke a goCaller, all connected functors will be called.
More...
|
class | goFunctorBase< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9, Targ10 > |
|
class | goFunctorBase0< Tret > |
| Base for functor objects with 0 arguments. More...
|
|
class | goFunctorBase1< Tret, Targ0 > |
| Base for functor objects with 1 arguments. More...
|
|
class | goFunctorBase2< Tret, Targ0, Targ1 > |
| Base for functor objects with 2 arguments. More...
|
|
class | goFunctorBase3< Tret, Targ0, Targ1, Targ2 > |
| Base for functor objects with 3 arguments. More...
|
|
class | goFunctorBase4< Tret, Targ0, Targ1, Targ2, Targ3 > |
| Base for functor objects with 4 arguments. More...
|
|
class | goFunctorBase5< Tret, Targ0, Targ1, Targ2, Targ3, Targ4 > |
| Base for functor objects with 5 arguments. More...
|
|
class | goFunctorBase6< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > |
| Base for functor objects with 6 arguments. More...
|
|
class | goFunctorBase7< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > |
| Base for functor objects with 7 arguments. More...
|
|
class | goFunctorBase8< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > |
| Base for functor objects with 8 arguments. More...
|
|
class | goFunctorBase9< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > |
| Base for functor objects with 9 arguments. More...
|
|
class | goFunctorBase10< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > |
| Base for functor objects with 10 arguments. More...
|
|
class | goFunction0< Tret > |
| Function representation (not member function) for functions with 0 arguments. More...
|
|
class | goFunction0< void > |
| Specialisation for void functions. More...
|
|
class | goFunctor0< Tret, Tclass > |
| Member function representation for class members with 0 arguments. More...
|
|
class | goFunctor0< void, Tclass > |
| Specialisation for void member functions. More...
|
|
class | goCaller0< Tret > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction1< Tret, Targ0 > |
| Function representation (not member function) for functions with 1 arguments. More...
|
|
class | goFunction1< void, Targ0 > |
| Specialisation for void functions. More...
|
|
class | goFunctor1< Tret, Tclass, Targ0 > |
| Member function representation for class members with 1 arguments. More...
|
|
class | goFunctor1< void, Tclass, Targ0 > |
| Specialisation for void member functions. More...
|
|
class | goCaller1< Tret, Targ0 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction2< Tret, Targ0, Targ1 > |
| Function representation (not member function) for functions with 2 arguments. More...
|
|
class | goFunction2< void, Targ0, Targ1 > |
| Specialisation for void functions. More...
|
|
class | goFunctor2< Tret, Tclass, Targ0, Targ1 > |
| Member function representation for class members with 2 arguments. More...
|
|
class | goFunctor2< void, Tclass, Targ0, Targ1 > |
| Specialisation for void member functions. More...
|
|
class | goCaller2< Tret, Targ0, Targ1 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction3< Tret, Targ0, Targ1, Targ2 > |
| Function representation (not member function) for functions with 3 arguments. More...
|
|
class | goFunction3< void, Targ0, Targ1, Targ2 > |
| Specialisation for void functions. More...
|
|
class | goFunctor3< Tret, Tclass, Targ0, Targ1, Targ2 > |
| Member function representation for class members with 3 arguments. More...
|
|
class | goFunctor3< void, Tclass, Targ0, Targ1, Targ2 > |
| Specialisation for void member functions. More...
|
|
class | goCaller3< Tret, Targ0, Targ1, Targ2 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction4< Tret, Targ0, Targ1, Targ2, Targ3 > |
| Function representation (not member function) for functions with 4 arguments. More...
|
|
class | goFunction4< void, Targ0, Targ1, Targ2, Targ3 > |
| Specialisation for void functions. More...
|
|
class | goFunctor4< Tret, Tclass, Targ0, Targ1, Targ2, Targ3 > |
| Member function representation for class members with 4 arguments. More...
|
|
class | goFunctor4< void, Tclass, Targ0, Targ1, Targ2, Targ3 > |
| Specialisation for void member functions. More...
|
|
class | goCaller4< Tret, Targ0, Targ1, Targ2, Targ3 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction5< Tret, Targ0, Targ1, Targ2, Targ3, Targ4 > |
| Function representation (not member function) for functions with 5 arguments. More...
|
|
class | goFunction5< void, Targ0, Targ1, Targ2, Targ3, Targ4 > |
| Specialisation for void functions. More...
|
|
class | goFunctor5< Tret, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4 > |
| Member function representation for class members with 5 arguments. More...
|
|
class | goFunctor5< void, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4 > |
| Specialisation for void member functions. More...
|
|
class | goCaller5< Tret, Targ0, Targ1, Targ2, Targ3, Targ4 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction6< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > |
| Function representation (not member function) for functions with 6 arguments. More...
|
|
class | goFunction6< void, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > |
| Specialisation for void functions. More...
|
|
class | goFunctor6< Tret, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > |
| Member function representation for class members with 6 arguments. More...
|
|
class | goFunctor6< void, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > |
| Specialisation for void member functions. More...
|
|
class | goCaller6< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction7< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > |
| Function representation (not member function) for functions with 7 arguments. More...
|
|
class | goFunction7< void, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > |
| Specialisation for void functions. More...
|
|
class | goFunctor7< Tret, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > |
| Member function representation for class members with 7 arguments. More...
|
|
class | goFunctor7< void, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > |
| Specialisation for void member functions. More...
|
|
class | goCaller7< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction8< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > |
| Function representation (not member function) for functions with 8 arguments. More...
|
|
class | goFunction8< void, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > |
| Specialisation for void functions. More...
|
|
class | goFunctor8< Tret, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > |
| Member function representation for class members with 8 arguments. More...
|
|
class | goFunctor8< void, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > |
| Specialisation for void member functions. More...
|
|
class | goCaller8< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction9< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > |
| Function representation (not member function) for functions with 9 arguments. More...
|
|
class | goFunction9< void, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > |
| Specialisation for void functions. More...
|
|
class | goFunctor9< Tret, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > |
| Member function representation for class members with 9 arguments. More...
|
|
class | goFunctor9< void, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > |
| Specialisation for void member functions. More...
|
|
class | goCaller9< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
class | goFunction10< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > |
| Function representation (not member function) for functions with 10 arguments. More...
|
|
class | goFunction10< void, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > |
| Specialisation for void functions. More...
|
|
class | goFunctor10< Tret, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > |
| Member function representation for class members with 10 arguments. More...
|
|
class | goFunctor10< void, Tclass, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > |
| Specialisation for void member functions. More...
|
|
class | goCaller10< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > |
| Broadcasting caller class, like signals in the "signal/slot" paradigm. More...
|
|
|
template<class Tret > |
goAutoPtr< goFunctorBase0< Tret > > | goFunction (Tret(*f)()) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass > |
goAutoPtr< goFunctorBase0< Tret > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)()) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 > |
goAutoPtr< goFunctorBase1< Tret, Targ0 > > | goFunction (Tret(*f)(Targ0 arg0)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 > |
goAutoPtr< goFunctorBase1< Tret, Targ0 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 > |
goAutoPtr< goFunctorBase2< Tret, Targ0, Targ1 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 > |
goAutoPtr< goFunctorBase2< Tret, Targ0, Targ1 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 > |
goAutoPtr< goFunctorBase3< Tret, Targ0, Targ1, Targ2 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 > |
goAutoPtr< goFunctorBase3< Tret, Targ0, Targ1, Targ2 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 > |
goAutoPtr< goFunctorBase4< Tret, Targ0, Targ1, Targ2, Targ3 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 , class Targ3 > |
goAutoPtr< goFunctorBase4< Tret, Targ0, Targ1, Targ2, Targ3 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 > |
goAutoPtr< goFunctorBase5< Tret, Targ0, Targ1, Targ2, Targ3, Targ4 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 > |
goAutoPtr< goFunctorBase5< Tret, Targ0, Targ1, Targ2, Targ3, Targ4 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 > |
goAutoPtr< goFunctorBase6< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 > |
goAutoPtr< goFunctorBase6< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 > |
goAutoPtr< goFunctorBase7< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 > |
goAutoPtr< goFunctorBase7< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 , class Targ7 > |
goAutoPtr< goFunctorBase8< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 , class Targ7 > |
goAutoPtr< goFunctorBase8< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 , class Targ7 , class Targ8 > |
goAutoPtr< goFunctorBase9< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 , class Targ7 , class Targ8 > |
goAutoPtr< goFunctorBase9< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 , class Targ7 , class Targ8 , class Targ9 > |
goAutoPtr< goFunctorBase10< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > > | goFunction (Tret(*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8, Targ9 arg9)) |
| Create a function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 , class Targ6 , class Targ7 , class Targ8 , class Targ9 > |
goAutoPtr< goFunctorBase10< Tret, Targ0, Targ1, Targ2, Targ3, Targ4, Targ5, Targ6, Targ7, Targ8, Targ9 > > | goMemberFunction (Tclass *c, Tret(Tclass::*f)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8, Targ9 arg9)) |
| Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion. More...
|
|
Functors are used to encapsulate functions and member functions. There are a number of classes provided for different numbers of arguments. Functions and member functions are somewhat unified in that they both are goFunctorBase type objects, so e.g. for callbacks you can use either a function or a member function; they use the same interface. It is usually recommended to use the goFunction and goMemberFunction helper functions, which create goAutoPtr objects pointing to functor objects. To use a simple callback mechanism, you can utilise the goCaller classes, which provide an easy to use interface to connect to functors. If you then invoke a goCaller, all connected functors will be called.