TheRulbusDeviceList Class Reference

#include <RulbusDeviceList.h>

Inherits Singleton< TheRulbusDeviceList >.

List of all members.


Detailed Description

Class TheRulbusDeviceList maintains the handle -- RulbusDevice relationship. The DLL interface functions use it as follows:

So, the TheRulbusDeviceList owns the Rulbus devices on its list: When a Rulbus device is removed from the list, it is also destroyed.

Thread Safety

Access to the list is guarded with a semaphore, so that calls to add() and remove() from different threads of execution cannot interact destructively on the list.


Public Member Functions

void clear ()
 destruct all devices and empty the list.

void add (RulbusDevicePtr deviceptr)
 add a device to the list.

void remove (RulbusDevicePtr deviceptr)
 remove a device from the list.

void remove (int handle)
 remove a device from the list.

int open (Name aName)
 return a handle to the device specified by aName.

void close (int handle)
 close device represented by handle (no-op).

RulbusDeviceProxy get (int handle)
 return Rulbus device proxy for handle; may throw RulbusHandleError.

void check ()
 check configuration for name and address conflicts, used by ConfigParser; based on code by Jens Thoms Törring.

bool printOn (std::ostream &stream)
 print contents of device list to specified stream.


Protected Member Functions

 TheRulbusDeviceList ()
 constructor.

 ~TheRulbusDeviceList ()
 destructor.

 TheRulbusDeviceList (TheRulbusDeviceListCref rhs)
 prevent copying

TheRulbusDeviceList operator= (TheRulbusDeviceListCref rhs)
 prevent copying


Private Attributes

List theList
 the Rulbus device list

WindowsUtils::SemaphorePtr s
 semaphore to guard table access


Friends

class Singleton< TheRulbusDeviceList >


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