#include <RulbusDeviceProxy.h>
The proxy returned can be used as follows.
Rulbus::to_rb8510( Rulbus::TheRulbusDeviceList::get( handle ) ).setVoltage( 1.25 );
Class RulbusDeviceProxy uses the initialization-is-acquisition idiom. When the proxy goes out of scope at the end of the expression, the resource is released.
Class RulbusDeviceProxy also uses move semantics on the copy(-assignment) constructors to transfer the ownership of the Rulbus device from the right-hand side to the left-hand side.
For more information on move-constructors, see [MVCTOR].
Public Member Functions | |
RulbusDeviceProxy (RulbusDevicePtr aPtr) | |
constructor. | |
RulbusDeviceProxy (RulbusDeviceProxyRef rhs) | |
move constructor. | |
~RulbusDeviceProxy () | |
destructor. | |
RulbusDeviceProxyRef | operator= (RulbusDeviceProxyRef rhs) |
move-assignment constructor. | |
operator RulbusDevicePtr () | |
return pointer to 'this' Rulbus device. | |
operator RulbusDeviceRef () | |
return reference to 'this' Rulbus device. | |
RulbusDevicePtr | operator-> () |
dereference 'this' Rulbus device. | |
RulbusDeviceRef | operator * () |
dereference 'this' Rulbus device. | |
RulbusDeviceRef | get () |
return reference to 'this' Rulbus device. | |
Protected Member Functions | |
RulbusDevicePtr | transfer () |
'move' pointer to calling method. | |
Protected Attributes | |
RulbusDevicePtr | thePtr |
the Rulbus device pointer | |
Static Protected Attributes | |
WindowsUtils::Semaphore | s |
guard Rulbus device access |