-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDebugLevel.m
40 lines (32 loc) · 1.29 KB
/
DebugLevel.m
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
37
38
39
40
classdef DebugLevel
properties
possibleValues
value
end
methods
% ----------------------------------------------------------------------------------
function obj = DebugLevel(value) %#ok<*INUSD>
obj.possibleValues = struct('none',0,'simulateBadData',1);
switch(lower(value))
case 'none'
obj.value = obj.possibleValues.none;
case 'simulatebaddata'
obj.value = obj.possibleValues.simulateBadData;
otherwise
obj.value = obj.possibleValues.none;
end
end
% ----------------------------------------------------------------------------------
function value = Get(obj)
value = obj.value;
end
% ----------------------------------------------------------------------------------
function value = SimulateBadData(obj)
value = obj.possibleValues.simulateBadData;
end
% ----------------------------------------------------------------------------------
function value = None(obj)
value = obj.possibleValues.None;
end
end
end