OSDL::Events::InputDevice Class Reference

#include <OSDLInputDevice.h>

Inheritance diagram for OSDL::Events::InputDevice:

[legend]
List of all members.

Detailed Description

Models an actual OSDL input device, instead of an abstract Ceylan input device.

The difference lies in the fact that OSDL controllers have to be aware of all the low level events that can occur, therefore they cannot be basic Ceylan::Controller. These last ones cannot be extended with low level events since it would make Ceylan depend on multimedia back-end (namely SDL).

The result is that input devices such as joysticks cannot be linked with abstract Ceylan::Controller instances, which as such would be useless. In order to have access to the specialized controllers we need, an OSDL input device linked with an OSDL controller is an interesting solution, insofar as it ensures that all actual input devices (ex : joysticks) can call, say, the axisChanged method of their controller : each actual input device will have to implement the getActualController method.

Definition at line 56 of file OSDLInputDevice.h.

Public Member Functions

 InputDevice () throw ()
 Constructs an actual input device not linked to any OSDL controller.
 InputDevice (OSDL::MVC::Controller &actualController) throw ()
 Constructs an actual input device that will send events to the specified OSDL controller.
virtual ~InputDevice () throw ()
 Basic virtual destructor.
virtual OSDL::MVC::ControllergetActualController () const throw ( EventsException )
 Returns the actual (OSDL) controller this input device should be linked to.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const throw ()
 Returns an user-friendly description of the state of this object.

Private Member Functions

 InputDevice (const InputDevice &source) throw ()
 Copy constructor made private to ensure that it will never be called.
InputDeviceoperator= (const InputDevice &source) throw ()
 Assignment operator made private to ensure that it will never be called.


Constructor & Destructor Documentation

InputDevice::InputDevice (  )  throw ()

Constructs an actual input device not linked to any OSDL controller.

Definition at line 13 of file OSDLInputDevice.cc.

InputDevice::InputDevice ( OSDL::MVC::Controller actualController  )  throw () [explicit]

Constructs an actual input device that will send events to the specified OSDL controller.

Definition at line 20 of file OSDLInputDevice.cc.

InputDevice::~InputDevice (  )  throw () [virtual]

Basic virtual destructor.

Definition at line 27 of file OSDLInputDevice.cc.

OSDL::Events::InputDevice::InputDevice ( const InputDevice source  )  throw () [explicit, private]

Copy constructor made private to ensure that it will never be called.

The compiler should complain whenever this undefined constructor is called, implicitly or not.


Member Function Documentation

OSDL::MVC::Controller & InputDevice::getActualController (  )  const throw ( EventsException ) [virtual]

Returns the actual (OSDL) controller this input device should be linked to.

Exceptions:
EventException if this input device is not linked to any controller, or if the controller is not an OSDL one.
See also:
isLinkedToController

Definition at line 33 of file OSDLInputDevice.cc.

const string InputDevice::toString ( Ceylan::VerbosityLevels  level = Ceylan::high  )  const throw () [virtual]

Returns an user-friendly description of the state of this object.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
Ceylan::TextDisplayable

Reimplemented in OSDL::Events::ClassicalJoystick, OSDL::Events::Joystick, and OSDL::Events::Mouse.

Definition at line 40 of file OSDLInputDevice.cc.

InputDevice& OSDL::Events::InputDevice::operator= ( const InputDevice source  )  throw () [private]

Assignment operator made private to ensure that it will never be called.

The compiler should complain whenever this undefined operator is called, implicitly or not.


The documentation for this class was generated from the following files:
Generated on Fri Mar 30 14:47:27 2007 for OSDL by  doxygen 1.5.1