28#ifndef _CEGUIFunctorCopySlot_h_
29#define _CEGUIFunctorCopySlot_h_
31#include "CEGUI/SlotFunctorBase.h"
37namespace FunctorCopySlot_detail
45 template<
typename U,
bool (U::*)(const EventArgs&) const>
struct SFINAE {};
46 template<
typename U>
static Yes Test(
SFINAE<U, &U::operator()>*);
47 template<
typename U>
static No Test(...);
48 static const bool Value =
sizeof(
Test<T>(0)) ==
sizeof(
Yes);
54 template<
typename U,
bool (U::*)(const EventArgs&)>
struct SFINAE {};
55 template<
typename U>
static Yes Test(
SFINAE<U, &U::operator()>*);
56 template<
typename U>
static No Test(...);
57 static const bool Value =
sizeof(
Test<T>(0)) ==
sizeof(
Yes);
63 template<
typename U,
void (U::*)(const EventArgs&) const>
struct SFINAE {};
64 template<
typename U>
static Yes Test(
SFINAE<U, &U::operator()>*);
65 template<
typename U>
static No Test(...);
66 static const bool Value =
sizeof(
Test<T>(0)) ==
sizeof(
Yes);
72 template<
typename U,
void (U::*)(const EventArgs&)>
struct SFINAE {};
73 template<
typename U>
static Yes Test(
SFINAE<U, &U::operator()>*);
74 template<
typename U>
static No Test(...);
75 static const bool Value =
sizeof(
Test<T>(0)) ==
sizeof(
Yes);
81 template<
typename U,
bool (U::*)() const>
struct SFINAE {};
82 template<
typename U>
static Yes Test(
SFINAE<U, &U::operator()>*);
83 template<
typename U>
static No Test(...);
84 static const bool Value =
sizeof(
Test<T>(0)) ==
sizeof(
Yes);
90 template<
typename U,
bool (U::*)()>
struct SFINAE {};
91 template<
typename U>
static Yes Test(
SFINAE<U, &U::operator()>*);
92 template<
typename U>
static No Test(...);
93 static const bool Value =
sizeof(
Test<T>(0)) ==
sizeof(
Yes);
99 template<
typename U,
void (U::*)() const>
struct SFINAE {};
100 template<
typename U>
static Yes Test(
SFINAE<U, &U::operator()>*);
101 template<
typename U>
static No Test(...);
102 static const bool Value =
sizeof(
Test<T>(0)) ==
sizeof(
Yes);
106 template <
bool B,
class T =
void>
116 template <
class Cond,
class T =
void>
152 typename DisableIf<HasBoolEventArgsConstOp<T> >::Type* = 0,
165 inline bool call(
const T& functor,
void(T::*member_fn)(const EventArgs&) const, const EventArgs& args,
166 typename DisableIf<HasBoolEventArgsConstOp<T> >::Type* = 0,
167 typename DisableIf<HasBoolEventArgsOp<T> >::Type* = 0,
175 CEGUI_CALL_MEMBER_FN(functor, member_fn)(args);
180 inline bool call(T& functor,
void(T::*member_fn)(const EventArgs&), const EventArgs& args,
181 typename DisableIf<HasBoolEventArgsConstOp<T> >::Type* = 0,
182 typename DisableIf<HasBoolEventArgsOp<T> >::Type* = 0,
183 typename DisableIf<HasVoidEventArgsConstOp<T> >::Type* = 0,
190 CEGUI_CALL_MEMBER_FN(functor, member_fn)(args);
195 inline bool call(
const T& functor,
bool(T::*member_fn)() const, const EventArgs& ,
196 typename DisableIf<HasBoolEventArgsConstOp<T> >::Type* = 0,
197 typename DisableIf<HasBoolEventArgsOp<T> >::Type* = 0,
198 typename DisableIf<HasVoidEventArgsConstOp<T> >::Type* = 0,
199 typename DisableIf<HasVoidEventArgsOp<T> >::Type* = 0,
205 return CEGUI_CALL_MEMBER_FN(functor, member_fn)();
209 inline bool call(T& functor,
bool(T::*member_fn)(), const EventArgs& ,
210 typename DisableIf<HasBoolEventArgsConstOp<T> >::Type* = 0,
211 typename DisableIf<HasBoolEventArgsOp<T> >::Type* = 0,
212 typename DisableIf<HasVoidEventArgsConstOp<T> >::Type* = 0,
213 typename DisableIf<HasVoidEventArgsOp<T> >::Type* = 0,
214 typename DisableIf<HasBoolNoArgsConstOp<T> >::Type* = 0,
219 return CEGUI_CALL_MEMBER_FN(functor, member_fn)();
223 inline bool call(
const T& functor,
void(T::*member_fn)() const, const EventArgs& ,
224 typename DisableIf<HasBoolEventArgsConstOp<T> >::Type* = 0,
225 typename DisableIf<HasBoolEventArgsOp<T> >::Type* = 0,
226 typename DisableIf<HasVoidEventArgsConstOp<T> >::Type* = 0,
227 typename DisableIf<HasVoidEventArgsOp<T> >::Type* = 0,
228 typename DisableIf<HasBoolNoArgsConstOp<T> >::Type* = 0,
229 typename DisableIf<HasBoolNoArgsOp<T> >::Type* = 0,
233 CEGUI_CALL_MEMBER_FN(functor, member_fn)();
238 inline bool call(T& functor,
void(T::*member_fn)(), const EventArgs& ,
239 typename DisableIf<HasBoolEventArgsConstOp<T> >::Type* = 0,
240 typename DisableIf<HasBoolEventArgsOp<T> >::Type* = 0,
241 typename DisableIf<HasVoidEventArgsConstOp<T> >::Type* = 0,
242 typename DisableIf<HasVoidEventArgsOp<T> >::Type* = 0,
243 typename DisableIf<HasBoolNoArgsConstOp<T> >::Type* = 0,
244 typename DisableIf<HasBoolNoArgsOp<T> >::Type* = 0,
245 typename DisableIf<HasVoidNoArgsConstOp<T> >::Type* = 0
248 CEGUI_CALL_MEMBER_FN(functor, member_fn)();
268 return FunctorCopySlot_detail::call<T>(d_functor, &T::operator(),
args);
Base class used as the argument to all subscribers Event object.
Definition EventArgs.h:51
Slot template class that creates a functor that calls back via a copy of a functor object.
Definition FunctorCopySlot.h:260
Defines abstract interface which will be used when constructing various functor objects that bind slo...
Definition SlotFunctorBase.h:44
base class for properties able to do native set/get
Definition TypedProperty.h:50
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1
Definition FunctorCopySlot.h:108
Definition FunctorCopySlot.h:118
Definition FunctorCopySlot.h:45
Definition FunctorCopySlot.h:44
Definition FunctorCopySlot.h:54
Definition FunctorCopySlot.h:53
Definition FunctorCopySlot.h:81
Definition FunctorCopySlot.h:80
Definition FunctorCopySlot.h:90
Definition FunctorCopySlot.h:89
Definition FunctorCopySlot.h:63
Definition FunctorCopySlot.h:62
Definition FunctorCopySlot.h:72
Definition FunctorCopySlot.h:71
Definition FunctorCopySlot.h:99
Definition FunctorCopySlot.h:98