view m-toolbox/classes/@minfo/setMclass.m @ 14:6d43f39633b8 database-connection-manager

Remove unused functions from utils.jmysql
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% SETMCLASS Set the property 'mclass'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: Set the property 'mclass'.
%
% CALL:              obj.setMclass('string');
%              obj = obj.setMclass('string');
%
% INPUTS:      obj - must be a single minfo object.
%
% VERSION:     $Id: setMclass.m,v 1.1 2010/03/25 15:16:13 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = setMclass(varargin)

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

  if ~ischar(val)
    error('### The value for the property ''mclass'' 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.mclass = val;

  varargout{1} = obj;
end