# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::CInputDeviceServer Class Reference

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

#include <input_device_server.h>

List of all members.

Public Methods

void registerDevice (IInputDevice *device)
 register a device into this device server. More...

void removeDevice (IInputDevice *device)
 remove a device from this server (but does not delete it). More...

uint getNumDevices () const
IInputDevicegetDevice (uint index)
bool isDevice (IInputDevice *device) const
 Test wether the given device is handled by this server. More...

void poll (CEventServer *server)
 Retrieve datas from the devices, and submit them to the given CEventServer. More...

void submitEvent (IInputDeviceEvent *deviceEvent)
 Allow an input device to register an event. The event will then be deleted by this server. More...

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 47 of file input_device_server.h.


Member Typedef Documentation

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

Definition at line 67 of file input_device_server.h.

typedef std::vector<IInputDeviceEvent *> NLMISC::CInputDeviceServer::TEventCont [private]
 

Definition at line 68 of file input_device_server.h.


Constructor & Destructor Documentation

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

Definition at line 65 of file input_device_server.h.


Member Function Documentation

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

Definition at line 57 of file input_device_server.h.

References _Devices, and index.

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

Definition at line 55 of file input_device_server.h.

References _Devices.

bool NLMISC::CInputDeviceServer::isDevice IInputDevice   device const
 

Test wether the given device is handled by this server.

Definition at line 50 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 67 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 35 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 42 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 108 of file input_device_server.cpp.

References _Events.


Member Data Documentation

TDeviceCont NLMISC::CInputDeviceServer::_Devices [private]
 

Definition at line 70 of file input_device_server.h.

Referenced by getDevice, getNumDevices, isDevice, poll, registerDevice, and removeDevice.

TEventCont NLMISC::CInputDeviceServer::_Events [private]
 

Definition at line 71 of file input_device_server.h.

Referenced by poll, and submitEvent.


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