Skip to content

Commit b639f01

Browse files
committed
Allow using the get and set functions with DSS_MATLAB classes
1 parent a45b1c5 commit b639f01

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

+DSS_MATLAB/Base.m

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
classdef Base < handle & matlab.mixin.CustomDisplay
2-
methods (Access = protected)
3-
function propgrp = getPropertyGroups(obj)
4-
propgrp = matlab.mixin.util.PropertyGroup();
5-
end
6-
7-
function header = getHeader(obj)
8-
if ~isscalar(obj)
9-
header = [email protected](obj);
10-
else
11-
headerStr = matlab.mixin.CustomDisplay.getClassNameForHeader(obj);
12-
headerStr = [headerStr,' (DSS MATLAB interface class)'];
13-
header = sprintf('%s\n',headerStr);
14-
end
15-
end
16-
end
17-
methods
18-
function obj = CheckForError(obj)
19-
error = calllib('dss_capi_v7', 'Error_Get_Number');
20-
if error ~= 0
21-
ME = MException(['DSS_MATLAB:Error' int2str(error)], calllib('dss_capi_v7', 'Error_Get_Description'));
22-
throw(ME);
23-
end
24-
end
25-
end
26-
end
1+
classdef Base < handle & matlab.mixin.CustomDisplay & matlab.mixin.SetGet
2+
methods (Access = protected)
3+
function propgrp = getPropertyGroups(obj)
4+
propgrp = matlab.mixin.util.PropertyGroup();
5+
end
6+
7+
function header = getHeader(obj)
8+
if ~isscalar(obj)
9+
header = [email protected](obj);
10+
else
11+
headerStr = matlab.mixin.CustomDisplay.getClassNameForHeader(obj);
12+
headerStr = [headerStr,' (DSS MATLAB interface class)'];
13+
header = sprintf('%s\n',headerStr);
14+
end
15+
end
16+
end
17+
methods
18+
function obj = CheckForError(obj)
19+
error = calllib('dss_capi_v7', 'Error_Get_Number');
20+
if error ~= 0
21+
ME = MException(['DSS_MATLAB:Error' int2str(error)], calllib('dss_capi_v7', 'Error_Get_Description'));
22+
throw(ME);
23+
end
24+
end
25+
end
26+
end

0 commit comments

Comments
 (0)