Base class for an input device server. More...
#include <input_device_server.h>
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 |
| IInputDevice * | getDevice (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 |
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.
typedef std::vector<IInputDevice *> NLMISC::CInputDeviceServer::TDeviceCont [private] |
Definition at line 65 of file input_device_server.h.
typedef std::vector<IInputDeviceEvent *> NLMISC::CInputDeviceServer::TEventCont [private] |
Definition at line 66 of file input_device_server.h.
| virtual NLMISC::CInputDeviceServer::~CInputDeviceServer | ( | ) | [inline, virtual] |
Definition at line 63 of file input_device_server.h.
| 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.
| 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.
| 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.
Definition at line 68 of file input_device_server.h.
Referenced by getDevice(), getNumDevices(), isDevice(), poll(), registerDevice(), and removeDevice().
Definition at line 69 of file input_device_server.h.
Referenced by poll(), and submitEvent().
1.6.1