|
85 | 85 | % References methods
|
86 | 86 | % ------------------
|
87 | 87 |
|
| 88 | + function [] = add_reference(obj, add_this) |
| 89 | + obj.referencesCache = nix.Utils.add_entity(obj, ... |
| 90 | + add_this, 'nix.DataArray', 'Tag::addReference', obj.referencesCache); |
| 91 | + end; |
| 92 | + |
| 93 | + function delCheck = remove_reference(obj, del) |
| 94 | + [delCheck, obj.referencesCache] = nix.Utils.delete_entity(obj, ... |
| 95 | + del, 'nix.DataArray', 'Tag::removeReference', obj.referencesCache); |
| 96 | + end; |
| 97 | + |
88 | 98 | function retObj = open_reference(obj, id_or_name)
|
89 |
| - handle = nix_mx('Tag::openReferenceDataArray', obj.nix_handle, id_or_name); |
90 |
| - retObj = {}; |
91 |
| - if handle ~= 0 |
92 |
| - retObj = nix.DataArray(handle); |
93 |
| - end; |
| 99 | + retObj = nix.Utils.open_entity(obj, ... |
| 100 | + 'Tag::openReferenceDataArray', id_or_name, @nix.DataArray); |
94 | 101 | end;
|
95 | 102 |
|
96 | 103 | function da = get.references(obj)
|
|
113 | 120 | % ------------------
|
114 | 121 |
|
115 | 122 | function retObj = open_feature(obj, id_or_name)
|
116 |
| - handle = nix_mx('Tag::openFeature', obj.nix_handle, id_or_name); |
117 |
| - retObj = {}; |
118 |
| - if handle ~= 0 |
119 |
| - retObj = nix.Feature(handle); |
120 |
| - end; |
| 123 | + retObj = nix.Utils.open_entity(obj, ... |
| 124 | + 'Tag::openFeature', id_or_name, @nix.Feature); |
121 | 125 | end;
|
122 | 126 |
|
123 | 127 | function feat = get.features(obj)
|
|
138 | 142 | % ------------------
|
139 | 143 | % Sources methods
|
140 | 144 | % ------------------
|
141 |
| - |
| 145 | + |
| 146 | + function [] = add_source(obj, add_this) |
| 147 | + obj.sourcesCache = nix.Utils.add_entity(obj, ... |
| 148 | + add_this, 'nix.Source', 'Tag::addSource', obj.sourcesCache); |
| 149 | + end; |
| 150 | + |
| 151 | + function delCheck = remove_source(obj, del) |
| 152 | + [delCheck, obj.sourcesCache] = nix.Utils.delete_entity(obj, ... |
| 153 | + del, 'nix.Source', 'Tag::removeSource', obj.sourcesCache); |
| 154 | + end; |
| 155 | + |
142 | 156 | function retObj = open_source(obj, id_or_name)
|
143 |
| - handle = nix_mx('Tag::openSource', obj.nix_handle, id_or_name); |
144 |
| - retObj = {}; |
145 |
| - if handle ~= 0 |
146 |
| - retObj = nix.Source(handle); |
147 |
| - end; |
| 157 | + retObj = nix.Utils.open_entity(obj, ... |
| 158 | + 'Tag::openSource', id_or_name, @nix.Source); |
148 | 159 | end;
|
149 | 160 |
|
150 | 161 | function sources = get.sources(obj)
|
|
0 commit comments