NLMISC::CInputDeviceServer Class Reference

Base class for an input device server. More...

#include <input_device_server.h>

List of all members.

Public Member Functions

void registerDevice (IInputDevice *device)
 register a device into this device server.
void removeDevice (IInputDevice *device)
 remove a device from this server (but does not delete it).
uint getNumDevices () const
IInputDevicegetDevice (uint index)
bool isDevice (IInputDevice *device) const
 Test whether the given device is handled by this server.
void poll (CEventServer *server)
 Retrieve datas from the devices, and submit them to the given CEventServer.
void submitEvent (IInputDeviceEvent *deviceEvent)
 Allow an input device to register an event. The event will then be deleted by this server.
virtual ~CInputDeviceServer ()

Private Types

typedef std::vector
< IInputDevice * > 
TDeviceCont
typedef std::vector
< IInputDeviceEvent * > 
TEventCont

Private Attributes

TDeviceCont _Devices
TEventCont _Events

Detailed Description

Base class for an input device server.

Unlike an event server, it manages several devices, and can sort their events (by date for example). It keeps a list of active devices. It can poll datas from every active device. It can sort devices messages to submit them in correct order to a CEventServer.

Definition at line 45 of file input_device_server.h.


Member Typedef Documentation

typedef std::vector<IInputDevice *> NLMISC::CInputDeviceServer::TDeviceCont [private]

Definition at line 65 of file input_device_server.h.

Definition at line 66 of file input_device_server.h.


Constructor & Destructor Documentation

virtual NLMISC::CInputDeviceServer::~CInputDeviceServer (  )  [inline, virtual]

Definition at line 63 of file input_device_server.h.


Member Function Documentation

IInputDevice* NLMISC::CInputDeviceServer::getDevice ( uint  index  )  [inline]

Definition at line 55 of file input_device_server.h.

References _Devices.

uint NLMISC::CInputDeviceServer::getNumDevices (  )  const [inline]

Definition at line 53 of file input_device_server.h.

References _Devices.

bool NLMISC::CInputDeviceServer::isDevice ( IInputDevice device  )  const

Test whether the given device is handled by this server.

Definition at line 48 of file input_device_server.cpp.

References _Devices.

Referenced by registerDevice().

void NLMISC::CInputDeviceServer::poll ( CEventServer server  ) 

Retrieve datas from the devices, and submit them to the given CEventServer.

Definition at line 65 of file input_device_server.cpp.

References _Devices, _Events, and nlassert.

void NLMISC::CInputDeviceServer::registerDevice ( IInputDevice device  ) 

register a device into this device server.

Definition at line 33 of file input_device_server.cpp.

References _Devices, isDevice(), and nlassert.

void NLMISC::CInputDeviceServer::removeDevice ( IInputDevice device  ) 

remove a device from this server (but does not delete it).

Definition at line 40 of file input_device_server.cpp.

References _Devices, and nlassert.

void NLMISC::CInputDeviceServer::submitEvent ( IInputDeviceEvent deviceEvent  ) 

Allow an input device to register an event. The event will then be deleted by this server.

Definition at line 106 of file input_device_server.cpp.

References _Events.


Member Data Documentation

Definition at line 69 of file input_device_server.h.

Referenced by poll(), and submitEvent().


The documentation for this class was generated from the following files:

Generated on Thu Jan 7 08:30:18 2010 for NeL by  doxygen 1.6.1