RulbusDeviceProxy Class Reference

#include <RulbusDeviceProxy.h>

List of all members.


Detailed Description

Class RulbusDeviceProxy is returned by class TheRulbusDeviceList as a resource protecting proxy: it is used to protect the Rulbus device from simultaneous access from different threads of execution.

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


The documentation for this class was generated from the following files:
Generated on Tue Oct 12 14:12:05 2004 for Rulbus Device Class Library for Microsoft Windows by doxygen 1.3.4