1
|
|
|
from configparser import ConfigParser |
2
|
|
|
from typing import Optional |
3
|
|
|
|
4
|
|
|
from pystratum_backend.Backend import Backend |
5
|
|
|
from pystratum_backend.ConstantWorker import ConstantWorker |
6
|
|
|
from pystratum_backend.RoutineLoaderWorker import RoutineLoaderWorker |
7
|
|
|
from pystratum_backend.RoutineWrapperGeneratorWorker import RoutineWrapperGeneratorWorker |
8
|
|
|
from pystratum_backend.StratumStyle import StratumStyle |
9
|
|
|
|
10
|
|
|
from test.Worker.VoidConstantWorker import VoidConstantWorker |
11
|
|
|
from test.Worker.VoidRoutineLoaderWorker import VoidRoutineLoaderWorker |
12
|
|
|
from test.Worker.VoidRoutineWrapperGeneratorWorker import VoidRoutineWrapperGeneratorWorker |
13
|
|
|
|
14
|
|
|
|
15
|
|
|
class VoidBackend(Backend): |
16
|
|
|
""" |
17
|
|
|
Backend with empty implementations. |
18
|
|
|
""" |
19
|
|
|
|
20
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
21
|
|
|
def create_constant_worker(self, settings: ConfigParser, io: StratumStyle) -> Optional[ConstantWorker]: |
22
|
|
|
""" |
23
|
|
|
Creates the object that does the actual execution of the constant command for the backend. |
24
|
|
|
|
25
|
|
|
:param ConfigParser settings: The settings from the PyStratum configuration file. |
26
|
|
|
:param StratumStyle io: The output object. |
27
|
|
|
|
28
|
|
|
:rtype: ConstantWorker|None |
29
|
|
|
""" |
30
|
|
|
return VoidConstantWorker(io) |
31
|
|
|
|
32
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
33
|
|
|
def create_routine_loader_worker(self, settings: ConfigParser, io: StratumStyle) -> Optional[RoutineLoaderWorker]: |
34
|
|
|
""" |
35
|
|
|
Creates the object that does the actual execution of the routine loader command for the backend. |
36
|
|
|
|
37
|
|
|
:param ConfigParser settings: The settings from the PyStratum configuration file. |
38
|
|
|
:param StratumStyle io: The output object. |
39
|
|
|
|
40
|
|
|
:rtype: RoutineLoaderWorker|None |
41
|
|
|
""" |
42
|
|
|
return VoidRoutineLoaderWorker(io) |
43
|
|
|
|
44
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
45
|
|
|
def create_routine_wrapper_generator_worker(self, settings: ConfigParser, io: StratumStyle) \ |
46
|
|
|
-> Optional[RoutineWrapperGeneratorWorker]: |
47
|
|
|
""" |
48
|
|
|
Creates the object that does the actual execution of the routine wrapper generator command for the backend. |
49
|
|
|
|
50
|
|
|
:param ConfigParser settings: The settings from the PyStratum configuration file. |
51
|
|
|
:param StratumStyle io: The output object. |
52
|
|
|
|
53
|
|
|
:rtype: RoutineWrapperGeneratorWorker|None |
54
|
|
|
""" |
55
|
|
|
return VoidRoutineWrapperGeneratorWorker(io) |
56
|
|
|
|
57
|
|
|
# ---------------------------------------------------------------------------------------------------------------------- |
58
|
|
|
|