PipePackage   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
c 5
b 0
f 0
dl 0
loc 36
rs 10
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A setCountProcess() 0 3 1
A get_mechanisms() 0 2 1
A get_step_key() 0 2 1
A get_context() 0 2 1
A set_step_key() 0 2 1
A set_mechanisms() 0 2 1
A set_context() 0 2 1
A setCurrentProcessId() 0 3 1
A __init__() 0 5 1
1
from synergine.lib.process.processmanager import PipePackage as BasePipePackage
2
3
4
class PipePackage(BasePipePackage):
5
    """
6
    Object used to send data to process
7
    """
8
9
    def __init__(self):
10
        super().__init__()
11
        self._mechanisms = []
12
        self._step_key = 0
13
        self._context = None
14
15
    def set_context(self, context):
16
        self._context = context
17
18
    def get_context(self):
19
        return self._context
20
21
    def set_step_key(self, step_key):
22
        self._step_key = step_key
23
24
    def get_step_key(self):
25
        return self._step_key
26
27
    def set_mechanisms(self, mechanisms):
28
        self._mechanisms = mechanisms
29
30
    def get_mechanisms(self):
31
        return self._mechanisms
32
33
    def setCurrentProcessId(self, process_id):
34
        super().setCurrentProcessId(process_id)
35
        self._context.set_current_chunk_position(process_id)
36
37
    def setCountProcess(self, count):
38
        super().setCountProcess(count)
39
        self._context.set_total_chunk(count)