cmil::SDL::DeviceTranslator Class Reference

#include <SDLTranslator.h>

Inheritance diagram for cmil::SDL::DeviceTranslator:

Inheritance graph
[legend]
Collaboration diagram for cmil::SDL::DeviceTranslator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DeviceTranslator (System *const sys)
virtual ~DeviceTranslator ()
virtual std::string getName () const =0
virtual bool translate (const SDL_Event &input_event)=0
 This should return a boolean as to whether or not translation was successful.
virtual DeviceRegistrygetDevices ()=0
virtual unsigned long int getTimeRef () const =0
virtual bool addCustomDevice (InputDevice *device)=0
virtual bool operator== (const DeviceTranslator &rhs) const
 This is weak, but it intented for internal use by the library only.

Detailed Description

Definition at line 63 of file SDLTranslator.h.


Constructor & Destructor Documentation

cmil::SDL::DeviceTranslator::DeviceTranslator ( System *const   sys  )  [inline]

Definition at line 65 of file SDLTranslator.h.

00065 : Relay(sys) {}  

virtual cmil::SDL::DeviceTranslator::~DeviceTranslator (  )  [inline, virtual]

Definition at line 66 of file SDLTranslator.h.

00066 {};


Member Function Documentation

virtual bool cmil::SDL::DeviceTranslator::addCustomDevice ( InputDevice device  )  [pure virtual]

Implemented in cmil::SDL::tDeviceTranslator< DeviceBase >, cmil::SDL::tDeviceTranslator< cmil::Keyboard >, cmil::SDL::tDeviceTranslator< cmil::GameController >, and cmil::SDL::tDeviceTranslator< cmil::Mouse >.

Referenced by cmil::SDL::SDLSystem::init().

Here is the caller graph for this function:

virtual DeviceRegistry& cmil::SDL::DeviceTranslator::getDevices (  )  [pure virtual]

This retrieves a registry of devices provided by this translator, for instance, if there were only 1 joystick attached, it should return a registry containing just that joystick.

Implemented in cmil::SDL::tDeviceTranslator< DeviceBase >, cmil::SDL::SDLKeyboards, cmil::SDL::SDLMice, cmil::SDL::SDLControllers, cmil::SDL::tDeviceTranslator< cmil::Keyboard >, cmil::SDL::tDeviceTranslator< cmil::GameController >, and cmil::SDL::tDeviceTranslator< cmil::Mouse >.

Referenced by cmil::SDL::SDLTranslator::addTranslated().

Here is the caller graph for this function:

virtual std::string cmil::SDL::DeviceTranslator::getName (  )  const [pure virtual]

Reimplemented from cmil::SDL::Relay.

Implemented in cmil::SDL::tDeviceTranslator< DeviceBase >, cmil::SDL::SDLKeyboards, cmil::SDL::SDLMice, cmil::SDL::SDLControllers, cmil::SDL::tDeviceTranslator< cmil::Keyboard >, cmil::SDL::tDeviceTranslator< cmil::GameController >, and cmil::SDL::tDeviceTranslator< cmil::Mouse >.

Referenced by operator==().

Here is the caller graph for this function:

virtual unsigned long int cmil::SDL::DeviceTranslator::getTimeRef (  )  const [pure virtual]

Implements cmil::SDL::Relay.

Implemented in cmil::SDL::tDeviceTranslator< DeviceBase >, cmil::SDL::tDeviceTranslator< cmil::Keyboard >, cmil::SDL::tDeviceTranslator< cmil::GameController >, and cmil::SDL::tDeviceTranslator< cmil::Mouse >.

virtual bool cmil::SDL::DeviceTranslator::operator== ( const DeviceTranslator rhs  )  const [inline, virtual]

This is weak, but it intented for internal use by the library only.

Definition at line 83 of file SDLTranslator.h.

References getName(), and Logger::log_debug().

00083                                                                   {
00084         log_debug("calling operator==");
00085         return (getName() == rhs.getName());
00086        }  

Here is the call graph for this function:

virtual bool cmil::SDL::DeviceTranslator::translate ( const SDL_Event &  input_event  )  [pure virtual]

This should return a boolean as to whether or not translation was successful.

Implemented in cmil::SDL::tDeviceTranslator< DeviceBase >, cmil::SDL::SDLKeyboards, cmil::SDL::SDLMice, cmil::SDL::SDLControllers, cmil::SDL::tDeviceTranslator< cmil::Keyboard >, cmil::SDL::tDeviceTranslator< cmil::GameController >, and cmil::SDL::tDeviceTranslator< cmil::Mouse >.


The documentation for this class was generated from the following file:
(c) 2006-2007 John P. Feltz
Generated on Wed Jul 25 16:08:03 2007 for Common Media Input Layer by doxygen 1.4.7

SourceForge.net Logo