AccessEngine :: AEDevice :: AEInput :: GestureList :: GestureList :: Class GestureList
[hide private]
[frames] | no frames]

Class GestureList

source code

object --+
         |
        GestureList

Manages a list of Gesture objects in the order in which they occured. Represents a sequence of Gestures for the purposes of detecting and filtering that sequence when it occurs on an input device.

Instance Methods [hide private]
 
__init__(self, device, action_codes=None, gestures=None, copy_gestures=None)
Stores a reference to the input device.
source code
boolean
__eq__(self, other)
Compares this GestureList to the one provided to see if they represent the same sequence of Gestures on the same device.
source code
integer
__hash__(self)
Builds a hash code for this GestureList based on its Gesture contents by XORing their hash values together.
source code
Gesture
getGestureAt(self, i)
Gets the Gesture stored at the given index.
source code
 
addGesture(self, gesture)
Adds a Gesture to the end of this GestureList.
source code
integer
getNumGestures(self)
Gets the total number of Gestures currently in this GestureList.
source code
string
asString(self)
Gets a human readable representation of all the Gestures in this GestureList determined by the AEInput device on which they are performed.
source code
AEInput.AEInput
getDevice(self)
Gets the device on which the Gestures in this GestureList are performed.
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]
AEInput.AEInput device
Input device on which the Gesture sequence is performed
list of Gesture gestures
Gestures in the sequence
integer hash
Cached copy of the hash value of the GestureList
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, device, action_codes=None, gestures=None, copy_gestures=None)
(Constructor)

source code 
Stores a reference to the input device. If action codes are specified, wraps them in Gesture objects and stores those objects. If Gestures are specified, stores those objects. If Gestures to copy are given, makes a copy of those objects and stores the copies, not the original references. If none of these is given, creates an empty list to be filled with Gestures later.
Parameters:
Overrides: object.__init__

__eq__(self, other)
(Equality operator)

source code 
Compares this GestureList to the one provided to see if they represent the same sequence of Gestures on the same device. The comparison performed is order dependent since a different sequence of Gestures could represent a different input intention.
Parameters:
Returns: boolean
Is this GestureList equal to the one provided?

__hash__(self)
(Hashing function)

source code 
Builds a hash code for this GestureList based on its Gesture contents by XORing their hash values together. The hash code is used by an AEInput device to store and retrieve filters from a dictionary.
Returns: integer
Hash code for this GestureList
Overrides: object.__hash__

getGestureAt(self, i)

source code 
Gets the Gesture stored at the given index. If the index is invalid, raises IndexError.
Parameters:
  • i (integer) - Index of the Gesture to retrieve
Returns: Gesture
Gesture retrieved from this GestureList
Raises:
  • IndexError - When the index is invalid

addGesture(self, gesture)

source code 
Adds a Gesture to the end of this GestureList.
Parameters:

getNumGestures(self)

source code 
Gets the total number of Gestures currently in this GestureList.
Returns: integer
Gesture count

asString(self)

source code 
Gets a human readable representation of all the Gestures in this GestureList determined by the AEInput device on which they are performed.
Returns: string
Text representation of all the Gestures in this GestureList

getDevice(self)

source code 
Gets the device on which the Gestures in this GestureList are performed.
Returns: AEInput.AEInput
Device on which the Gestures in this GestureList are performed