#include <Gizmo.hpp>
Public Member Functions | |
virtual GizmoClass | getClass () |
Get the class of the Gizmo. | |
int | getDeviceID () |
Get the Device ID. | |
int | getDeviceClassID () |
Get the Device Class ID. | |
virtual int | getKeyState (GizmoKey Key) |
Get a key state. | |
virtual std::string | getType () |
Get the type of the Gizmo. | |
virtual bool | processEvent (GizmoEvent *pEvent) |
Process an event. | |
void | setKeyState (GizmoKey Key, int State) |
Set a keystate of the Gizmo. | |
Gizmo () | |
Serialize Constructor. | |
Gizmo (GizmoClass Class, const H::DeviceInfo &deviceInfo, int DeviceID, int DeviceClassID) | |
Default Constructor. | |
virtual | ~Gizmo () |
Destructor. | |
Protected Attributes | |
GizmoClass | mClass |
Class of the Gizmo. | |
int | mDeviceID |
Unique ID of the device. | |
int | mDeviceClassID |
ID of the device in its class. | |
int | mKeyState [GIZMO_KEY_MAX] |
Gizmos's key states. | |
Friends | |
class | boost::serialization::access |
This class is the base of all Gizmos attached to the system. Each Gizmo must inherit this class
Definition at line 85 of file Gizmo.hpp.
Gizmo::Gizmo | ( | ) |
Gizmo::Gizmo | ( | GizmoClass | Class, | |
const H::DeviceInfo & | deviceInfo, | |||
int | DeviceID, | |||
int | DeviceClassID | |||
) |
Default Constructor.
Gizmo Default Constructor.
Definition at line 56 of file Gizmo.cpp.
References Gizmod::GIZMO_KEY_MAX, mClass, mDeviceClassID, mDeviceID, and mKeyState.
GizmoClass Gizmo::getClass | ( | ) | [virtual] |
int Gizmo::getDeviceID | ( | ) |
int Gizmo::getDeviceClassID | ( | ) |
Get the Device Class ID.
Effectively this can be used to find out which Powermate device an event belongs to, and so forth.
Definition at line 108 of file Gizmo.cpp.
References mDeviceClassID.
int Gizmo::getKeyState | ( | GizmoKey | Key | ) | [virtual] |
std::string Gizmo::getType | ( | ) | [virtual] |
Get the type of the Gizmo.
Get the type of Gizmo.
Reimplemented in Gizmod::GizmoATIX10, Gizmod::GizmoLIRC, Gizmod::GizmoPowermate, and Gizmod::GizmoStandard.
Definition at line 128 of file Gizmo.cpp.
References GIZMO_TYPE_UNSPECIFIED.
bool Gizmo::processEvent | ( | GizmoEvent * | pEvent | ) | [virtual] |
Process an event.
pEvent | The event to process |
Reimplemented in Gizmod::GizmoATIX10, Gizmod::GizmoLIRC, Gizmod::GizmoPowermate, and Gizmod::GizmoStandard.
void Gizmo::setKeyState | ( | GizmoKey | Key, | |
int | State | |||
) |
Set a keystate of the Gizmo.
Key | The key to change states | |
State | The new state (0 == off, 1 == on, 2 == repeating) |
Definition at line 147 of file Gizmo.cpp.
References mKeyState.
Referenced by Gizmod::GizmoStandard::processEvent(), Gizmod::GizmoPowermate::processEvent(), and Gizmod::GizmoATIX10::processEvent().