-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathParamFilter.py
More file actions
36 lines (24 loc) · 983 Bytes
/
ParamFilter.py
File metadata and controls
36 lines (24 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class FilterItem:
def __init__(self, skip_endurance = False, skip_tolerance = False, skip_designvariant = False):
self.SkipEndurance = skip_endurance
self.SkipTolerance = skip_tolerance
self.SkipVariant = skip_designvariant
class FilterObj:
FilterData = {
'C': FilterItem(),
'R': FilterItem(),
'L': FilterItem(),
}
def SetFilter(self, key_str, filter):
self.FilterData[key_str] = filter
def GetFilter(self, key_str):
try:
return self.FilterData[key_str]
except:
return FilterItem(True, True, True)
def SetSkipingEndurance(self, key_str, value):
self.FilterData[key_str].SkipEndurance = value
def SetSkipingTolerance(self, key_str, value):
self.FilterData[key_str].SkipTolerance = value
def SetSkipingVariant(self, key_str, value):
self.FilterData[key_str].SkipVariant = value