Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mezzanine::Input::Device Class Referenceabstract

This is a base class for all input devices. More...

#include <device.h>

+ Inheritance diagram for Mezzanine::Input::Device:
+ Collaboration diagram for Mezzanine::Input::Device:

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.

Exceptions
Ifthe 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.
More...
 
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.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.
More...
 
Boole InputSequenceExists (const MetaCodeContainer &Codes)
 Checks to see if the provided sequence of MetaCode's is already being checked for.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.
More...
 
void RemoveAllInputSequences ()
 Removes all stored input sequences. More...
 
void RemoveInputSequence (const MetaCodeContainer &Codes)
 Removes the specified custom sequence of MetaCode's.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.
More...
 

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...
 

Detailed Description

This is a base class for all input devices.

Definition at line 55 of file device.h.

Member Function Documentation

virtual void Mezzanine::Input::Device::_Update ( const MetaCodeContainer DeltaCodes,
MetaCodeContainer GeneratedCodes 
)
pure virtual

Updates this device with the newest data.

Parameters
DeltaCodesA vector of the codes to process and update this device with.
GeneratedCodesA 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.

Exceptions
Ifthe 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.

Parameters
CodesA vector containing the sequence of MetaCode's to be added.
SequenceIDA unique UInt32 to be used as the identifier for this sequence when a MetaCode is generated.

Definition at line 58 of file device.cpp.

virtual UInt16 Mezzanine::Input::Device::GetDeviceIndex ( ) const
pure virtual

Gets the device index of this controller.

Returns
Returns a UInt16 representing the device index for 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.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.

Parameters
CodesA vector containing the sequence of MetaCode's to get the ID for.
Returns
Returns the ID of the provided sequence, or the max value of an Int32 if the sequence does not exist.

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.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.

Parameters
CodesA vector containing the sequence of MetaCode's to check for.
Returns
Returns true if the sequence already exists, false otherwise.

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)

Removes the specified custom sequence of MetaCode's.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.

Parameters
CodesA vector containing the sequence of MetaCode's to be removed.

Definition at line 70 of file device.cpp.

virtual void Mezzanine::Input::Device::VerifySequenceImpl ( const MetaCodeContainer Sequence) const
protectedpure virtual

Provides the device specific logic for filtering code sequences.

Parameters
SequenceThe MetaCode sequence to be verified.

Implemented in Mezzanine::Input::Mouse, Mezzanine::Input::Controller, Mezzanine::Input::ButtonDevice, and Mezzanine::Input::Keyboard.

Member Data Documentation

SequenceContainer Mezzanine::Input::Device::Sequences
protected

A container for storing and detecting input sequences for an input device.

Definition at line 60 of file device.h.


The documentation for this class was generated from the following files: