22 #ifndef TETRAEDGE_TE_TE_CALLBACK_H 23 #define TETRAEDGE_TE_TE_CALLBACK_H 32 virtual bool operator()() = 0;
33 virtual bool call() = 0;
34 virtual float priority()
const = 0;
44 typedef bool(T::*TMethod)();
50 TeCallback0Param(T *
object, TMethod method,
float priority_ = 0.0f): _object(
object), _method(method), _priority(priority_) {}
52 bool operator()()
override {
return (_object->*_method)(); }
53 bool call()
override {
return (_object->*_method)(); }
55 virtual float priority()
const override {
return _priority; }
59 return o && _object == o->_object && _method == o->_method;
67 virtual bool operator()(T data) = 0;
68 virtual bool call(T data) = 0;
69 virtual float &priority() = 0;
76 typedef bool(T::*TMethod)(S);
82 TeCallback1Param(T *
object, TMethod method,
float priority_ = 0.0f): _object(
object), _method(method), _priority(priority_) {}
84 bool operator()(S data)
override {
return (_object->*_method)(data); }
85 bool call(S data)
override {
return (_object->*_method)(data); }
87 virtual float &priority()
override {
return _priority; }
91 return o && _object == o->_object && _method == o->_method;
100 virtual bool operator()(S data1, T data2) = 0;
101 virtual bool call(S data1, T data2) = 0;
102 virtual float &priority() = 0;
109 typedef bool(C::*TMethod)(S, T);
115 TeCallback2Param(C *
object, TMethod method,
float priority_ = 0.0f): _object(
object), _method(method), _priority(priority_) {}
117 bool operator()(S data1, T data2)
override {
return (_object->*_method)(data1, data2); }
118 bool call(S data1, T data2)
override {
return (_object->*_method)(data1, data2); }
120 virtual float &priority()
override {
return _priority; }
124 return o && _object == o->_object && _method == o->_method;
133 #endif // TETRAEDGE_TE_TE_CALLBACK_H Definition: detection.h:27
Definition: te_callback.h:29
Definition: te_callback.h:107
Definition: te_callback.h:97
Definition: te_callback.h:74
Definition: te_callback.h:42
Definition: te_callback.h:64