1 classdef StaticPropStorage<handle
2 methods (Static,Access=
private)
3 function [propVal,isThere]=setGetProp(isFlushed,isPresenceChecked,branchName,propName,propVal)
5 persistent branchStorage;
6 if isempty(branchStorage)
7 branchStorage=containers.Map;
10 if ~branchStorage.isKey(branchName) || isFlushed
11 branchStorage(branchName)=containers.Map();
14 propStorage=branchStorage(branchName);
15 propStorage(propName)=propVal; %
#ok<NASGU> 20 propStorage=branchStorage(branchName);
21 if nargout>1&&isPresenceChecked
22 isThere=propStorage.isKey(propName);
24 propVal=propStorage(propName);
29 propVal=propStorage(propName);
33 if ~isempty(strfind(meObj.identifier,
':NoKey'))
35 'property %s is missing',propName);
36 newMeObj=addCause(newMeObj,meObj);
46 methods (Static,Access=protected)
47 function [propVal,isThere]=getPropInternal(branchName,propName,isPresenceChecked)
49 isPresenceChecked=false;
53 false,isPresenceChecked,branchName,propName);
55 function setPropInternal(branchName,propName,propVal)
57 false,false,branchName,propName,propVal);
59 function flushInternal(branchName)
function throwerror(in msgTag, in varargin)
THROWERROR works similarly to built-in ERROR function in case when there is no output arguments but s...