Package AEEvent :: Module Base :: Class AccessEngineEvent
[hide private]
[frames] | no frames]

Class AccessEngineEvent

source code

object --+
         |
        AccessEngineEvent

Most base class for all AccessEngine events. Supports the concept of a priority which may be used to prioritize event execution.

Instance Methods [hide private]
 
__init__(self, priority=AEConstants.EXEC_NORMAL, focused=False, **kwargs)
Stores the event priority and whether the event source was focused or not.
source code
string
__str__(self)
Returns the name of this event.
source code
boolean
execute(self, **kwargs)
Executes the logic that will handle this event.
source code
integer
getPriority(self)
Returns: Current priority value
source code
 
setPriority(self, priority) source code
 
setLayer(self, layer) source code
integer
getLayer(self)
Gets the layer for this event.
source code
dictionary
getDataForTask(self)
Fetches data out of an AccessEngineEvent for use by a Task.
source code
float
getTimestamp(self)
Gets the timestamp for when the event occurred.
source code
POR
getPOR(self)
Returns: Point of regard associated with this event
source code
opaque object
getAppID(self)
Returns: Unique application ID identifying the top most container for the source of this event (i.e.
source code

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

Instance Variables [hide private]
boolean focused
Was the source of the event focused at the time of event creation?
POR por
Point of regard associated with this event
integer priority
Priority of this event
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, priority=AEConstants.EXEC_NORMAL, focused=False, **kwargs)
(Constructor)

source code 

Stores the event priority and whether the event source was focused or not.

Parameters:
  • priority (integer) - Priority of this event, defaults to normal
  • focused (boolean) - Was the source of the event focused at the time of event creation?
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

Returns the name of this event.

Returns: string
Class name of this AEEvent
Overrides: object.__str__

execute(self, **kwargs)

source code 

Executes the logic that will handle this event. The EventManager can provide whatever arguments are necessary for an AEEvent subclass to execute as keyword arguments. It is up to the subclass to unpack and use the arguments it needs by name.

See EventManager.EventManager._executeEvent for the arguments provided.

Parameters:
  • kwargs (dictionary) - Named references to various managers
Returns: boolean
Was this class able to execute successfully? Always True here.

getPriority(self)

source code 
Returns: integer
Current priority value

setPriority(self, priority)

source code 
Parameters:
  • priority (integer) - New priority value

setLayer(self, layer)

source code 
Parameters:
  • layer (integer) - Layer of this event (focus, tier, background)

getLayer(self)

source code 

Gets the layer for this event. If the POR is marked as imcomplete, builds a complete POR and then determines if the proper POR is in a different layer than the one originally computed.

Returns: integer
Gets the layer for this event

getDataForTask(self)

source code 

Fetches data out of an AccessEngineEvent for use by a Task. This method must be implemented by any AEEvent that will be handled by TierManager.TierManager.manageEvent or TierManager.TierManager.manageGesture.

Returns: dictionary
Empty dictionary

getTimestamp(self)

source code 

Gets the timestamp for when the event occurred.

Returns: float
Always zero when not overridden

getPOR(self)

source code 
Returns: POR
Point of regard associated with this event

getAppID(self)

source code 
Returns: opaque object
Unique application ID identifying the top most container for the source of this event (i.e. the application)