1
|
|
|
from configparser import ConfigParser |
2
|
|
|
from typing import Optional |
3
|
|
|
|
4
|
|
|
from pystratum_backend.ConstantWorker import ConstantWorker |
5
|
|
|
from pystratum_backend.RoutineLoaderWorker import RoutineLoaderWorker |
6
|
|
|
from pystratum_backend.RoutineWrapperGeneratorWorker import RoutineWrapperGeneratorWorker |
7
|
|
|
from pystratum_backend.StratumIO import StratumIO |
8
|
|
|
|
9
|
|
|
|
10
|
|
|
class Backend: |
11
|
|
|
""" |
12
|
|
|
Semi interface for PyStratum's backends. |
13
|
|
|
""" |
14
|
|
|
|
15
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
16
|
|
|
def create_constant_worker(self, settings: ConfigParser, io: StratumIO) -> Optional[ConstantWorker]: |
17
|
|
|
""" |
18
|
|
|
Creates the object that does the actual execution of the constant command for the backend. |
19
|
|
|
|
20
|
|
|
:param settings: The settings from the PyStratum configuration file. |
21
|
|
|
:param io: The output object. |
22
|
|
|
""" |
23
|
|
|
return None |
24
|
|
|
|
25
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
26
|
|
|
def create_routine_loader_worker(self, settings: ConfigParser, io: StratumIO) -> Optional[RoutineLoaderWorker]: |
27
|
|
|
""" |
28
|
|
|
Creates the object that does the actual execution of the routine loader command for the backend. |
29
|
|
|
|
30
|
|
|
:param settings: The settings from the PyStratum configuration file. |
31
|
|
|
:param io: The output object. |
32
|
|
|
""" |
33
|
|
|
return None |
34
|
|
|
|
35
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
36
|
|
|
def create_routine_wrapper_generator_worker(self, settings: ConfigParser, io: StratumIO) -> Optional[ |
37
|
|
|
RoutineWrapperGeneratorWorker]: |
38
|
|
|
""" |
39
|
|
|
Creates the object that does the actual execution of the routine wrapper generator command for the backend. |
40
|
|
|
|
41
|
|
|
:param settings: The settings from the PyStratum configuration file. |
42
|
|
|
:param io: The output object. |
43
|
|
|
""" |
44
|
|
|
return None |
45
|
|
|
|
46
|
|
|
# ---------------------------------------------------------------------------------------------------------------------- |
47
|
|
|
|