|
Urbi SDK Remote for C++
2.7.3
|
Main UObject class definition Each UObject instance corresponds to an URBI object. More...
#include <uobject.hh>


Public Member Functions | |
| UObject (impl::UContextImpl *impl=0) | |
| Call this constructor to create an UObject from C++. | |
| UObject (const std::string &, impl::UContextImpl *impl=0) | |
| Must be called by your constructor when called with a string. | |
| UObject (int, impl::UContextImpl *impl=0) | |
| Reserved for internal use. | |
| virtual | ~UObject () |
| UObject destructor. | |
| void | UNotifyChange (UVar &v, void(UObject::*fun)(UVar &)) |
| Call a function each time a variable is modified. | |
| template<typename T > | |
| void | UNotifyChange (UVar &v, void(UObject::*fun)(T)) |
| UnotifyChange() variant that passes the UVar value as argument to your callback function. | |
| void | UNotifyThreadedChange (UVar &v, void(UObject::*fun)(UVar &), LockMode m) |
| Similar to UNotifyChange(), but run function in a thread. | |
| void | UNotifyThreadedChange (UVar &v, void(UObject::*fun)(UVar &), LockSpec s) |
| Similar to UNotifyChange(), but run function in a thread. | |
| void | UNotifyAccess (UVar &v, void(UObject::*fun)(UVar &)) |
| Call a function each time a variable is accessed. | |
| void | UNotifyThreadedAccess (UVar &v, void(UObject::*fun)(UVar &), LockMode m) |
| void | UNotifyThreadedAccess (UVar &v, void(UObject::*fun)(UVar &), LockSpec s) |
| template<class T > | |
| TimerHandle | USetTimer (ufloat t, void(T::*fun)()) |
| Call fun every t milliseconds. | |
| bool | removeTimer (TimerHandle h) |
| Remove a timer registered with USetTimer. | |
| void | USync (UVar &v) |
| Request permanent synchronization for v. | |
| void | USetUpdate (ufloat period) |
| Set a timer that will call the update function every 'period' milliseconds. | |
| virtual int | update () |
| int | voidfun () |
| Void function used in USync callbacks. | |
| void | clean () |
| Remove all bindings, this method is called by the destructor. | |
| libport::ThreadPool::rTaskLock | getTaskLock (LockMode m, const std::string &what) |
| Find the TaskLock associated with lock mode m. | |
| libport::ThreadPool::rTaskLock | getTaskLock (LockSpec s, const std::string &what) |
| Find the TaskLock associated with lock specs s. | |
| impl::UObjectImpl * | impl_get () |
| virtual libport::ThreadPool::rTaskLock | getClassTaskLock () |
Public Attributes | |
| std::string | __name |
| Name of the object as seen in Urbi. | |
| std::string | classname |
| Name of the class the object is derived from. | |
| bool | derived |
| True when the object has been newed by an urbi command. | |
| UObjectList | members |
| UObjectHub * | objecthub |
| The hub, if it exists. | |
| bool | remote |
| Flag to know whether the UObject is in remote mode or not. | |
| UVar | load |
| The load attribute is standard and can be used to control the activity of the object. | |
| baseURBIStarter * | cloner |
Private Attributes | |
| UObjectData * | objectData |
| Pointer to a globalData structure specific to the remote/plugin architectures who defines it. | |
| impl::UObjectImpl * | impl_ |
| boost::unordered_map < std::string, libport::ThreadPool::rTaskLock > | taskLocks_ |
| libport::ThreadPool::rTaskLock | taskLock_ |
| Instance task lock. | |
Autogroup. | |
These functions are obsoleted, they are not supported in Urbi SDK 2.0. Set autogrouping facility for each new subclass created. | |
| URBI_SDK_DEPRECATED bool | autogroup |
| Add a group with a 's' after the base class name. | |
| URBI_SDK_DEPRECATED void | UAutoGroup () |
| virtual URBI_SDK_DEPRECATED void | addAutoGroup () |
| Called when a subclass is created if autogroup is true. | |
| virtual URBI_SDK_DEPRECATED void | UJoinGroup (const std::string &gpname) |
| Join the uobject to the 'gpname' group. | |
Main UObject class definition Each UObject instance corresponds to an URBI object.
It provides mechanisms to bind variables and functions between C++ and Urbi.
Definition at line 299 of file uobject.hh.
| urbi::UObject::UObject | ( | impl::UContextImpl * | impl = 0 | ) |
Call this constructor to create an UObject from C++.
Definition at line 202 of file uobject-common.cc.
References impl_, urbi::impl::UObjectImpl::initialize(), and objecthub.
| urbi::UObject::UObject | ( | const std::string & | s, |
| impl::UContextImpl * | impl = 0 |
||
| ) |
Must be called by your constructor when called with a string.
UObject constructor.
Definition at line 231 of file uobject-common.cc.
References __name, autogroup, impl_, urbi::UVar::init(), urbi::impl::UObjectImpl::initialize(), load, and objecthub.
| urbi::UObject::UObject | ( | int | , |
| impl::UContextImpl * | impl = 0 |
||
| ) |
Reserved for internal use.
Definition at line 215 of file uobject-common.cc.
References impl_, urbi::impl::UObjectImpl::initialize(), and objecthub.
| urbi::UObject::~UObject | ( | ) | [virtual] |
UObject destructor.
Definition at line 266 of file uobject-common.cc.
| void urbi::UObject::addAutoGroup | ( | ) | [virtual] |
Called when a subclass is created if autogroup is true.
Definition at line 254 of file uobject-common.cc.
References classname, and UJoinGroup().
| void urbi::UObject::clean | ( | ) | [inline] |
Remove all bindings, this method is called by the destructor.
Definition at line 45 of file uobject.hxx.
References urbi::impl::UObjectImpl::clean(), and impl_.
Referenced by ~UObject().
| libport::ThreadPool::rTaskLock urbi::UObject::getClassTaskLock | ( | ) | [virtual] |
Definition at line 280 of file uobject-common.cc.
Referenced by getTaskLock().
| libport::ThreadPool::rTaskLock urbi::UObject::getTaskLock | ( | LockMode | m, |
| const std::string & | what | ||
| ) | [inline] |
Find the TaskLock associated with lock mode m.
Definition at line 82 of file uobject.hxx.
| libport::ThreadPool::rTaskLock urbi::UObject::getTaskLock | ( | LockSpec | s, |
| const std::string & | what | ||
| ) | [inline] |
Find the TaskLock associated with lock specs s.
Definition at line 89 of file uobject.hxx.
References GD_CATEGORY(), getClassTaskLock(), urbi::LOCK_CLASS, urbi::LOCK_FUNCTION, urbi::LOCK_INSTANCE, urbi::LOCK_MODULE, urbi::LOCK_NONE, urbi::LockSpec::lockMode, urbi::LockSpec::maxQueueSize, taskLock_, and taskLocks_.
| impl::UObjectImpl * urbi::UObject::impl_get | ( | ) | [inline] |
Definition at line 75 of file uobject.hxx.
References impl_.
| bool urbi::UObject::removeTimer | ( | TimerHandle | h | ) | [inline] |
Remove a timer registered with USetTimer.
Definition at line 68 of file uobject.hxx.
References impl_, and urbi::impl::UObjectImpl::removeTimer().
| void urbi::UObject::UAutoGroup | ( | ) |
Definition at line 260 of file uobject-common.cc.
References autogroup.
Referenced by generic::generic().
| void urbi::UObject::UJoinGroup | ( | const std::string & | gpname | ) | [virtual] |
Join the uobject to the 'gpname' group.
Definition at line 273 of file uobject-common.cc.
References __name, and urbi::UContext::send().
Referenced by addAutoGroup().
| int urbi::UObject::update | ( | ) | [inline, virtual] |
Definition at line 31 of file uobject.hxx.
Referenced by urbi::impl::RemoteUObjectImpl::initialize().
| TimerHandle urbi::UObject::USetTimer | ( | ufloat | t, |
| void(T::*)() | fun | ||
| ) |
Call fun every t milliseconds.
| void urbi::UObject::USetUpdate | ( | ufloat | period | ) | [inline] |
Set a timer that will call the update function every 'period' milliseconds.
Definition at line 53 of file uobject.hxx.
References impl_, and urbi::impl::UObjectImpl::setUpdate().
| void urbi::UObject::USync | ( | UVar & | v | ) | [inline] |
Request permanent synchronization for v.
Definition at line 61 of file uobject.hxx.
References urbi::UVar::keepSynchronized().
| int urbi::UObject::voidfun | ( | ) | [inline] |
Void function used in USync callbacks.
Definition at line 38 of file uobject.hxx.
| std::string urbi::UObject::__name |
Name of the object as seen in Urbi.
Definition at line 462 of file uobject.hh.
Referenced by urbi::impl::RemoteUObjectImpl::clean(), urbi::InputPort::init(), urbi::impl::RemoteUObjectImpl::initialize(), urbi::impl::RemoteUObjectImpl::onUpdate(), urbi::operator,(), urbi::impl::UContextImpl::registerObject(), urbi::impl::RemoteUVarImpl::transmit(), UJoinGroup(), and UObject().
| URBI_SDK_DEPRECATED bool urbi::UObject::autogroup |
Add a group with a 's' after the base class name.
Definition at line 496 of file uobject.hh.
Referenced by UAutoGroup(), and UObject().
| std::string urbi::UObject::classname |
Name of the class the object is derived from.
Definition at line 464 of file uobject.hh.
Referenced by addAutoGroup().
Definition at line 518 of file uobject.hh.
Referenced by urbi::URBIStarter< T >::instanciate(), and urbi::impl::UContextImpl::registerObject().
True when the object has been newed by an urbi command.
Definition at line 466 of file uobject.hh.
impl::UObjectImpl* urbi::UObject::impl_ [private] |
Definition at line 529 of file uobject.hh.
Referenced by clean(), impl_get(), removeTimer(), UObject(), USetUpdate(), and ~UObject().
The load attribute is standard and can be used to control the activity of the object.
Definition at line 516 of file uobject.hh.
Referenced by UObject().
Definition at line 468 of file uobject.hh.
UObjectData* urbi::UObject::objectData [private] |
Pointer to a globalData structure specific to the remote/plugin architectures who defines it.
Definition at line 527 of file uobject.hh.
The hub, if it exists.
Definition at line 471 of file uobject.hh.
Referenced by urbi::impl::RemoteUObjectImpl::clean(), and UObject().
Flag to know whether the UObject is in remote mode or not.
Definition at line 503 of file uobject.hh.
libport::ThreadPool::rTaskLock urbi::UObject::taskLock_ [private] |
boost::unordered_map<std::string, libport::ThreadPool::rTaskLock> urbi::UObject::taskLocks_ [private] |
Definition at line 531 of file uobject.hh.
Referenced by getTaskLock().