#include <boost/typeof/typeof.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/signals2/slot.hpp>
#include <boost/signals2/signal_type.hpp>
#include "Function.h"
Go to the source code of this file.
|
template<typename FuncT > |
SignalBase * | uLib::NewSignal (FuncT f) |
|
template<typename FuncT > |
void | uLib::ConnectSignal (SignalBase *sigb, FuncT slof, typename FunctionPointer< FuncT >::Object *receiver) |
|
#define _ULIB_DETAIL_SIGNAL_EMIT |
( |
|
_name, |
|
|
|
... |
|
) |
| |
Value:static BOOST_AUTO(sig,this->findOrAddSignal(&
_name)); \
sig->operator()(__VA_ARGS__);
#define _name
Definition: ObjectProps.h:61
#define SIGNAL |
( |
|
a | ) |
BOOST_STRINGIZE(a) |
#define signals /*virtual void init_signals();*/ public |
#define SLOT |
( |
|
a | ) |
BOOST_STRINGIZE(a) |
Utility macro to implement signal emission implementa una delle seguenti:
// metodo standard con cast // SignalBase * sig = this->findSignal((void (Ob1::*)(void))&Ob1::V0); typedef Signal<void()>::type SigT; if(sig) reinterpret_cast<SigT*>(sig)->operator()();
// cast automatico // static BOOST_AUTO(sig,this->findOrAddSignal(&Ob1::V0)); sig->operator()();