AutoArchive._mainf._core

Internal implementation of Mainf framework.

Modules

mainf_engine

MainfEngine class.

class AutoArchive._mainf._core.mainf_engine.MainfEngine[source]

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).

addComponent(componentType)[source]

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.
start(appEnvironment=None)[source]

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

_interface_accessor

_InterfaceAccessor class.

class AutoArchive._mainf._core._interface_accessor._InterfaceAccessor[source]

Bases: AutoArchive._mainf.iinterface_accessor.IInterfaceAccessor

IInterfaceAccessor implementation.

getComponentInterface(interfaceType)[source]

See: IInterfaceAccessor.getComponentInterface().

registerComponentInterface(interfaceType, instance)[source]

See: IInterfaceAccessor.registerComponentInterface().

unregisterComponentInterface(interfaceType)[source]

See: IInterfaceAccessor.unregisterComponentInterface().

_mainf_context

_MainfContext class.

class AutoArchive._mainf._core._mainf_context._MainfContext(appEnvironment)[source]

Bases: AutoArchive._mainf.imainf_context.IMainfContext

IMainfContext implementation.

Parameters:appEnvironment (object) – Object that will be made available via appEnvironment property.
appEnvironment[source]

See: IMainfContext.appEnvironment

Table Of Contents

Previous topic

AutoArchive._mainf

Next topic

AutoArchive._archiving