File tree Expand file tree Collapse file tree 3 files changed +7
-24
lines changed Expand file tree Collapse file tree 3 files changed +7
-24
lines changed Original file line number Diff line number Diff line change 151
151
152
152
function r = open_positions(obj )
153
153
fname = strcat(obj .alias , ' ::openPositions' );
154
- h = nix_mx(fname , obj .nix_handle );
155
- r = {};
156
- if h ~= 0
157
- r = nix .DataArray(h );
158
- end
154
+ r = nix .Utils .fetchObj(fname , obj .nix_handle , @nix .DataArray );
159
155
end
160
156
161
157
function [] = add_positions(obj , add_this )
175
171
176
172
function r = open_extents(obj )
177
173
fname = strcat(obj .alias , ' ::openExtents' );
178
- h = nix_mx(fname , obj .nix_handle );
179
- r = {};
180
- if h ~= 0
181
- r = nix .DataArray(h );
182
- end
174
+ r = nix .Utils .fetchObj(fname , obj .nix_handle , @nix .DataArray );
183
175
end
184
176
185
177
function [] = set_extents(obj , add_this )
Original file line number Diff line number Diff line change 30
30
31
31
function r = parent(obj )
32
32
fname = strcat(obj .alias , ' ::parent' );
33
- h = nix_mx(fname , obj .nix_handle );
34
- r = {};
35
- if h ~= 0
36
- r = nix .Section(h );
37
- end
33
+ r = nix .Utils .fetchObj(fname , obj .nix_handle , @nix .Section );
38
34
end
39
35
40
36
% ----------------
59
55
60
56
function r = openLink(obj )
61
57
fname = strcat(obj .alias , ' ::openLink' );
62
- h = nix_mx(fname , obj .nix_handle );
63
- r = {};
64
- if h ~= 0
65
- r = nix .Section(h );
66
- end
58
+ r = nix .Utils .fetchObj(fname , obj .nix_handle , @nix .Section );
67
59
end
68
60
69
61
function r = inherited_properties(obj )
Original file line number Diff line number Diff line change 31
31
end
32
32
end
33
33
34
- function rcell = fetchObj(nixMxFunc , handle , objConstructor )
34
+ function r = fetchObj(nixMxFunc , handle , objConstructor )
35
+ r = {};
35
36
h = nix_mx(nixMxFunc , handle );
36
37
if (h ~= 0 )
37
- rcell = objConstructor(h );
38
- else
39
- rcell = {};
38
+ r = objConstructor(h );
40
39
end
41
40
end
42
41
You can’t perform that action at this time.
0 commit comments