rcolyer.net
RC Lib  Version 202403231100
Classes | Namespaces | Functions
Caller.h File Reference

Provides a set of generalized functors for calling functions and methods. More...

#include "RCconfig.h"
#include "APtr.h"
#include "RevPtr.h"
#include <functional>

Go to the source code of this file.

Classes

class  RC::UntypedCaller
 The base class of Caller without return type or parameters specified. More...
 
class  RC::Caller< Ret, Params >
 A general purpose function class which can refer to any static method, member method, functor, or lambda function. More...
 
class  RC::DynCaller
 A typeless container for a Caller, which has methods for dynamically casting it to the correct type. More...
 

Namespaces

 RC
 

Functions

template<class C , class Ret , class... Params>
Caller< Ret, Params... > RC::MakeCaller (C *obj, Ret(C::*func)(Params...))
 Generates a Caller for the member function of the given object, with type inference.
 
template<class C , class Ret , class... Params>
Caller< Ret, Params... > RC::MakeCaller (C &obj, Ret(C::*func)(Params...))
 Generates a Caller for the member function of the given object, with type inference.
 
template<class C , class Ret , class... Params>
Caller< Ret, C &, Params... > RC::MakeCaller (Ret(C::*func)(Params...))
 Generates a Caller for the member function with type inference, inserting a first parameter with a reference to the object.
 
template<class Ret , class... Params>
Caller< Ret, Params... > RC::MakeCaller (Ret(*func)(Params...))
 Generates a Caller for the specified static function, with type inference.
 
template<class Ret , class... Params, class Functor >
Caller< Ret, Params... > RC::MakeFunctor (Functor func)
 A special generator for functors, which requires specifying the return type and arguments. More...
 
template<class C , class MemberFunc >
auto RC::MakeCaller (Ptr< C > obj, MemberFunc func) -> decltype(MakeCaller(obj.Raw(), func))
 Generates a Caller for the member function of the given object, with type inference.
 
template<class C , class MemberFunc >
auto RC::MakeCaller (APtr< C > obj, MemberFunc func) -> decltype(MakeCaller(obj.Raw(), func))
 Generates a Caller for the member function of the given object, with type inference.
 
template<class C , class MemberFunc >
auto RC::MakeCaller (RevPtr< C > obj, MemberFunc func) -> decltype(MakeCaller(obj.Raw(), func))
 Generates a Caller for the member function of the given object, with type inference.
 

Detailed Description

Provides a set of generalized functors for calling functions and methods.

email address
— (c) 2015