This is a base class for all input devices. More...
#include <device.h>
Public Member Functions | |||
Device () | |||
Class constructor. | |||
virtual | ~Device () | ||
Class destructor. | |||
virtual void | _Update (const MetaCodeContainer &DeltaCodes, MetaCodeContainer &GeneratedCodes)=0 | ||
Updates this device with the newest data. More... | |||
void | AddInputSequence (const MetaCodeContainer &Codes, const Int32 &SequenceID) | ||
Adds a custom sequence of inputs that this system will look for and generate MetaCode's for when they occur.
| |||
virtual UInt16 | GetDeviceIndex () const =0 | ||
Gets the device index of this controller. More... | |||
Int32 | GetIDofInputSequence (const MetaCodeContainer &Codes) | ||
Gets the ID of the provided sequence of MetaCode's.
| |||
Boole | InputSequenceExists (const MetaCodeContainer &Codes) | ||
Checks to see if the provided sequence of MetaCode's is already being checked for.
| |||
void | RemoveAllInputSequences () | ||
Removes all stored input sequences. More... | |||
void | RemoveInputSequence (const MetaCodeContainer &Codes) | ||
Removes the specified custom sequence of MetaCode's.
| |||
Protected Member Functions | |
virtual void | VerifySequenceImpl (const MetaCodeContainer &Sequence) const =0 |
Provides the device specific logic for filtering code sequences. More... | |
Protected Attributes | |
SequenceContainer | Sequences |
A container for storing and detecting input sequences for an input device. More... | |
|
pure virtual |
Updates this device with the newest data.
DeltaCodes | A vector of the codes to process and update this device with. |
GeneratedCodes | A vector to which generated codes (sequence or otherwise) will be added. |
Implemented in Mezzanine::Input::ButtonDevice.
void Mezzanine::Input::Device::AddInputSequence | ( | const MetaCodeContainer & | Codes, |
const Int32 & | SequenceID | ||
) |
Adds a custom sequence of inputs that this system will look for and generate MetaCode's for when they occur.
If | the vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. An exception can also be thrown if the ID provided is the max value of an Int32. |
Codes | A vector containing the sequence of MetaCode's to be added. |
SequenceID | A unique UInt32 to be used as the identifier for this sequence when a MetaCode is generated. |
Definition at line 58 of file device.cpp.
|
pure virtual |
Gets the device index of this controller.
Implemented in Mezzanine::Input::Mouse, Mezzanine::Input::Controller, and Mezzanine::Input::Keyboard.
Int32 Mezzanine::Input::Device::GetIDofInputSequence | ( | const MetaCodeContainer & | Codes | ) |
Gets the ID of the provided sequence of MetaCode's.
If | the vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. |
Codes | A vector containing the sequence of MetaCode's to get the ID for. |
Definition at line 67 of file device.cpp.
Boole Mezzanine::Input::Device::InputSequenceExists | ( | const MetaCodeContainer & | Codes | ) |
Checks to see if the provided sequence of MetaCode's is already being checked for.
If | the vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. |
Codes | A vector containing the sequence of MetaCode's to check for. |
Definition at line 64 of file device.cpp.
void Mezzanine::Input::Device::RemoveAllInputSequences | ( | ) |
Removes all stored input sequences.
Definition at line 73 of file device.cpp.
void Mezzanine::Input::Device::RemoveInputSequence | ( | const MetaCodeContainer & | Codes | ) |
|
protectedpure virtual |
Provides the device specific logic for filtering code sequences.
Sequence | The MetaCode sequence to be verified. |
Implemented in Mezzanine::Input::Mouse, Mezzanine::Input::Controller, Mezzanine::Input::ButtonDevice, and Mezzanine::Input::Keyboard.
|
protected |