|
28 | 28 | % -----------------
|
29 | 29 |
|
30 | 30 | function retObj = data_array(obj, id_or_name)
|
31 |
| - handle = nix_mx('Block::openDataArray', obj.nix_handle, id_or_name); |
32 |
| - retObj = {}; |
33 |
| - if handle ~= 0 |
34 |
| - retObj = nix.DataArray(handle); |
35 |
| - end; |
| 31 | + retObj = nix.Utils.open_entity(obj, ... |
| 32 | + 'Block::openDataArray', id_or_name, @nix.DataArray); |
36 | 33 | end;
|
37 | 34 |
|
38 | 35 | function da = create_data_array(obj, name, nixtype, dtype, shape)
|
|
65 | 62 | end;
|
66 | 63 |
|
67 | 64 | function retObj = open_source(obj, id_or_name)
|
68 |
| - handle = nix_mx('Block::openSource', obj.nix_handle, id_or_name); |
69 |
| - retObj = {}; |
70 |
| - if handle ~= 0 |
71 |
| - retObj = nix.Source(handle); |
72 |
| - end; |
| 65 | + retObj = nix.Utils.open_entity(obj, ... |
| 66 | + 'Block::openSource', id_or_name, @nix.Source); |
73 | 67 | end;
|
74 | 68 |
|
75 | 69 | % -----------------
|
|
81 | 75 | end;
|
82 | 76 |
|
83 | 77 | function retObj = open_tag(obj, id_or_name)
|
84 |
| - handle = nix_mx('Block::openTag', obj.nix_handle, id_or_name); |
85 |
| - retObj = {}; |
86 |
| - if handle ~= 0 |
87 |
| - retObj = nix.Tag(handle); |
88 |
| - end; |
| 78 | + retObj = nix.Utils.open_entity(obj, ... |
| 79 | + 'Block::openTag', id_or_name, @nix.Tag); |
89 | 80 | end;
|
90 | 81 |
|
91 | 82 | function tag = create_tag(obj, name, type, position)
|
|
104 | 95 | end;
|
105 | 96 |
|
106 | 97 | function retObj = open_multi_tag(obj, id_or_name)
|
107 |
| - handle = nix_mx('Block::openMultiTag', obj.nix_handle, id_or_name); |
108 |
| - retObj = {}; |
109 |
| - if handle ~= 0 |
110 |
| - retObj = nix.MultiTag(handle); |
111 |
| - end; |
| 98 | + retObj = nix.Utils.open_entity(obj, ... |
| 99 | + 'Block::openMultiTag', id_or_name, @nix.MultiTag); |
112 | 100 | end;
|
113 | 101 |
|
114 | 102 | % -----------------
|
|
0 commit comments