MatrixBerryCore
ConfRepoMgrInMemory.m
Go to the documentation of this file.
1 classdef ConfRepoMgrInMemory<mxberry.conf.ConfRepoManagerAnyStorage
2  methods
3  function self=ConfRepoMgrInMemory(varargin)
4  import mxberry.core.cont.ondisk.HashMapXMLMetaData;
5  %
6  storage=HashMapXMLMetaData(...
7  'storageFormat','none');
9  storage);
10  %
11  end
12  function destFileName=copyConfFile(self,destFolderName,varargin)
13  [reg,~,isDestFile]=mxberry.core.parseparext(varargin,...
14  {'destIsFile';false;'isscalar(x)&&islogical(x)'},...
15  'regCheckList',{'isstring(x)'},...
16  'regDefList',{self.getCurConfName()});
17  confName=reg{1};
18  if isDestFile
19  [destPathStr,destConfName,destExt]=fileparts(destFolderName);
20  mxberry.core.check.checkgen(destExt,'strcmp(x,''.xml'')');
21  else
22  destPathStr=destFolderName;
23  destConfName=confName;
24  end
25  storage=mxberry.core.cont.ondisk.HashMapXMLMetaData(...
26  'storageFormat','verxml',...
27  'storageLocationRoot',destPathStr,...
28  'skipStorageBranchKey',true,...
29  'checkStorageContent',false);
30  storage.put(destConfName,self.getConfInternal(confName));
31  if nargout>0
32  destFileName=[destPathStr filesep destConfName '.xml'];
33  end
34  end
35  function selectConf(self,confName,varargin)
36  [reg,~]=mxberry.core.parseparams(varargin,{'reloadIfSelected'});
38  self,confName,...
39  'reloadifSelected',false,reg{:});
40  end
41  function resVal=getParam(self,paramName,varargin)
42  [reg,~]=mxberry.core.parseparams(varargin,{'skipCache'});
43  resVal=getParam@mxberry.conf.ConfRepoManagerAnyStorage(...
44  self,paramName,reg{:},'skipCache',false);
45  end
46  function flushCache(self)
47  end
48  end
49  methods(Access=protected)
50  function confNameList=getConfNameListInternal(self)
51  confNameList=self.getCachedConfNames();
52  end
53  end
54 end
function filesep()
CONFREPOMANAGER provides a functionality for storing, reading copying and very simplistic version tra...