Library of Assembled Shared Sources
lass::util::Callback0 Class Reference

callback with 0 parameter(s) and without returnvalue. More...

#include <callback_0.h>

Public Member Functions

 Callback0 ()
 Default constructor, construct empty callback.
 
template<typename Function>
 Callback0 (Function iFunction)
 callback to function or other callable entity.
 
template<typename ObjectPtr, typename Method>
 Callback0 (ObjectPtr iObject, Method iMethod)
 callback to method of object
 
 Callback0 (const Callback0 &iOther)
 copy constructor
 
 Callback0 (Callback0 &&iOther) noexcept
 move constructor
 
TSelfoperator= (const TSelf &iOther)
 assignment operator
 
TSelfoperator= (TSelf &&iOther) noexcept
 move assignment operator
 
void 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.)

bool operator!= (const Callback0 &iA, const Callback0 &iB)
 return true if two callbacks are different
 
Callback0 makeCallback (void(*iFunction)())
 make a Callback0 from a function
 
template<typename ObjectPtr, typename Object>
Callback0 makeCallback (ObjectPtr iObject, void(Object::*iMethod)())
 make a Callback0 from a object and method
 
template<typename ObjectPtr, typename Object>
Callback0 makeCallback (ObjectPtr iObject, void(Object::*iMethod)() const)
 make a Callback0 from a object and const method
 

Detailed Description

callback with 0 parameter(s) and without returnvalue.

Date
2002
Author
Bram de Greve [Bramz] (contact: bram@.nosp@m.coca.nosp@m.mware.nosp@m..com)

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 one parameter but gives no returnvalue.

Definition at line 83 of file callback_0.h.

Member Function Documentation

◆ operator()()

void lass::util::Callback0::operator() ( ) const
inline

THE operator.

Executes the callback.

Definition at line 150 of file callback_0.h.

References isEmpty().


The documentation for this class was generated from the following file: