OSDL::Events::InputDevice Class Reference

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

#include <OSDLInputDevice.h>

Inheritance diagram for OSDL::Events::InputDevice:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 InputDevice ()
 Constructs an actual input device not linked to any OSDL controller.
 InputDevice (OSDL::MVC::Controller &actualController)
 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
 Returns the actual (OSDL) controller this input device should be linked to.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const
 Returns an user-friendly description of the state of this object.

Private Member Functions

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

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 84 of file OSDLInputDevice.h.


Constructor & Destructor Documentation

InputDevice::InputDevice (  ) 

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

Definition at line 40 of file OSDLInputDevice.cc.

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

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

Definition at line 48 of file OSDLInputDevice.cc.

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

Basic virtual destructor.

Definition at line 56 of file OSDLInputDevice.cc.

OSDL::Events::InputDevice::InputDevice ( const InputDevice source  )  [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 [virtual]
InputDevice& OSDL::Events::InputDevice::operator= ( const InputDevice source  )  [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.

const string InputDevice::toString ( Ceylan::VerbosityLevels  level = Ceylan::high  )  const [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 72 of file OSDLInputDevice.cc.


The documentation for this class was generated from the following files:
Generated on Mon Nov 29 14:05:50 2010 for OSDL by  doxygen 1.6.3