2.9.16
Coherent GT
A modern user interface library for games
Coherent::UIGT::FunctorTraits< T > Class Template Reference

Provides information about function objects. More...

Inherited by Coherent::UIGT::FunctorTraits< ResultType(ClassType::*)() const >, Coherent::UIGT::FunctorTraits< ResultType(ClassType::*)(Arg0Type) const >, Coherent::UIGT::FunctorTraits< ResultType(ClassType::*)(Arg0Type, Arg1Type) const >, Coherent::UIGT::FunctorTraits< ResultType(ClassType::*)(Arg0Type, Arg1Type, Arg2Type) const >, Coherent::UIGT::FunctorTraits< ResultType(ClassType::*)(Arg0Type, Arg1Type, Arg2Type, Arg3Type) const >, and Coherent::UIGT::FunctorTraits< ResultType(ClassType::*)(Arg0Type, Arg1Type, Arg2Type, Arg3Type, Arg4Type) const >.

Detailed Description

template<typename T>
class Coherent::UIGT::FunctorTraits< T >

Provides information about function objects.

Provides the following information about a function object

  • return type
  • arity
  • whether is pointer to member function
  • the type of each argument (with const and references stripped)

To support your custom handlers use the following pattern

class SquareCalculator
{
public:
void double operator()(double r) const
{
return r * r;
}
};
// provide support for SquareCalculator to FunctorTraits
namespace Coherent
{
namespace UIGT
{
template <>
struct FunctorTraits<SquareCalculator>
: FunctorTraits<double (double)>
{
};
}
}