view m-toolbox/classes/@ltpda_uoh/setPropertyValue.m @ 35:4be5f7a5316f database-connection-manager

Suppress output messages on preferences loading and saving
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% 
% CALL:
%        varargout = setPropertyValue(inputs, ...
%                                     input_names, ...
%                                     objectClass, ...
%                                     callerIsMethod, ...
%                                     propName, ...
%                                     setterFcn, ...
%                                     copy, ...
%                                     getInfo)
% 
% 
function varargout = setPropertyValue(varargin)

    
  % get inputs
  callerIsMethod = varargin{end-4};
  propName       = varargin{end-3};
  getInfo        = varargin{end};
  
  % Check if this is a call for parameters
  if utils.helper.isinfocall(varargin{1:end-6})
    varargout{1} = getInfo(varargin{3});
    return
  end
  
  % call super class method
  [objects, values, pls, obj_invars] = setPropertyValue@ltpda_uo(varargin{:});
    
  % Combine input plists and default PLIST
  ii = getInfo('Default');
  pls = applyDefaults(ii.plists, pls);

  for jj = 1:numel(objects)
    % Add history if needed
    if ~callerIsMethod
      if isempty(values)
        plh = pls;
      else
        plh = pls.pset(propName, values{jj});
      end
      objects(jj).addHistory(getInfo('None'), plh, obj_invars(jj), objects(jj).hist);
    end
  end
  
  % Set output
  varargout{1} = objects;
end
% END