Mercurial > hg > ltpda
diff m-toolbox/classes/@matrix/fromInput.m @ 43:bc767aaa99a8
CVS Update
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 11:09:25 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line diff
--- a/m-toolbox/classes/@matrix/fromInput.m Wed Nov 23 19:22:13 2011 +0100 +++ b/m-toolbox/classes/@matrix/fromInput.m Tue Dec 06 11:09:25 2011 +0100 @@ -7,20 +7,34 @@ % % CALL: matrix = matrix.fromInput(inobjs) % -% VERSION: $Id: fromInput.m,v 1.9 2011/02/14 13:20:24 ingo Exp $ +% VERSION: $Id: fromInput.m,v 1.10 2011/12/05 07:40:23 hewitson Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function obj = fromInput(obj, pli, callerIsMethod) + VERSION = '$Id: fromInput.m,v 1.10 2011/12/05 07:40:23 hewitson Exp $'; + import utils.const.* if callerIsMethod % do nothing - pl = pli; else - utils.helper.msg(msg.OPROC1, 'Construct from inputs'); - pl = combine(pli, matrix.getDefaultPlist('From Input')); + % get AO info + ii = matrix.getInfo('matrix', 'From Input'); + + % Set the method version string in the minfo object + ii.setMversion([VERSION '-->' ii.mversion]); end + + % Combine input plist with default values + if callerIsMethod + pl = pli; + else + % Combine input plist with default values + % TODO: the parse step should be removed and included somehow into plist/applyDefaults + pl = applyDefaults(ii.plists, pli); + end + shape = pl.find('shape'); objs = pl.find('objs'); @@ -53,17 +67,9 @@ inhists = [inobjs(:).hist]; end obj.addHistory(matrix.getInfo('matrix', 'None'), pl, [], inhists); - warning('off', utils.const.warnings.METHOD_NOT_FOUND); - % remove parameters we already used - pl_set = copy(pl,1); - if pl_set.isparam('objs') - pl_set.remove('objs'); - end - if pl_set.isparam('shape') - pl_set.remove('shape'); - end - obj.setProperties(pl_set); - warning('on', utils.const.warnings.METHOD_NOT_FOUND); + + % Set any remaining object properties which exist in the default plist + obj.setObjectProperties(pl); end end