Smart pointer

User side. Smart pointers are not required but all framework methods will return smart pointers. Class constructors are not private, the user is free to create proxies with regular pointers and the corresponding 'new, delete' instructions.

ALPtr<ALProxy> proxy = getParentBroker()->getProxy("ALMotion"); // proxy will be automatically deleted. proxy->callVoid("walk"...) ALProxy *proxy2 = new ALProxy("ALMotion"); // don't forget to delete proxy2 ALProxy *proxy3 = getParentBroker()->getProxy("ALMotion"); // forbidden





Copyright © 2010 Aldebaran-Robotics - All rights reserved