view m-toolbox/classes/@minfo/setMpackage.m @ 25:79dc7091dbbc database-connection-manager

Update tests
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% SETMPACKAGE Set the property 'mpackage'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: Set the property 'mpackage'.
%
% CALL:              obj.setMpackage('string');
%              obj = obj.setMpackage('string');
%
% INPUTS:      obj - must be a single minfo object.
%
% VERSION:     $Id: setMpackage.m,v 1.1 2011/04/17 09:21:29 hewitson Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = setMpackage(varargin)

  obj = varargin{1};
  val = varargin{2};

  if ~ischar(val)
    error('### The value for the property ''mpackage'' must be a string but it is from the class [%s]!', class(val));
  end

  %%% decide whether we modify the minfo-object, or create a new one.
  obj = copy(obj, nargout);

  %%% set 'mclass'
  obj.mpackage = val;

  varargout{1} = obj;
end