openpectus.engine.commands
Attributes
Command arguments |
|
Classes
Interface for commands runnable by engine. |
|
Extension of EngineCommand that provides a typed context. |
Module Contents
- openpectus.engine.commands.CommandArgs
Command arguments
- class openpectus.engine.commands.EngineCommand(name)
Interface for commands runnable by engine.
- name: str
- _cancelled: bool = False
- _initialized: bool = False
- _exec_started: bool = False
- _exec_iterations: int = -1
- _exec_complete: bool = False
- _progress: bool | float = False
- _finalized: bool = False
- __str__()
- Return type:
str
- initialize()
- is_initialized()
- Return type:
bool
- execute(args)
- Parameters:
args (CommandArgs)
- Return type:
None
- is_execution_started()
- Return type:
bool
- get_iteration_count()
Returns number of iterations executed. The first iteration is number 0.
- Return type:
int
- is_execution_complete()
- Return type:
bool
- finalize()
Overrides must call super().finalize() and must dispose the command.
- is_finalized()
- Return type:
bool
- cancel()
- is_cancelled()
- Return type:
bool
- set_progress(progress)
- Parameters:
progress (bool | float)
- get_progress()
- Return type:
bool | float
- set_complete()
- force()
- openpectus.engine.commands.TContext
- class openpectus.engine.commands.ContextEngineCommand(context, name)
Bases:
Generic[TContext],EngineCommandExtension of EngineCommand that provides a typed context.
This allows Uod commands to extend EngineCommand without importing Engine.
- Parameters:
context (TContext)
name (str)
- context: TContext