|
Urbi SDK Remote for C++
2.7.5
|
Function and Event storage mechanism This heavily overloaded class is the only way in C++ to make life easy from the the interface user point's of view. More...
#include <ucallbacks.hh>


Public Types | |
| typedef boost::function2< void, UValue &, const std::exception * > | OnDone |
Public Member Functions | |
| UGenericCallback (UObject &owner, UVar *target, const std::string &type, const std::string &name, int size, impl::UContextImpl *ctx) | |
| UGenericCallback (UObject &owner, UVar *target, const std::string &type, const std::string &name, impl::UContextImpl *ctx) | |
| virtual | ~UGenericCallback () |
| void | registerCallback () |
| const std::string & | getName () const |
| void | setAsync (libport::ThreadPool::rTaskLock lock) |
| Set this callback to asynchronous mode using mode locking mode. | |
| void | eval (UList ¶m, OnDone onDone=0) |
| Start evaluation, call onDone with result when done. | |
| void | syncEval (UList ¶m, OnDone onDone=0) |
| Force synchronous evaluation. | |
| virtual UValue | __evalcall (UList ¶m)=0 |
| bool | isSynchronous () const |
| Returns whether the call is synchronous or not. | |
Static Public Member Functions | |
| static libport::ThreadPool & | threadPool () |
| Return the thread pool to use. | |
Public Attributes | |
| ufloat | period |
| Period of timers. | |
| int | nbparam |
| Nb params of the callbacked function. | |
| std::string | objname |
| Name of the UObject that created the callback. | |
| std::string | type |
| std::string | name |
| Name of the hooked variable. | |
| UVar * | target |
| Ptr to the hooked UVar, optional. | |
| impl::UGenericCallbackImpl * | impl_ |
| UObject & | owner |
Static Protected Member Functions | |
| template<typename T > | |
| static impl::UContextImpl * | fetchContext (T *ptr, libport::meta::True) |
| template<typename T > | |
| static impl::UContextImpl * | fetchContext (T *, libport::meta::False) |
Protected Attributes | |
| libport::ThreadPool::rTaskLock | taskLock |
| TaskLock to use. | |
| bool | synchronous_ |
| True if call must be made synchronously. | |
Function and Event storage mechanism This heavily overloaded class is the only way in C++ to make life easy from the the interface user point's of view.
Definition at line 55 of file ucallbacks.hh.
| typedef boost::function2<void, UValue&, const std::exception*> urbi::UGenericCallback::OnDone |
Definition at line 81 of file ucallbacks.hh.
| urbi::UGenericCallback::UGenericCallback | ( | UObject & | owner, |
| UVar * | target, | ||
| const std::string & | type, | ||
| const std::string & | name, | ||
| int | size, | ||
| impl::UContextImpl * | ctx | ||
| ) |
Definition at line 68 of file uobject-common.cc.
References urbi::UVar::check(), urbi::UContext::ctx_, urbi::impl::UContextImpl::getGenericCallbackImpl(), impl_, urbi::impl::UGenericCallbackImpl::initialize(), and urbi::UVar::owned.
| urbi::UGenericCallback::UGenericCallback | ( | UObject & | owner, |
| UVar * | target, | ||
| const std::string & | type, | ||
| const std::string & | name, | ||
| impl::UContextImpl * | ctx | ||
| ) |
Definition at line 89 of file uobject-common.cc.
References urbi::UVar::check(), urbi::UContext::ctx_, urbi::impl::UContextImpl::getGenericCallbackImpl(), impl_, and urbi::impl::UGenericCallbackImpl::initialize().
| urbi::UGenericCallback::~UGenericCallback | ( | ) | [virtual] |
Definition at line 108 of file uobject-common.cc.
References urbi::impl::UGenericCallbackImpl::clear(), and impl_.
Implemented in urbi::UBoostFunctionCallback10< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >, urbi::UBoostFunctionCallback9< R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >, urbi::UBoostFunctionCallback8< R, P1, P2, P3, P4, P5, P6, P7, P8 >, urbi::UBoostFunctionCallback7< R, P1, P2, P3, P4, P5, P6, P7 >, urbi::UBoostFunctionCallback6< R, P1, P2, P3, P4, P5, P6 >, urbi::UBoostFunctionCallback5< R, P1, P2, P3, P4, P5 >, urbi::UBoostFunctionCallback4< R, P1, P2, P3, P4 >, urbi::UBoostFunctionCallback3< R, P1, P2, P3 >, urbi::UBoostFunctionCallback2< R, P1, P2 >, urbi::UBoostFunctionCallback1< R, P1 >, urbi::UBoostFunctionCallback0< R >, urbi::UFCallback16< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16 >, urbi::UCallback16< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16 >, urbi::UFCallback15< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 >, urbi::UCallback15< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 >, urbi::UFCallback14< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 >, urbi::UCallback14< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 >, urbi::UFCallback13< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 >, urbi::UCallback13< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 >, urbi::UFCallback12< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 >, urbi::UCallback12< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 >, urbi::UFCallback11< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 >, urbi::UCallback11< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 >, urbi::UFCallback10< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >, urbi::UCallback10< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >, urbi::UFCallback9< R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >, urbi::UCallback9< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >, urbi::UFCallback8< R, P1, P2, P3, P4, P5, P6, P7, P8 >, urbi::UCallback8< OBJ, R, P1, P2, P3, P4, P5, P6, P7, P8 >, urbi::UFCallback7< R, P1, P2, P3, P4, P5, P6, P7 >, urbi::UCallback7< OBJ, R, P1, P2, P3, P4, P5, P6, P7 >, urbi::UFCallback6< R, P1, P2, P3, P4, P5, P6 >, urbi::UCallback6< OBJ, R, P1, P2, P3, P4, P5, P6 >, urbi::UFCallback5< R, P1, P2, P3, P4, P5 >, urbi::UCallback5< OBJ, R, P1, P2, P3, P4, P5 >, urbi::UFCallback4< R, P1, P2, P3, P4 >, urbi::UCallback4< OBJ, R, P1, P2, P3, P4 >, urbi::UFCallback3< R, P1, P2, P3 >, urbi::UCallback3< OBJ, R, P1, P2, P3 >, urbi::UFCallback2< R, P1, P2 >, urbi::UCallback2< OBJ, R, P1, P2 >, urbi::UFCallback1< R, P1 >, urbi::UCallback1< OBJ, R, P1 >, urbi::UFCallback0< R >, and urbi::UCallback0< OBJ, R >.
Referenced by urbi::impl::RemoteUContextImpl::localCall(), and syncEval().
Start evaluation, call onDone with result when done.
Synchronous if isSynchronous(), asynchronous else.
Definition at line 151 of file uobject-common.cc.
References onDone(), syncEval(), synchronous_, taskLock, and threadPool().
Referenced by urbi::impl::RemoteUContextImpl::assignMessage(), and urbi::impl::RemoteUContextImpl::evalFunctionMessage().
| static impl::UContextImpl* urbi::UGenericCallback::fetchContext | ( | T * | ptr, |
| libport::meta::True | |||
| ) | [inline, static, protected] |
Definition at line 115 of file ucallbacks.hh.
| static impl::UContextImpl* urbi::UGenericCallback::fetchContext | ( | T * | , |
| libport::meta::False | |||
| ) | [inline, static, protected] |
Definition at line 121 of file ucallbacks.hh.
References urbi::getCurrentContext().
| const std::string& urbi::UGenericCallback::getName | ( | ) | const [inline] |
Definition at line 73 of file ucallbacks.hh.
References urbi::name().
| bool urbi::UGenericCallback::isSynchronous | ( | ) | const |
Returns whether the call is synchronous or not.
Definition at line 121 of file uobject-common.cc.
References synchronous_.
| void urbi::UGenericCallback::registerCallback | ( | ) |
Definition at line 115 of file uobject-common.cc.
References impl_, and urbi::impl::UGenericCallbackImpl::registerCallback().
Referenced by urbi::UBoostFunctionCallback0< R >::UBoostFunctionCallback0(), urbi::UBoostFunctionCallback1< R, P1 >::UBoostFunctionCallback1(), urbi::UBoostFunctionCallback10< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >::UBoostFunctionCallback10(), urbi::UBoostFunctionCallback2< R, P1, P2 >::UBoostFunctionCallback2(), urbi::UBoostFunctionCallback3< R, P1, P2, P3 >::UBoostFunctionCallback3(), urbi::UBoostFunctionCallback4< R, P1, P2, P3, P4 >::UBoostFunctionCallback4(), urbi::UBoostFunctionCallback5< R, P1, P2, P3, P4, P5 >::UBoostFunctionCallback5(), urbi::UBoostFunctionCallback6< R, P1, P2, P3, P4, P5, P6 >::UBoostFunctionCallback6(), urbi::UBoostFunctionCallback7< R, P1, P2, P3, P4, P5, P6, P7 >::UBoostFunctionCallback7(), urbi::UBoostFunctionCallback8< R, P1, P2, P3, P4, P5, P6, P7, P8 >::UBoostFunctionCallback8(), urbi::UBoostFunctionCallback9< R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >::UBoostFunctionCallback9(), urbi::UFCallback0< R >::UFCallback0(), urbi::UFCallback1< R, P1 >::UFCallback1(), urbi::UFCallback10< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >::UFCallback10(), urbi::UFCallback11< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 >::UFCallback11(), urbi::UFCallback12< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 >::UFCallback12(), urbi::UFCallback13< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 >::UFCallback13(), urbi::UFCallback14< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 >::UFCallback14(), urbi::UFCallback15< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 >::UFCallback15(), urbi::UFCallback16< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16 >::UFCallback16(), urbi::UFCallback2< R, P1, P2 >::UFCallback2(), urbi::UFCallback3< R, P1, P2, P3 >::UFCallback3(), urbi::UFCallback4< R, P1, P2, P3, P4 >::UFCallback4(), urbi::UFCallback5< R, P1, P2, P3, P4, P5 >::UFCallback5(), urbi::UFCallback6< R, P1, P2, P3, P4, P5, P6 >::UFCallback6(), urbi::UFCallback7< R, P1, P2, P3, P4, P5, P6, P7 >::UFCallback7(), urbi::UFCallback8< R, P1, P2, P3, P4, P5, P6, P7, P8 >::UFCallback8(), and urbi::UFCallback9< R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >::UFCallback9().
| void urbi::UGenericCallback::setAsync | ( | libport::ThreadPool::rTaskLock | lock | ) |
Set this callback to asynchronous mode using mode locking mode.
Definition at line 179 of file uobject-common.cc.
References synchronous_, and taskLock.
Force synchronous evaluation.
Definition at line 127 of file uobject-common.cc.
References __evalcall(), and onDone().
Referenced by eval().
| libport::ThreadPool & urbi::UGenericCallback::threadPool | ( | ) | [static] |
Return the thread pool to use.
Definition at line 186 of file uobject-common.cc.
Referenced by eval(), and urbi::setThreadLimit().
Definition at line 103 of file ucallbacks.hh.
Referenced by registerCallback(), UGenericCallback(), and ~UGenericCallback().
| std::string urbi::UGenericCallback::name |
Name of the hooked variable.
Definition at line 100 of file ucallbacks.hh.
Referenced by urbi::impl::RemoteUGenericCallbackImpl::initialize(), urbi::impl::RemoteUGenericCallbackImpl::registerCallback(), and urbi::impl::RemoteUVarImpl::unnotify().
Nb params of the callbacked function.
Definition at line 94 of file ucallbacks.hh.
Referenced by urbi::impl::RemoteUGenericCallbackImpl::initialize(), urbi::impl::RemoteUGenericCallbackImpl::registerCallback(), urbi::UBoostFunctionCallback0< R >::UBoostFunctionCallback0(), urbi::UBoostFunctionCallback1< R, P1 >::UBoostFunctionCallback1(), urbi::UBoostFunctionCallback10< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >::UBoostFunctionCallback10(), urbi::UBoostFunctionCallback2< R, P1, P2 >::UBoostFunctionCallback2(), urbi::UBoostFunctionCallback3< R, P1, P2, P3 >::UBoostFunctionCallback3(), urbi::UBoostFunctionCallback4< R, P1, P2, P3, P4 >::UBoostFunctionCallback4(), urbi::UBoostFunctionCallback5< R, P1, P2, P3, P4, P5 >::UBoostFunctionCallback5(), urbi::UBoostFunctionCallback6< R, P1, P2, P3, P4, P5, P6 >::UBoostFunctionCallback6(), urbi::UBoostFunctionCallback7< R, P1, P2, P3, P4, P5, P6, P7 >::UBoostFunctionCallback7(), urbi::UBoostFunctionCallback8< R, P1, P2, P3, P4, P5, P6, P7, P8 >::UBoostFunctionCallback8(), urbi::UBoostFunctionCallback9< R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >::UBoostFunctionCallback9(), urbi::UFCallback0< R >::UFCallback0(), urbi::UFCallback1< R, P1 >::UFCallback1(), urbi::UFCallback10< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >::UFCallback10(), urbi::UFCallback11< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 >::UFCallback11(), urbi::UFCallback12< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 >::UFCallback12(), urbi::UFCallback13< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 >::UFCallback13(), urbi::UFCallback14< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 >::UFCallback14(), urbi::UFCallback15< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 >::UFCallback15(), urbi::UFCallback16< R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16 >::UFCallback16(), urbi::UFCallback2< R, P1, P2 >::UFCallback2(), urbi::UFCallback3< R, P1, P2, P3 >::UFCallback3(), urbi::UFCallback4< R, P1, P2, P3, P4 >::UFCallback4(), urbi::UFCallback5< R, P1, P2, P3, P4, P5 >::UFCallback5(), urbi::UFCallback6< R, P1, P2, P3, P4, P5, P6 >::UFCallback6(), urbi::UFCallback7< R, P1, P2, P3, P4, P5, P6, P7 >::UFCallback7(), urbi::UFCallback8< R, P1, P2, P3, P4, P5, P6, P7, P8 >::UFCallback8(), and urbi::UFCallback9< R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >::UFCallback9().
| std::string urbi::UGenericCallback::objname |
Name of the UObject that created the callback.
Definition at line 97 of file ucallbacks.hh.
Referenced by urbi::impl::RemoteUGenericCallbackImpl::initialize().
Definition at line 104 of file ucallbacks.hh.
Period of timers.
Definition at line 91 of file ucallbacks.hh.
bool urbi::UGenericCallback::synchronous_ [protected] |
True if call must be made synchronously.
Definition at line 113 of file ucallbacks.hh.
Referenced by eval(), isSynchronous(), and setAsync().
Ptr to the hooked UVar, optional.
Definition at line 102 of file ucallbacks.hh.
Referenced by urbi::impl::RemoteUContextImpl::assignMessage(), and urbi::impl::RemoteUGenericCallbackImpl::registerCallback().
libport::ThreadPool::rTaskLock urbi::UGenericCallback::taskLock [protected] |
TaskLock to use.
Definition at line 111 of file ucallbacks.hh.
Referenced by eval(), and setAsync().
| std::string urbi::UGenericCallback::type |
Definition at line 98 of file ucallbacks.hh.
Referenced by urbi::impl::RemoteUGenericCallbackImpl::initialize(), urbi::impl::RemoteUGenericCallbackImpl::registerCallback(), and urbi::impl::RemoteUVarImpl::unnotify().