view m-toolbox/classes/@minfo/char.m @ 20:d58813ab1b92 database-connection-manager

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

% CHAR convert an minfo object into a string.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: CHAR convert an minfo object into a string.
%
% CALL:        string = char(obj)
%
% VERSION:     $Id: char.m,v 1.7 2011/02/18 16:48:53 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = char(varargin)

  objs = utils.helper.collect_objects(varargin(:), 'minfo');

  pstr = '';
  for ii = 1:numel(objs)

    pp   = objs(ii);
    % method class
    pstr = [pstr  sprintf('%s/', pp.mclass)];
    % method name
    pstr = [pstr  sprintf('%s', pp.mname)];
    % method category
    pstr = [pstr  sprintf(', %s', pp.mcategory)];
    % method sets
    if ~isempty(pp.sets)
      pstr = [pstr  sprintf(', %s', utils.prog.cell2str(pp.sets))];
    end
  end

  %%% Prepare output
  varargout{1} = pstr;
end