Library of Assembled Shared Sources
|
callback with 0 parameters but with returnvalue. More...
#include <callback_r_0.h>
Public Member Functions | |
CallbackR0 () | |
Default constructor, construct empty callback. | |
template<typename Function> | |
CallbackR0 (Function iFunction) | |
Construct function callback. | |
template<typename ObjectPtr, typename Method> | |
CallbackR0 (ObjectPtr iObject, Method iMethod) | |
Construct object/method callback. | |
CallbackR0 (const TSelf &iOther) | |
copy constructor | |
CallbackR0 (TSelf &&iOther) noexcept | |
move constructor | |
TSelf & | operator= (const TSelf &iOther) |
assignment operator | |
TSelf & | operator= (TSelf &&iOther) noexcept |
move assignment operator | |
R | operator() () const |
THE operator. | |
void | reset () |
Reset to empty callback. | |
bool | isEmpty () const |
Returns true if no callback dispatcher is assigned to this object. | |
bool | operator! () const |
return this->isEmpty() | |
operator bool () const | |
return !this->isEmpty()) | |
void | swap (TSelf &iOther) |
Swaps the dispatcher of this callback with the dispatcher of another. | |
bool | operator== (const TSelf &iOther) const |
return true if two callbacks call the same function/method, NEEDS RTTI! | |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename R> | |
bool | operator!= (const CallbackR0< R > &iA, const CallbackR0< R > &iB) |
return true if two callbacks are different | |
template<typename R> | |
CallbackR0< R > | makeCallback (R(*iFunction)()) |
make a CallbackR0 from a function | |
template<typename R> | |
const CallbackR0< R > & | makeCallback (const CallbackR0< R > &iCallback) |
make a CallbackR0 from a callback | |
template<typename ObjectPtr, typename Object, typename R> | |
CallbackR0< R > | makeCallback (ObjectPtr iObject, R(Object::*iMethod)()) |
make a CallbackR0 from a object and method | |
template<typename ObjectPtr, typename Object, typename R> | |
CallbackR0< R > | makeCallback (ObjectPtr iObject, R(Object::*iMethod)() const) |
make a CallbackR0 from a object and const method | |
callback with 0 parameters but with returnvalue.
It's a single object that can hold a reference to a free function or an object/(const) method pair. Once the callback is constructed, it works completely transparent. All it shows to the client is a function that takes 0 parameter(s) and gives a returnvalue.
Definition at line 90 of file callback_r_0.h.
|
inline |
THE operator.
Executes the callback.
Definition at line 157 of file callback_r_0.h.
References isEmpty().