| Trees | Indices | Help |
|---|
|
|
object --+
|
Gesture
Represents one or more device specific input actions. Maintains a list of action codes specific to a AEInput device as well as a reference to the device itself. Maintains a separate list of the action codes sorted according to the order specified by the AEInput device owning this Gesture in order to speed comparisons of two Gestures. Maintains a hash value computed by XORing the sorted action codes in order to support the deterministic hashing of Gestures with the same action codes to the same bin in a dictionary. Both the cached sorted list and the hash code are reset on each successful call to Gesture.addActionCode.
|
|||
|
|||
| string |
|
||
| boolean |
|
||
| iterator |
|
||
| boolean |
|
||
| integer |
|
||
| integer |
|
||
| AEInput.AEInput |
|
||
|
|||
|
|||
|
|||
| list of integer |
|
||
|
|||
| list of integer |
|
||
| integer |
|
||
| string |
|
||
|
Inherited from |
|||
|
|||
| list of integer |
action_codes Codes for the actions performed on the device forming this Gesture |
||
| AEInput.AEInput |
device Input device on which the Gesture is performed |
||
| integer |
hash Cached copy of the hash value of the Gesture |
||
| list of integer |
sorted_codes Cached action codes sorted by the device owning this Gesture |
||
|
|||
|
Inherited from |
|||
|
|||
Stores a reference to the input device. Stores a copy of the the provided action codes or gets a copy of the action codes from the provided Gesture. If neither is specified, creates an empty action code list.
|
Gets a human readable representation of the Gesture as a string from asString.
|
Compares this Gesture to the one provided. The comparison is performed independent of the order of the actions forming the gesture by using Gesture.getSortedActionCodes. |
Gets an iterator over the action codes in this Gesture.
|
Gets if this Gesture contains the given action code.
|
Builds a hash code for this Gesture based on its action code contents by XORing them together. The hash code is used by a GestureList in building its hash code. The action codes are sorted in device dependent order using Gesture.getSortedActionCodes before XORing to ensure two Gestures with the same actions hash to the same value.
|
Gets the number of codes in the current gesture.
|
Gets the device on which this Gesture is performed.
|
Adds the given action code to this Gesture. If the Gesture is full (i.e. it has the maximum number of action as determined by its device), a ValueError is raised. If the Gesture is not full, the new action code is added to the end of action_codes. If the action code was already in the Gesture, the action code is moved to the end of action_codes.
|
Deletes an action code from this Gesture. |
Gets a copy of all the action codes in this Gesture. Makes a fast copy by taking a slice using the start and end slice defaults.
|
Gets a reference to the list of action codes in this Gesture. The reference to the list should be used for read-only access even though protections against modification are not used. This method exists solely to offset the time cost incurred by making a copy of actions using getActionCodes. |
Gets a copy of all the action codes in this Gesture in a sort order determined by the AEInput device on which the actions are performed.
|
Gets the number of action codes stored in this Gesture.
|
Gets a human readable representation of the action codes in this Gesture determined by the AEInput device on which the actions were performed.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Mon Jun 4 15:33:16 2007 | http://epydoc.sourceforge.net |