Urbi SDK Remote for C++  2.7.5
Change/Access callback registration.

All the registered callback functions can take no argument, a reference to an UVar, or any type convertible from UValue. More...

Functions

void urbi::UObject::UNotifyChange (UVar &v, void(UObject::*fun)(UVar &))
 Call a function each time a variable is modified.
template<typename T >
void urbi::UObject::UNotifyChange (UVar &v, void(UObject::*fun)(T))
 UnotifyChange() variant that passes the UVar value as argument to your callback function.
void urbi::UObject::UNotifyThreadedChange (UVar &v, void(UObject::*fun)(UVar &), LockMode m)
 Similar to UNotifyChange(), but run function in a thread.
void urbi::UObject::UNotifyThreadedChange (UVar &v, void(UObject::*fun)(UVar &), LockSpec s)
 Similar to UNotifyChange(), but run function in a thread.
void urbi::UObject::UNotifyAccess (UVar &v, void(UObject::*fun)(UVar &))
 Call a function each time a variable is accessed.
void urbi::UObject::UNotifyThreadedAccess (UVar &v, void(UObject::*fun)(UVar &), LockMode m)
void urbi::UObject::UNotifyThreadedAccess (UVar &v, void(UObject::*fun)(UVar &), LockSpec s)

Detailed Description

All the registered callback functions can take no argument, a reference to an UVar, or any type convertible from UValue.

The last kind will be called with the current value contained in the UVar.


Function Documentation

void urbi::UObject::UNotifyAccess ( UVar v,
void(UObject::*)(UVar &)  fun 
)

Call a function each time a variable is accessed.

Parameters:
vthe variable to monitor.
funthe function to call each time the variable v is accessed. The function is called right before the variable v is accessed, giving fun the opportunity to modify it.

Referenced by sensor::sensor(), and uaccess::uaccess().

void urbi::UObject::UNotifyChange ( UVar v,
void(UObject::*)(UVar &)  fun 
)

Call a function each time a variable is modified.

Parameters:
vthe variable to monitor.
funthe function to call each time the variable v is modified. The function is called rigth after the variable v is modified.

Referenced by generic::generic(), uchange::init(), UMachine::init(), remote::remote(), sensor::sensor(), and sensor2::sensor2().

template<typename T >
void urbi::UObject::UNotifyChange ( UVar v,
void(UObject::*)(T)  fun 
)

UnotifyChange() variant that passes the UVar value as argument to your callback function.

void urbi::UObject::UNotifyThreadedAccess ( UVar v,
void(UObject::*)(UVar &)  fun,
LockMode  m 
)
void urbi::UObject::UNotifyThreadedAccess ( UVar v,
void(UObject::*)(UVar &)  fun,
LockSpec  s 
)
void urbi::UObject::UNotifyThreadedChange ( UVar v,
void(UObject::*)(UVar &)  fun,
LockMode  m 
)

Similar to UNotifyChange(), but run function in a thread.

Parameters:
vthe variable to monitor.
funthe function to call.
mthe locking mode to use.
void urbi::UObject::UNotifyThreadedChange ( UVar v,
void(UObject::*)(UVar &)  fun,
LockSpec  s 
)

Similar to UNotifyChange(), but run function in a thread.

Parameters:
vthe variable to monitor.
funthe function to call.
sthe locking specifications to use.