MatrixBerryCore
EntityFactory.m
Go to the documentation of this file.
1 classdef EntityFactory
2  methods (Static)
3  function resArr=create(valMat,varargin)
4  import mxberry.core.parseparext;
5  [reg,~,isUniqueIsMemberChecked]=parseparext(varargin,...
6  {'checkUniqueIsMember';true},[0 1],'regDefList',{true});
7  %
8  isSortable=reg{1};
9  %
10  if isUniqueIsMemberChecked
11  if isSortable
13  else
15  end
16  else
17  if isSortable
19  else
20  fCreate=@mxberry.core.test.aux.CompEntity;
21  end
22  end
23  %
24  nElems=numel(valMat);
25  sizeVec=size(valMat);
26  resCArr=cell(sizeVec);
27  for iElem=nElems:-1:1
28  resCArr{iElem}=fCreate(valMat(iElem));
29  end
30  resArr=reshape([resCArr{:}],sizeVec);
31  end
32  end
33 end
function parseparext(in args, in propNameValMat, in varargin)
PARSEPAREXT behaves in the same way as mxberry.core.parseparams but returns property values in a more...