blackfennec.action_system package

Submodules

blackfennec.action_system.action module

class blackfennec.action_system.action.Action(type: Type)[source]

Bases: object

Action Interface

This is the interface for all actions.

type

type which is used to identify the action

abstract property description: str

An informative description of the action.

abstract execute(context: Context) None[source]

Function to execute the action

Parameters

context (Context) – context of the action

abstract property name: str

A short, identifying name for the action.

blackfennec.action_system.action_registry module

class blackfennec.action_system.action_registry.ActionRegistry[source]

Bases: object

property actions: dict[blackfennec.type_system.type.Type, list[blackfennec.action_system.action.Action]]
deregister_action(action: Action) None[source]

Function to deregister an action

get_actions(type: Type) list[blackfennec.action_system.action.Action][source]

Function to get all actions for a specific type

register_action(action: Action) None[source]

Function to register a new action

blackfennec.action_system.context module

class blackfennec.action_system.context.Context(ui_context, structure: Optional[Structure] = None)[source]

Bases: object

Context is the context in which an action is called.

structure

the structure on which the action is called

Type

Structure

Module contents