golib  0.5

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...

Classes

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...
 

Functions

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...
 

Detailed Description

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.

Usage example
void f1 ()
{
printf ("f1\n");
}
int f2 ()
{
printf ("f2\n");
return 2;
}
void f3 (int i)
{
printf ("f3: %d\n", i);
}
void s1 (int i, const goString& s)
{
printf ("s1: %s, %d\n", s.toCharPtr(), i);
}
class MyClass
{
public:
MyClass (int a = 5)
: n (a)
{
}
void action ()
{
printf ("MyClass n = %d\n", n);
}
void action2 (int i, const goString& s)
{
printf ("MyClass action2: %s, %d\n", s.toCharPtr(), i);
}
private:
int n;
};
// ....
// Somewhere in the code:
{
goFunction0<int> ff2 (f2);
ff1 ();
ff2 ();
ff3 (4);
}
// Or use the convenience functions:
{
goAutoPtr<goFunctorBase0<void> > ff1 = goFunction<void> (f1);
goAutoPtr<goFunctorBase0<int> > ff2 = goFunction<int> (f2);
goAutoPtr<goFunctorBase1<void, int> > ff3 = goFunction<void, int> (f3);
MyClass c (10);
goAutoPtr<goFunctorBase0<void> > ff4 = goMemberFunction <void, MyClass> (&c, &MyClass::action);
(*ff1)();
printf (" -- return value: %d\n", (*ff2)());
(*ff3)(3);
(*ff4)();
//= Try the caller
caller.connect (ff1);
caller.connect (ff4);
caller (); //= Calls ff1 and ff4
caller2.connect (goFunction<void, int, const goString&> (s1));
caller2.connect (goMemberFunction<void, MyClass, int, const goString&> (&c, &MyClass::action2));
caller2 (42, goString("Hello, World!")); //= Calls s1 and c.action2
}
Summary
This is a collection of templates which provides more or less flexible functors which can represent either c-style functions or member functions in a transparent-ish way. This code is generated automatically by a Python script which is part of golib by Christian Gosch.
There are also goCaller* objects which collect a number of functor objects and can be used to broadcast a function call to all its functors.
Usage
You can either create one of the goFunction* or goFunctor* objects by yourself, or use the convenience functions goFunction() and goMemberFunction() to create new functor objects.
Note
The goFunction() and goMemberFunction() functions as well as the goCaller* classes can either be created (by the source code generating script) with or without the support for automatic pointers (from golib). It is recommended to use automatic pointers, and goCaller* type objects have not been tested without automatic pointers.

Function Documentation

◆ goFunction() [1/11]

template<class Tret >
goAutoPtr< goFunctorBase0< Tret > > goFunction ( Tret(*)()  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase0 object.

◆ goFunction() [2/11]

template<class Tret , class Targ0 >
goAutoPtr< goFunctorBase1< Tret, Targ0 > > goFunction ( Tret(*)(Targ0 arg0)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase1 object.

◆ goFunction() [3/11]

template<class Tret , class Targ0 , class Targ1 >
goAutoPtr< goFunctorBase2< Tret, Targ0, Targ1 > > goFunction ( Tret(*)(Targ0 arg0, Targ1 arg1)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase2 object.

◆ goFunction() [4/11]

template<class Tret , class Targ0 , class Targ1 , class Targ2 >
goAutoPtr< goFunctorBase3< Tret, Targ0, Targ1, Targ2 > > goFunction ( Tret(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase3 object.

◆ goFunction() [5/11]

template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 >
goAutoPtr< goFunctorBase4< Tret, Targ0, Targ1, Targ2, Targ3 > > goFunction ( Tret(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase4 object.

◆ goFunction() [6/11]

template<class Tret , class Targ0 , class Targ1 , class Targ2 , class Targ3 , class Targ4 >
goAutoPtr< goFunctorBase5< Tret, Targ0, Targ1, Targ2, Targ3, Targ4 > > goFunction ( Tret(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase5 object.

◆ goFunction() [7/11]

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(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase6 object.

◆ goFunction() [8/11]

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(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase7 object.

◆ goFunction() [9/11]

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(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase8 object.

◆ goFunction() [10/11]

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(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase9 object.

◆ goFunction() [11/11]

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(*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8, Targ9 arg9)  f)

Create a function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
fFunction pointer to a function.
Returns
goAutoPtr to a goFunctorBase10 object.

◆ goMemberFunction() [1/11]

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.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase0 object.

◆ goMemberFunction() [2/11]

template<class Tret , class Tclass , class Targ0 >
goAutoPtr< goFunctorBase1< Tret, Targ0 > > goMemberFunction ( Tclass *  c,
Tret(Tclass::*)(Targ0 arg0)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase1 object.

◆ goMemberFunction() [3/11]

template<class Tret , class Tclass , class Targ0 , class Targ1 >
goAutoPtr< goFunctorBase2< Tret, Targ0, Targ1 > > goMemberFunction ( Tclass *  c,
Tret(Tclass::*)(Targ0 arg0, Targ1 arg1)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase2 object.

◆ goMemberFunction() [4/11]

template<class Tret , class Tclass , class Targ0 , class Targ1 , class Targ2 >
goAutoPtr< goFunctorBase3< Tret, Targ0, Targ1, Targ2 > > goMemberFunction ( Tclass *  c,
Tret(Tclass::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase3 object.

◆ goMemberFunction() [5/11]

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::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase4 object.

◆ goMemberFunction() [6/11]

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::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase5 object.

◆ goMemberFunction() [7/11]

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::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase6 object.

◆ goMemberFunction() [8/11]

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::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase7 object.

◆ goMemberFunction() [9/11]

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::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase8 object.

◆ goMemberFunction() [10/11]

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::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase9 object.

◆ goMemberFunction() [11/11]

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::*)(Targ0 arg0, Targ1 arg1, Targ2 arg2, Targ3 arg3, Targ4 arg4, Targ5 arg5, Targ6 arg6, Targ7 arg7, Targ8 arg8, Targ9 arg9)  f 
)

Create a member function functor object, encapsulated in a goAutoPtr for automatic deletion.

Parameters
cPointer to the object.
fFunction pointer to a member function.
Returns
goAutoPtr to a goFunctorBase10 object.
goFunction0
Function representation (not member function) for functions with 0 arguments.
Definition: gofunctor.h:361
goCaller2
Broadcasting caller class, like signals in the "signal/slot" paradigm.
Definition: gofunctor.h:1173
goAutoPtr
"Smart pointer". Wrapper that automatically deletes its managed pointer when the internal reference c...
Definition: goautoptr.h:127
goFunction0< void >
Specialisation for void functions.
Definition: gofunctor.h:413
goCaller0< void >
goString
String class.
Definition: gostring.h:28
goFunction1
Function representation (not member function) for functions with 1 arguments.
Definition: gofunctor.h:660