|
5 | 5 | properties(Hidden)
|
6 | 6 | % namespace reference for nix-mx functions
|
7 | 7 | alias = 'Section'
|
8 |
| - propsCache |
9 | 8 | end;
|
10 | 9 |
|
11 | 10 | properties(Dependent)
|
|
23 | 22 |
|
24 | 23 | % assign relations
|
25 | 24 | nix.Dynamic.add_dyn_relation(obj, 'sections', @nix.Section);
|
26 |
| - |
27 |
| - obj.propsCache = nix.CacheStruct(); |
28 | 25 | end;
|
29 | 26 |
|
30 | 27 | function section = parent(obj)
|
|
65 | 62 | % ----------------
|
66 | 63 |
|
67 | 64 | function newSec = createSection(obj, name, type)
|
68 |
| - newSec = nix.Section(nix_mx('Section::createSection', obj.nix_handle, name, type)); |
69 |
| - obj.sectionsCache.lastUpdate = 0; |
| 65 | + newSec = nix.Section(nix_mx('Section::createSection', ... |
| 66 | + obj.nix_handle, name, type)); |
70 | 67 | end;
|
71 | 68 |
|
72 | 69 | function delCheck = deleteSection(obj, del)
|
73 |
| - delCheck = nix.Utils.delete_entity(obj, del, 'nix.Section', 'Section::deleteSection'); |
74 |
| - obj.sectionsCache.lastUpdate = 0; |
| 70 | + delCheck = nix.Utils.delete_entity_(obj, del, ... |
| 71 | + 'nix.Section', 'Section::deleteSection'); |
75 | 72 | end;
|
76 | 73 |
|
77 | 74 | function retObj = open_section(obj, id_or_name)
|
|
92 | 89 | function p = create_property(obj, name, datatype)
|
93 | 90 | p = nix.Property(nix_mx('Section::createProperty', ...
|
94 | 91 | obj.nix_handle, name, datatype));
|
95 |
| - obj.propsCache.lastUpdate = 0; |
96 | 92 | end;
|
97 | 93 |
|
98 | 94 | function p = create_property_with_value(obj, name, val)
|
|
101 | 97 | end;
|
102 | 98 | p = nix.Property(nix_mx('Section::createPropertyWithValue', ...
|
103 | 99 | obj.nix_handle, name, val));
|
104 |
| - obj.propsCache.lastUpdate = 0; |
105 | 100 | end;
|
106 | 101 |
|
107 | 102 | function delCheck = delete_property(obj, del)
|
|
113 | 108 | delID = del;
|
114 | 109 | end;
|
115 | 110 | delCheck = nix_mx('Section::deleteProperty', obj.nix_handle, delID);
|
116 |
| - obj.propsCache.lastUpdate = 0; |
117 | 111 | end;
|
118 | 112 |
|
119 | 113 | function retObj = open_property(obj, id_or_name)
|
|
122 | 116 | end;
|
123 | 117 |
|
124 | 118 | function props = get.allProperties(obj)
|
125 |
| - %-- if a value in a property is updated, this will not |
126 |
| - %-- update the lastUpdate of the propertyCache of |
127 |
| - %-- a loaded section. Therefore caching of the properties |
128 |
| - %-- of a section is disabled by always resetting the lastUpdate |
129 |
| - obj.propsCache.lastUpdate = 0; |
130 |
| - |
131 |
| - [obj.propsCache, props] = nix.Utils.fetchPropList(obj.updatedAt, ... |
132 |
| - 'Section::properties', obj.nix_handle, obj.propsCache); |
133 |
| - end |
| 119 | + props = nix_mx('Section::properties', obj.nix_handle); |
| 120 | + end; |
134 | 121 |
|
135 | 122 | function p_map = get.allPropertiesMap(obj)
|
136 | 123 | p_map = containers.Map();
|
|
139 | 126 | for i=1:length(props)
|
140 | 127 | p_map(props{i}.name) = cell2mat(props{i}.values);
|
141 | 128 | end
|
142 |
| - end |
| 129 | + end; |
143 | 130 |
|
144 | 131 | end
|
145 |
| - |
146 | 132 | end
|
147 |
| - |
0 commit comments