% 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

