Internal implementation of Mainf framework.
MainfEngine class.
Bases: builtins.object
Manages components and starts the program.
Contains all components managed by the Mainf framework. Typically, components are added after instantiation of this class. Usage of the class should be followed by calling its start() method which creates, initializes and runs components.
See also the description of _mainf package (_mainf).
Add a component to be managed by Mainf framework.
Parameters: | componentType (type{IComponent}) – A component class that will be added. |
---|---|
Raises TypeError: | |
If componentType does not implement IComponent. |
Starts the program.
Creates and initializes components. This method is typically called by a class or function exposed to the startup script.
See also: _mainf, MainfEngine.
Parameters: | appEnvironment (object) – An arbitrary object. It will be available to components. |
---|---|
Returns: | Exit code of the program. |
Return type: | int |
_InterfaceAccessor class.
Bases: AutoArchive._mainf.iinterface_accessor.IInterfaceAccessor
IInterfaceAccessor implementation.
_MainfContext class.
Bases: AutoArchive._mainf.imainf_context.IMainfContext
IMainfContext implementation.
Parameters: | appEnvironment (object) – Object that will be made available via appEnvironment property. |
---|